mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
net: use common macro for assering skb->cb[] available size in protocol families
As part of an effort to move skb->dropcount to skb->cb[] use a common macro in protocol families using skb->cb[] for ancillary data to validate available room in skb->cb[]. Signed-off-by: Eyal Birger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
2472d7613b
commit
b4772ef879
9 changed files with 13 additions and 14 deletions
|
|
@ -1816,8 +1816,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
|
|||
skb = nskb;
|
||||
}
|
||||
|
||||
BUILD_BUG_ON(sizeof(*PACKET_SKB_CB(skb)) + MAX_ADDR_LEN - 8 >
|
||||
sizeof(skb->cb));
|
||||
sock_skb_cb_check_size(sizeof(*PACKET_SKB_CB(skb)) + MAX_ADDR_LEN - 8);
|
||||
|
||||
sll = &PACKET_SKB_CB(skb)->sa.ll;
|
||||
sll->sll_hatype = dev->type;
|
||||
|
|
|
|||
Loading…
Reference in a new issue