Re: [PATCH net] drivers/net/wan/x25_asy: Added needed_headroom and a skb->len check
From: David Miller
Date: Tue Aug 11 2020 - 13:32:32 EST
From: Xie He <xie.he.0141@xxxxxxxxx>
Date: Sat, 8 Aug 2020 19:35:48 -0700
> 1. Added a skb->len check
>
> This driver expects upper layers to include a pseudo header of 1 byte
> when passing down a skb for transmission. This driver will read this
> 1-byte header. This patch added a skb->len check before reading the
> header to make sure the header exists.
>
> 2. Added needed_headroom
>
> When this driver transmits data,
> first this driver will remove a pseudo header of 1 byte,
> then the lapb module will prepend the LAPB header of 2 or 3 bytes.
> So the value of needed_headroom in this driver should be 3 - 1.
>
> Cc: Willem de Bruijn <willemdebruijn.kernel@xxxxxxxxx>
> Cc: Martin Schiller <ms@xxxxxxxxxx>
> Signed-off-by: Xie He <xie.he.0141@xxxxxxxxx>
Applied, thank you.