aboutsummaryrefslogtreecommitdiff
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorOleg Nesterov <[email protected]>2009-03-12 14:31:28 -0700
committerLinus Torvalds <[email protected]>2009-03-12 16:20:23 -0700
commite5bc49ba7439b9726006d031d440cba96819f0f8 (patch)
tree103c02a297e4c7ba3ba1fd3c90a6bd2d6687f511 /lib/string_helpers.c
parent8d0df7a3d1ecbaf5d5602a59055c8ca993855bed (diff)
pipe_rdwr_fasync: fix the error handling to prevent the leak/crash
If the second fasync_helper() fails, pipe_rdwr_fasync() returns the error but leaves the file on ->fasync_readers. This was always wrong, but since 233e70f4228e78eb2f80dc6650f65d3ae3dbf17c "saner FASYNC handling on file close" we have the new problem. Because in this case setfl() doesn't set FASYNC bit, __fput() will not do ->fasync(0), and we leak fasync_struct with ->fa_file pointing to the freed file. Signed-off-by: Oleg Nesterov <[email protected]> Cc: Al Viro <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Jonathan Corbet <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions