https://github.com/torvalds/linux
Revision 7ba1b689038726d34e3244c1ac9e2e18c2ea4787 authored by Ralf Baechle on 09 February 2017, 13:12:11 UTC, committed by David S. Miller on 10 February 2017, 18:41:13 UTC
If a USB-to-serial adapter is unplugged, the driver re-initializes, with dev->hard_header_len and dev->addr_len set to zero, instead of the correct values. If then a packet is sent through the half-dead interface, the kernel will panic due to running out of headroom in the skb when pushing for the AX.25 headers resulting in this panic: [<c0595468>] (skb_panic) from [<c0401f70>] (skb_push+0x4c/0x50) [<c0401f70>] (skb_push) from [<bf0bdad4>] (ax25_hard_header+0x34/0xf4 [ax25]) [<bf0bdad4>] (ax25_hard_header [ax25]) from [<bf0d05d4>] (ax_header+0x38/0x40 [mkiss]) [<bf0d05d4>] (ax_header [mkiss]) from [<c041b584>] (neigh_compat_output+0x8c/0xd8) [<c041b584>] (neigh_compat_output) from [<c043e7a8>] (ip_finish_output+0x2a0/0x914) [<c043e7a8>] (ip_finish_output) from [<c043f948>] (ip_output+0xd8/0xf0) [<c043f948>] (ip_output) from [<c043f04c>] (ip_local_out_sk+0x44/0x48) This patch makes mkiss behave like the 6pack driver. 6pack does not panic. In 6pack.c sp_setup() (same function name here) the values for dev->hard_header_len and dev->addr_len are set to the same values as in my mkiss patch. [ralf@linux-mips.org: Massages original submission to conform to the usual standards for patch submissions.] Signed-off-by: Thomas Osterried <thomas@osterried.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b85ea00
Tip revision: 7ba1b689038726d34e3244c1ac9e2e18c2ea4787 authored by Ralf Baechle on 09 February 2017, 13:12:11 UTC
NET: mkiss: Fix panic
NET: mkiss: Fix panic
Tip revision: 7ba1b68
File | Mode | Size |
---|---|---|
blocklayout | ||
filelayout | ||
flexfilelayout | ||
objlayout | ||
Kconfig | -rw-r--r-- | 5.9 KB |
Makefile | -rw-r--r-- | 1.3 KB |
cache_lib.c | -rw-r--r-- | 3.8 KB |
cache_lib.h | -rw-r--r-- | 1016 bytes |
callback.c | -rw-r--r-- | 10.7 KB |
callback.h | -rw-r--r-- | 5.1 KB |
callback_proc.c | -rw-r--r-- | 17.7 KB |
callback_xdr.c | -rw-r--r-- | 27.5 KB |
client.c | -rw-r--r-- | 34.2 KB |
delegation.c | -rw-r--r-- | 29.0 KB |
delegation.h | -rw-r--r-- | 2.9 KB |
dir.c | -rw-r--r-- | 64.5 KB |
direct.c | -rw-r--r-- | 28.9 KB |
dns_resolve.c | -rw-r--r-- | 10.0 KB |
dns_resolve.h | -rw-r--r-- | 812 bytes |
file.c | -rw-r--r-- | 21.7 KB |
fscache-index.c | -rw-r--r-- | 9.3 KB |
fscache.c | -rw-r--r-- | 11.9 KB |
fscache.h | -rw-r--r-- | 6.5 KB |
getroot.c | -rw-r--r-- | 3.5 KB |
inode.c | -rw-r--r-- | 58.3 KB |
internal.h | -rw-r--r-- | 23.9 KB |
io.c | -rw-r--r-- | 4.0 KB |
iostat.h | -rw-r--r-- | 1.8 KB |
mount_clnt.c | -rw-r--r-- | 12.2 KB |
namespace.c | -rw-r--r-- | 7.3 KB |
netns.h | -rw-r--r-- | 903 bytes |
nfs.h | -rw-r--r-- | 993 bytes |
nfs2super.c | -rw-r--r-- | 569 bytes |
nfs2xdr.c | -rw-r--r-- | 25.9 KB |
nfs3_fs.h | -rw-r--r-- | 1.1 KB |
nfs3acl.c | -rw-r--r-- | 8.0 KB |
nfs3client.c | -rw-r--r-- | 3.1 KB |
nfs3proc.c | -rw-r--r-- | 23.8 KB |
nfs3super.c | -rw-r--r-- | 649 bytes |
nfs3xdr.c | -rw-r--r-- | 54.9 KB |
nfs42.h | -rw-r--r-- | 804 bytes |
nfs42proc.c | -rw-r--r-- | 14.1 KB |
nfs42xdr.c | -rw-r--r-- | 15.2 KB |
nfs4_fs.h | -rw-r--r-- | 19.0 KB |
nfs4client.c | -rw-r--r-- | 34.3 KB |
nfs4file.c | -rw-r--r-- | 6.2 KB |
nfs4getroot.c | -rw-r--r-- | 1.0 KB |
nfs4idmap.c | -rw-r--r-- | 19.2 KB |
nfs4idmap.h | -rw-r--r-- | 2.7 KB |
nfs4namespace.c | -rw-r--r-- | 12.8 KB |
nfs4proc.c | -rw-r--r-- | 255.1 KB |
nfs4renewd.c | -rw-r--r-- | 4.8 KB |
nfs4session.c | -rw-r--r-- | 16.6 KB |
nfs4session.h | -rw-r--r-- | 5.0 KB |
nfs4state.c | -rw-r--r-- | 65.8 KB |
nfs4super.c | -rw-r--r-- | 8.7 KB |
nfs4sysctl.c | -rw-r--r-- | 1.4 KB |
nfs4trace.c | -rw-r--r-- | 435 bytes |
nfs4trace.h | -rw-r--r-- | 42.9 KB |
nfs4xdr.c | -rw-r--r-- | 197.7 KB |
nfsroot.c | -rw-r--r-- | 9.5 KB |
nfstrace.c | -rw-r--r-- | 292 bytes |
nfstrace.h | -rw-r--r-- | 18.0 KB |
pagelist.c | -rw-r--r-- | 33.0 KB |
pnfs.c | -rw-r--r-- | 71.8 KB |
pnfs.h | -rw-r--r-- | 23.2 KB |
pnfs_dev.c | -rw-r--r-- | 9.6 KB |
pnfs_nfs.c | -rw-r--r-- | 23.6 KB |
proc.c | -rw-r--r-- | 18.8 KB |
read.c | -rw-r--r-- | 11.5 KB |
super.c | -rw-r--r-- | 75.1 KB |
symlink.c | -rw-r--r-- | 1.8 KB |
sysctl.c | -rw-r--r-- | 1.3 KB |
unlink.c | -rw-r--r-- | 13.5 KB |
write.c | -rw-r--r-- | 55.1 KB |
Computing file changes ...