]> 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)
commit0746cbffbba4c953a7e617688c24a38c2ee30552
tree0d0a4d141ac1a69b4d021dc56c7a5249662d7114
parent03f7b1a749d5804855e45f3329177719336c7d64
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