summaryrefslogtreecommitdiff
path: root/arch/x86/net/bpf_jit_comp.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2013-05-10 09:58:02 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2013-05-17 13:56:35 +1000
commitf2614fec1f83c409bc352206f28e6c5acbaa0991 (patch)
tree9ce0acb9f80b887cb9d2f9ebab0d37419d268a75 /arch/x86/net/bpf_jit_comp.c
parentb1b0f0a73224cf7b8864df5addc8d428f71f9ceb (diff)
bpf: add comments explaining the schedule_work() operation
Cc: Will Drewry <wad@chromium.org> Cc: Mircea Gherzan <mgherzan@gmail.com> Cc: Nicolas Schichan <nschichan@freebox.fr> Cc: Russell King <linux@arm.linux.org.uk> Cc: "David S. Miller" <davem@davemloft.net> Cc: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch/x86/net/bpf_jit_comp.c')
-rw-r--r--arch/x86/net/bpf_jit_comp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index f66b54086ce5..96598170c074 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -749,6 +749,10 @@ static void jit_free_defer(struct work_struct *arg)
void bpf_jit_free(struct sk_filter *fp)
{
if (fp->bpf_func != sk_run_filter) {
+ /*
+ * bpf_jit_free() can be called from softirq; module_free()
+ * requires process context.
+ */
struct work_struct *work = (struct work_struct *)fp->bpf_func;
INIT_WORK(work, jit_free_defer);