diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2015-12-04 01:45:40 +0300 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2016-01-05 20:04:00 +0300 |
commit | c5895ca00c9708b3f7af6628742ddad48f646080 (patch) | |
tree | 34a1c35ddff6df6f7ee0e763f1a84213ec20c972 /include/net | |
parent | 0295617f822f630711f5af03316d3cbda6e737d4 (diff) | |
download | linux-c5895ca00c9708b3f7af6628742ddad48f646080.tar.xz |
sh_eth: fix kernel oops in skb_put()
[ Upstream commit 248be83dcb3feb3f6332eb3d010a016402138484 ]
In a low memory situation the following kernel oops occurs:
Unable to handle kernel NULL pointer dereference at virtual address 00000050
pgd = 8490c000
[00000050] *pgd=4651e831, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT ARM
Modules linked in:
CPU: 0 Not tainted (3.4-at16 #9)
PC is at skb_put+0x10/0x98
LR is at sh_eth_poll+0x2c8/0xa10
pc : [<8035f780>] lr : [<8028bf50>] psr: 60000113
sp : 84eb1a90 ip : 84eb1ac8 fp : 84eb1ac4
r10: 0000003f r9 : 000005ea r8 : 00000000
r7 : 00000000 r6 : 940453b0 r5 : 00030000 r4 : 9381b180
r3 : 00000000 r2 : 00000000 r1 : 000005ea r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c53c7d Table: 4248c059 DAC: 00000015
Process klogd (pid: 2046, stack limit = 0x84eb02e8)
[...]
This is because netdev_alloc_skb() fails and 'mdp->rx_skbuff[entry]' is left
NULL but sh_eth_rx() later uses it without checking. Add such check...
Reported-by: Yasushi SHOJI <yashi@atmark-techno.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'include/net')
0 files changed, 0 insertions, 0 deletions