]> git.baikalelectronics.ru Git - kernel.git/commit
IPoIB: Fix possible NULL dereference in ipoib_start_xmit()
authorBernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Tue, 16 Aug 2011 10:56:54 +0000 (10:56 +0000)
committerRoland Dreier <roland@purestorage.com>
Tue, 16 Aug 2011 17:19:20 +0000 (10:19 -0700)
commit4485cb15d8835e559c410a88a1e51d2e7b20d1a9
treed70baecd0e7aa0e63cafa82178a16a39587df7cb
parent9e10edc900254f4f9daf9d38cac9f78166dcb7bd
IPoIB: Fix possible NULL dereference in ipoib_start_xmit()

Fix a bug introduced in cec624b10930 ("net: Abstract dst->neighbour
accesses behind helpers.") where we might dereference skb_dst(skb)
even if it is NULL, which causes:

    [  240.944030] BUG: unable to handle kernel NULL pointer dereference at 0000000000000040
    [  240.948007] IP: [<ffffffffa0366ce9>] ipoib_start_xmit+0x39/0x280 [ib_ipoib]
    [...]
    [  240.948007] Call Trace:
    [  240.948007]  <IRQ>
    [  240.948007]  [<ffffffff812cd5e0>] dev_hard_start_xmit+0x2a0/0x590
    [  240.948007]  [<ffffffff8131f680>] ? arp_create+0x70/0x200
    [  240.948007]  [<ffffffff812e8e1f>] sch_direct_xmit+0xef/0x1c0

Addresses: https://bugzilla.kernel.org/show_bug.cgi?id=41212
Signed-off-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/ipoib/ipoib_main.c