Kernel page fault with non-sleepable locks held error with kernel r270837
Hiroo Ono (小野寛生)
hiroo.ono+freebsd at gmail.com
Tue Sep 2 15:04:41 UTC 2014
Thank you!
The attached patch to sys/kern/uipc_socket.c worked.
I will file a bug report later.
2014-09-02 9:49 GMT+09:00 Garrett Cooper <yaneurabeya at gmail.com>:
> Is bpf built into the kernel, or is it built and loaded as a module. I'm wondering because an issue with vimage and socket "hook" support was resolved in an earlier revision, but this might not have been caught:
> http://svnweb.freebsd.org/base?view=revision&revision=270318
> Cheers,
> -Garrett
-------------- next part --------------
Index: uipc_socket.c
===================================================================
--- uipc_socket.c (revision 270837)
+++ uipc_socket.c (working copy)
@@ -3265,9 +3265,11 @@
return 1;
}
+ CURVNET_SET(so->so_vnet);
if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0)
/* This hook returning non-zero indicates an event, not error */
return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD));
+ CURVNET_RESTORE();
return (0);
}
@@ -3294,8 +3296,10 @@
SOCKBUF_LOCK_ASSERT(&so->so_snd);
kn->kn_data = sbspace(&so->so_snd);
+ CURVNET_SET(so->so_vnet);
if (V_socket_hhh[HHOOK_FILT_SOWRITE]->hhh_nhooks > 0)
hhook_run_socket(so, kn, HHOOK_FILT_SOWRITE);
+ CURVNET_RESTORE();
if (so->so_snd.sb_state & SBS_CANTSENDMORE) {
kn->kn_flags |= EV_EOF;
More information about the freebsd-current
mailing list