aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <[email protected]>2014-01-20 08:33:50 +0100
committerFelipe Balbi <[email protected]>2014-02-20 09:17:23 -0600
commitf0f42204d0cc04a63ac61fdaa3b6a269ea0dc08b (patch)
tree5e564e3f582d872a91433cc62dc1fa3ff8007cbd /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
parent8679059e360543b7afecd228ada6566da9f304a4 (diff)
usb: gadget: fix NULL pointer dereference
Fix possible NULL pointer dereference introduced in commit 219580e (usb: f_fs: check quirk to pad epout buf size when not aligned to maxpacketsize) In cases we do wait with: wait_event_interruptible(epfile->wait, (ep = epfile->ep)); for endpoint to be enabled, functionfs_bind() has not been called yet and epfile->ffs->gadget is still NULL and the automatic variable 'gadget' has been initialized with NULL at the point of its definition. Later on it is used as a parameter to: usb_ep_align_maybe(gadget, ep->ep, len) which in turn dereferences it. This patch fixes it by moving the actual assignment to the local 'gadget' variable after the potential waiting has completed. Signed-off-by: Andrzej Pietrasiewicz <[email protected]> Acked-by: Michal Nazarewicz <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions