linux/include/trace/events
Carsten Emde fe63b94a43 tracing: prevent NULL pointer dereference in ftrace_raw_event_block_bio_bounce
Booting 2.6.31 and executing
   echo 1 >/sys/kernel/debug/tracing/events/enable
leads to
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<c032a583>] ftrace_raw_event_block_bio_bounce+0x4b/0xb9

Apparently,
   bio = bio_map_user(q, NULL, uaddr, len, reading, gfp_mask);
is called in block/blk-map.c:58 where bio->bi_bdev in set to NULL and
still is NULL when an attempt is made to evaluate bio->bi_bdev->bd_dev
in include/trace/events/block.h:189.

The tracepoint should ensure bio->bi_bdev is not dereferenced, if NULL.

Signed-off-by: Carsten Emde <C.Emde@osadl.org>
LKML-Reference: <4AAAC9B1.9060505@osadl.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-09-12 21:31:19 -04:00
..
block.h tracing: prevent NULL pointer dereference in ftrace_raw_event_block_bio_bounce 2009-09-12 21:31:19 -04:00
ext4.h Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-07-14 18:34:32 -07:00
irq.h tracing/events: Move TRACE_SYSTEM outside of include guard 2009-07-13 10:59:55 +02:00
jbd2.h tracing/events: Move TRACE_SYSTEM outside of include guard 2009-07-13 10:59:55 +02:00
kmem.h tracing/events: Move TRACE_SYSTEM outside of include guard 2009-07-13 10:59:55 +02:00
lockdep.h tracing/events: Move TRACE_SYSTEM outside of include guard 2009-07-13 10:59:55 +02:00
module.h tracing/events: Add module tracepoints 2009-08-17 11:25:08 +02:00
napi.h Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-06-15 03:02:23 -07:00
sched.h tracing/sched: show CPU task wakes up on in trace event 2009-08-26 00:32:03 -04:00
skb.h tracing/events: Move TRACE_SYSTEM outside of include guard 2009-07-13 10:59:55 +02:00
syscalls.h tracing: Create generic syscall TRACE_EVENTs 2009-08-26 00:41:48 +02:00
workqueue.h tracing/events: Move TRACE_SYSTEM outside of include guard 2009-07-13 10:59:55 +02:00