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)
commit4d6a949c62f123569fb355b6ec7f314b76f93735
tree0d0a4d141ac1a69b4d021dc56c7a5249662d7114
parente0ebde0e131b529fd721b24f62872def5ec3718c
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