From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] sctp: use right member as the param of list_for_each_entry Date: Tue, 28 Nov 2017 15:56:19 -0500 (EST) Message-ID: <20171128.155619.1927237670822390286.davem@davemloft.net> References: <4c3e5049eae1f90d5b74588fa0e115393a173056.1511700966.git.lucien.xin@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org, marcelo.leitner@gmail.com, nhorman@tuxdriver.com To: lucien.xin@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:48076 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751822AbdK1U4V (ORCPT ); Tue, 28 Nov 2017 15:56:21 -0500 In-Reply-To: <4c3e5049eae1f90d5b74588fa0e115393a173056.1511700966.git.lucien.xin@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Xin Long Date: Sun, 26 Nov 2017 20:56:07 +0800 > Commit d04adf1b3551 ("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: d04adf1b3551 ("sctp: reset owner sk for data chunks on out queues when migrating a sock") > Signed-off-by: Xin Long Applied and queued up for -stable.