dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers/infiniband/ulp/ipoib
Shlomo Pongratz 7e5a90c25f IPoIB: Fix crash due to skb double destruct
After commit b13912bbb4 ("IPoIB: Call skb_dst_drop() once skb is
enqueued for sending"), using connected mode and running multithreaded
iperf for long time, ie

    iperf -c <IP> -P 16 -t 3600

results in a crash.

After the above-mentioned patch, the driver is calling skb_orphan() and
skb_dst_drop() after calling post_send() in ipoib_cm.c::ipoib_cm_send()
(also in ipoib_ib.c::ipoib_send())

The problem with this is, as is written in a comment in both routines,
"it's entirely possible that the completion handler will run before we
execute anything after the post_send()."  This leads to running the
skb cleanup routines simultaneously in two different contexts.

The solution is to always perform the skb_orphan() and skb_dst_drop()
before queueing the send work request.  If an error occurs, then it
will be no different than the regular case where dev_free_skb_any() in
the completion path, which is assumed to be after these two routines.

Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2013-02-05 09:35:06 -08:00
..
Kconfig
Makefile IB/ipoib: Add rtnl_link_ops support 2012-09-20 16:49:17 -04:00
ipoib.h IPoIB: Fix build with CONFIG_INFINIBAND_IPOIB_CM=n 2012-10-02 21:33:41 -07:00
ipoib_cm.c IPoIB: Fix crash due to skb double destruct 2013-02-05 09:35:06 -08:00
ipoib_ethtool.c
ipoib_fs.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
ipoib_ib.c IPoIB: Fix crash due to skb double destruct 2013-02-05 09:35:06 -08:00
ipoib_main.c IPoIB: Fix build with CONFIG_INFINIBAND_IPOIB_CM=n 2012-10-02 21:33:41 -07:00
ipoib_multicast.c IPoIB: Fix use-after-free of multicast object 2012-09-30 20:32:33 -07:00
ipoib_netlink.c IB/ipoib: Add more rtnl_link_ops callbacks 2012-10-01 17:12:22 -04:00
ipoib_verbs.c
ipoib_vlan.c IB/ipoib: Add more rtnl_link_ops callbacks 2012-10-01 17:12:22 -04:00