]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
tuntap: properly align skb->head before building skb
authorJason Wang <jasowang@redhat.com>
Fri, 27 Oct 2017 03:05:44 +0000 (11:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 28 Oct 2017 10:05:28 +0000 (19:05 +0900)
commit63b9ab65bd76e5de6479bb14b4014b64aa1a317a
tree3822be64ed1349f2d394198b022fe482ddaa47e7
parent8ab190fbe96178449d8195c3582aa10ce684c386
tuntap: properly align skb->head before building skb

An unaligned alloc_frag->offset caused by previous allocation will
result an unaligned skb->head. This will lead unaligned
skb_shared_info and then unaligned dataref which requires to be
aligned for accessing on some architecture. Fix this by aligning
alloc_frag->offset before the frag refilling.

Fixes: 0bbd7dad34f8 ("tun: make tun_build_skb() thread safe")
Cc: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Wei Wei <dotweiba@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Reported-by: Wei Wei <dotweiba@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c