]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: also point GSO head_skb to the sk when it's available
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Sat, 23 Jul 2016 03:33:44 +0000 (00:33 -0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Jul 2016 18:23:27 +0000 (11:23 -0700)
commit80b9447c1b8a4a87af4ad84abfc1a0c74e75cfa6
tree19f8eb666ef960c901e3837a5b183370d53b926b
parent873d07d0f8a2d6a6fe23149b4c666425c67f37ed
sctp: also point GSO head_skb to the sk when it's available

The head skb for GSO packets won't travel through the inner depths of
SCTP stack as it doesn't contain any chunks on it. That means skb->sk
doesn't get set and then when sctp_recvmsg() calls
sctp_inet6_skb_msgname() on the head_skb it panics, as this last needs
to check flags at the socket (sp->v4mapped).

The fix is to initialize skb->sk for th head skb once we are able to do
it. That is, when the first chunk is processed.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/ulpevent.c