aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/netdev-times.py
diff options
context:
space:
mode:
authorMathieu Desnoyers <[email protected]>2011-11-30 13:34:15 -0500
committerGreg Kroah-Hartman <[email protected]>2011-12-01 09:37:47 -0800
commite5f7787388da7562b955a36b46e909e500a5974b (patch)
treeab75c8df8a59c7f6d348f143700921bb9bf70fcb /tools/perf/scripts/python/netdev-times.py
parent2f8e0b31ad257bca9ff5dda9fdfdcc98d38d97f8 (diff)
lttng lib: ring buffer remove duplicate null pointer
* Dan Carpenter <[email protected]> wrote: > The patch c844b2f5cfea: "lttng lib: ring buffer" from Nov 28, 2011, > leads to the following Smatch complaint: > > drivers/staging/lttng/lib/ringbuffer/ring_buffer_mmap.c +33 > +lib_ring_buffer_fault() > warn: variable dereferenced before check 'buf' (see line 26) > > drivers/staging/lttng/lib/ringbuffer/ring_buffer_mmap.c > 25 struct lib_ring_buffer *buf = vma->vm_private_data; > 26 struct channel *chan = buf->backend.chan; > ^^^^^^^^^^^^^^^^^ > Dereference. > > 27 const struct lib_ring_buffer_config *config = chan->backend.config; > 28 pgoff_t pgoff = vmf->pgoff; > 29 struct page **page; > 30 void **virt; > 31 unsigned long offset, sb_bindex; > 32 > 33 if (!buf) > ^^^^ > Check. > > 34 return VM_FAULT_OOM; > 35 This check is performed at mapping setup time in lib_ring_buffer_mmap_buf() already, so we can safely remove this duplicata. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Mathieu Desnoyers <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions