summaryrefslogtreecommitdiff
path: root/ipc/syscall.c
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2014-03-26 14:32:51 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-14 06:42:18 -0700
commit2d4cf3d6f36d88d30ce2186179fe2aa7e5c06c2e (patch)
tree8fca4885f0f99968cb2bbf2482833639e40d71a3 /ipc/syscall.c
parent8d4508813521a6e1abaab86a8525c29e91483cf0 (diff)
downloadlinux-3.10-2d4cf3d6f36d88d30ce2186179fe2aa7e5c06c2e.tar.gz
linux-3.10-2d4cf3d6f36d88d30ce2186179fe2aa7e5c06c2e.tar.bz2
linux-3.10-2d4cf3d6f36d88d30ce2186179fe2aa7e5c06c2e.zip
usbnet: include wait queue head in device structure
[ Upstream commit 14a0d635d18d0fb552dcc979d6d25106e6541f2e ] This fixes a race which happens by freeing an object on the stack. Quoting Julius: > The issue is > that it calls usbnet_terminate_urbs() before that, which temporarily > installs a waitqueue in dev->wait in order to be able to wait on the > tasklet to run and finish up some queues. The waiting itself looks > okay, but the access to 'dev->wait' is totally unprotected and can > race arbitrarily. I think in this case usbnet_bh() managed to succeed > it's dev->wait check just before usbnet_terminate_urbs() sets it back > to NULL. The latter then finishes and the waitqueue_t structure on its > stack gets overwritten by other functions halfway through the > wake_up() call in usbnet_bh(). The fix is to just not allocate the data structure on the stack. As dev->wait is abused as a flag it also takes a runtime PM change to fix this bug. Signed-off-by: Oliver Neukum <oneukum@suse.de> Reported-by: Grant Grundler <grundler@google.com> Tested-by: Grant Grundler <grundler@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'ipc/syscall.c')
0 files changed, 0 insertions, 0 deletions