Bug 41212
Summary: | [regression] [3.1-git] ipoib causes kernel panic (NULL pointer dereference) | ||
---|---|---|---|
Product: | Networking | Reporter: | Bernd Schubert (bernd.schubert) |
Component: | Other | Assignee: | Arnaldo Carvalho de Melo (acme) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | davem, florian, linux-rdma, maciej.rutecki, rjw |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.1-git | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 40982 | ||
Attachments: |
Patch to fix the problem.
Rename 'n' into something more sane. |
Description
Bernd Schubert
2011-08-15 15:40:52 UTC
(gdb) l *(ipoib_start_xmit+0x39) 0x1d19 is in ipoib_start_xmit (include/net/dst.h:91). 86 }; 87 }; 88 89 static inline struct neighbour *dst_get_neighbour(struct dst_entry *dst) 90 { 91 return rcu_dereference(dst->_neighbour); 92 } 93 94 static inline struct neighbour *dst_get_neighbour_raw(struct dst_entry *dst) 95 { Seems to causes by commit 69cce1d1404968f78b177a0314f5822d5afdbbfb. After resolving dev_hard_start_xmit+0x2a0 and then checking where .ndo_start_xmit is set in ipob, I see it happens in ipoib_start_xmit(). While I'm not familiar with that code at all, the right fix seems to be to test for likely(skb_dst(skb) and only then to n = dst_get_neighbour(skb_dst(skb)) Btw, would it possibly not to use single variable letters? Just checking where 'n' is used, is horrible, as searching the code for a single letter does not work well. Thanks, Bernd Created attachment 68942 [details]
Patch to fix the problem.
Created attachment 68952 [details]
Rename 'n' into something more sane.
Could someone please also check the usage of likely()? As I'm running into an unlikely() condition, maybe it is not that unlikely? Thanks, Bernd Can you submit that patch from comment #3 for review to netdev@vger.kernel.org please? and cc the relevant maintainers/mailinglists (scripts/get_maintainer.pl will help you there) I already sent the patch today to netdev and linux-rdma Cheers, Bernd Fixed by commit 22cfb0bf6721bb1f865f67bc21e3c36c272faf36. Thx. |