diff options
| author | Xie He <xie.he.0141@gmail.com> | 2020-07-05 17:45:21 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-31 16:43:12 +0200 |
| commit | bbf9ed1c6aa51a5517b3f00fc81f5bac0c53628e (patch) | |
| tree | 971574dde786d63e1c085cbea6d22bd51c5cda9e /include/linux | |
| parent | 8a0f6e6d2252ff938af94fcc8404fc4ac21de2a1 (diff) | |
drivers/net/wan/lapbether: Fixed the value of hard_header_len
[ Upstream commit 9dc829a135fb5927f1519de11286e2bbb79f5b66 ]
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,
then this driver will prepend a length field of 2 bytes,
then the underlying Ethernet device will prepend its own header.
So, the header length required should be:
-1 + 3 + 2 + "the header length needed by the underlying device".
This patch fixes kernel panic when this driver is used with AF_PACKET
SOCK_DGRAM sockets.
Signed-off-by: Xie He <xie.he.0141@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
