blktrace: don't let the sysfs interface remove trace from running list
authorArianna Avanzini <avanzini.arianna@gmail.com>
Tue, 9 Dec 2014 21:57:45 +0000 (14:57 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 9 Dec 2014 21:59:09 +0000 (14:59 -0700)
commit7eca210375dcc029ad69c0cf48d2bf7a71f0121d
tree77e87cbc837a754309fbefd0aa6cbeb21765822a
parent959f5f5b2fa7ac3bdd37c91076e560c06513f1e6
blktrace: don't let the sysfs interface remove trace from running list

Currently, blktrace can be started/stopped via its ioctl-based interface
(used by the userspace blktrace tool) or via its ftrace interface. The
function blk_trace_remove_queue(), called each time an "enable" tunable
of the ftrace interface transitions to zero, removes the trace from the
running list, even if no function from the sysfs interface adds it to
such a list. This leads to a null pointer dereference.  This commit
changes the blk_trace_remove_queue() function so that it does not remove
the blk_trace from the running list.

v2:
    - Now the patch removes the invocation of list_del() instead of
      adding an useless if branch, as suggested by Namhyung Kim.

Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
kernel/trace/blktrace.c
This page took 0.027362 seconds and 5 git commands to generate.