]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: use right member as the param of list_for_each_entry
authorXin Long <lucien.xin@gmail.com>
Sun, 26 Nov 2017 12:56:07 +0000 (20:56 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Nov 2017 20:55:44 +0000 (15:55 -0500)
commit7f37826212da799bbc36d3f496ef07c86cbd78e6
treeed77ddc6748e76f18d5df0874c8a5124877aab14
parentd663ac92083f54b9fd5154eb70ebaf555f6aded0
sctp: use right member as the param of list_for_each_entry

Commit de6434116dca ("sctp: reset owner sk for data chunks on out queues
when migrating a sock") made a mistake that using 'list' as the param of
list_for_each_entry to traverse the retransmit, sacked and abandoned
queues, while chunks are using 'transmitted_list' to link into these
queues.

It could cause NULL dereference panic if there are chunks in any of these
queues when peeling off one asoc.

So use the chunk member 'transmitted_list' instead in this patch.

Fixes: de6434116dca ("sctp: reset owner sk for data chunks on out queues when migrating a sock")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/socket.c