diff options
author | Eric Dumazet <[email protected]> | 2012-06-12 15:24:40 +0200 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2012-06-13 21:16:42 +0200 |
commit | 047fe3605235888f3ebcda0c728cb31937eadfe6 (patch) | |
tree | 9c33ef4b076bd54f686afe924cee01e21c55f427 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 27e1f9d1cc87be4e53c6eb7158cafc21c4b85a14 (diff) |
splice: fix racy pipe->buffers uses
Dave Jones reported a kernel BUG at mm/slub.c:3474! triggered
by splice_shrink_spd() called from vmsplice_to_pipe()
commit 35f3d14dbbc5 (pipe: add support for shrinking and growing pipes)
added capability to adjust pipe->buffers.
Problem is some paths don't hold pipe mutex and assume pipe->buffers
doesn't change for their duration.
Fix this by adding nr_pages_max field in struct splice_pipe_desc, and
use it in place of pipe->buffers where appropriate.
splice_shrink_spd() loses its struct pipe_inode_info argument.
Reported-by: Dave Jones <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Tom Herbert <[email protected]>
Cc: stable <[email protected]> # 2.6.35
Tested-by: Dave Jones <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions