]> git.baikalelectronics.ru Git - kernel.git/commit
IB/rxe: Move refcounting earlier in rxe_send()
authorAndrew Boyer <andrew.boyer@dell.com>
Mon, 28 Aug 2017 20:11:49 +0000 (16:11 -0400)
committerDoug Ledford <dledford@redhat.com>
Mon, 28 Aug 2017 23:12:31 +0000 (19:12 -0400)
commitfa27056fdcaf0a6b4c7dea7fce0bc58b8b51af2f
tree563996e5504713e2d56efb81b70b237f603f5d89
parent697e638fa9793df287de7f18a08e862b6da2f663
IB/rxe: Move refcounting earlier in rxe_send()

The network stack will call nskb's destructor, rxe_skb_tx_dtor(), if the
packet gets dropped by ip_local_out()/ip6_local_out(). Thus we need to add
the QP ref before output to avoid extra dereferences during network
congestion. This could lead to unwanted destruction of the QP.

Fix up the skb_out accounting, too.

Fixes: d2b7df940a77 ("IB/rxe: Fix kernel panic from skb destructor")
Signed-off-by: Andrew Boyer <andrew.boyer@dell.com>
Acked-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_net.c