lkml.org 
[lkml]   [2016]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net] bpf, perf: delay release of BPF prog after grace period
From
From: Daniel Borkmann <daniel@iogearbox.net>
Date: Mon, 27 Jun 2016 21:38:11 +0200

> Commit dead9f29ddcc ("perf: Fix race in BPF program unregister") moved
> destruction of BPF program from free_event_rcu() callback to __free_event(),
> which is problematic if used with tail calls: if prog A is attached as
> trace event directly, but at the same time present in a tail call map used
> by another trace event program elsewhere, then we need to delay destruction
> via RCU grace period since it can still be in use by the program doing the
> tail call (the prog first needs to be dropped from the tail call map, then
> trace event with prog A attached destroyed, so we get immediate destruction).
>
> Fixes: dead9f29ddcc ("perf: Fix race in BPF program unregister")
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> Acked-by: Alexei Starovoitov <ast@kernel.org>
> Cc: Jann Horn <jann@thejh.net>

Applied and queued up for -stable, thanks Daniel.

\
 
 \ /
  Last update: 2016-06-29 12:21    [W:0.029 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site