]> git.baikalelectronics.ru Git - kernel.git/commit
sh_eth: Fix skb alloc size and alignment adjust rule.
authorMitsuhiro Kimura <mitsuhiro.kimura.kc@renesas.com>
Thu, 27 Nov 2014 11:34:00 +0000 (20:34 +0900)
committerDavid S. Miller <davem@davemloft.net>
Sun, 30 Nov 2014 05:09:38 +0000 (21:09 -0800)
commit47d0d0e531d8c9097e34f21c37740353b747a2b9
tree0d0a4d141ac1a69b4d021dc56c7a5249662d7114
parent8663db0f268d1a71d9f4bb6beefeeb458e6e7031
sh_eth: Fix skb alloc size and alignment adjust rule.

In the current driver, allocation size of skb does not care the alignment
adjust after allocation.
And also, in the current implementation, buffer alignment method by
sh_eth_set_receive_align function has a bug that this function displace
buffer start address forcedly when the alignment is corrected.
In the result, tail of the skb will exceed allocated area and kernel panic
will be occurred.
This patch fix this issue.

Signed-off-by: Mitsuhiro Kimura <mitsuhiro.kimura.kc@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c
drivers/net/ethernet/renesas/sh_eth.h