OSDN Git Service

arcnet: provide a buffer big enough to actually receive packets
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 20 Sep 2019 14:08:21 +0000 (16:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 10:27:41 +0000 (12:27 +0200)
commitd7065a5e68efd4ed633ccd8d2333f067e2e51101
treeb972adb8aa9e6b1f93eb31bc71c68fffd6092402
parente76fb5f7e8b9d5a80b928a2df8c86521c7963aeb
arcnet: provide a buffer big enough to actually receive packets

[ Upstream commit 108639aac35eb57f1d0e8333f5fc8c7ff68df938 ]

struct archdr is only big enough to hold the header of various types of
arcnet packets. So to provide enough space to hold the data read from
hardware provide a buffer large enough to hold a packet with maximal
size.

The problem was noticed by the stack protector which makes the kernel
oops.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/arcnet/arcnet.c