summaryrefslogtreecommitdiff
path: root/REPORTING-BUGS
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2012-08-30 11:01:30 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-07 19:39:35 +0400
commite3052eb712da474b11f43b1ec602c22b885b5403 (patch)
treeb9e86c36d72b7a87e259fbe384ce9ec8ada87ec4 /REPORTING-BUGS
parent1c4fc5e51d50f5da0b84bed2204046529b19db8a (diff)
downloadlinux-e3052eb712da474b11f43b1ec602c22b885b5403.tar.xz
IPoIB: Fix use-after-free of multicast object
commit bea1e22df494a729978e7f2c54f7bda328f74bc3 upstream. Fix a crash in ipoib_mcast_join_task(). (with help from Or Gerlitz) Commit c8c2afe360b7 ("IPoIB: Use rtnl lock/unlock when changing device flags") added a call to rtnl_lock() in ipoib_mcast_join_task(), which is run from the ipoib_workqueue, and hence the workqueue can't be flushed from the context of ipoib_stop(). In the current code, ipoib_stop() (which doesn't flush the workqueue) calls ipoib_mcast_dev_flush(), which goes and deletes all the multicast entries. This takes place without any synchronization with a possible running instance of ipoib_mcast_join_task() for the same ipoib device, leading to a crash due to NULL pointer dereference. Fix this by making sure that the workqueue is flushed before ipoib_mcast_dev_flush() is called. To make that possible, we move the RTNL-lock wrapped code to ipoib_mcast_join_finish(). Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'REPORTING-BUGS')
0 files changed, 0 insertions, 0 deletions