aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorSasha Levin <[email protected]>2014-10-09 15:24:37 -0700
committerLinus Torvalds <[email protected]>2014-10-09 22:25:45 -0400
commit105d1b425303120c7681abc0761b6fc6c3f8a8e8 (patch)
treedd62771c0fc306feb10074c361bb422b3b634041 /tools/perf/scripts/python/net_dropmonitor.py
parentcafbaae8afdb1e6cf9f4715aea2c897cf407ddfd (diff)
fsnotify: don't put user context if it was never assigned
On some failure paths we may attempt to free user context even if it wasn't assigned yet. This will cause a NULL ptr deref and a kernel BUG. The path I was looking at is in inotify_new_group(): oevent = kmalloc(sizeof(struct inotify_event_info), GFP_KERNEL); if (unlikely(!oevent)) { fsnotify_destroy_group(group); return ERR_PTR(-ENOMEM); } fsnotify_destroy_group() would get called here, but group->inotify_data.user is only getting assigned later: group->inotify_data.user = get_current_user(); Signed-off-by: Sasha Levin <[email protected]> Cc: John McCutchan <[email protected]> Cc: Robert Love <[email protected]> Cc: Eric Paris <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions