From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] sctp: reset ret in again path in sctp_for_each_transport Date: Tue, 23 Jan 2018 11:22:46 -0500 (EST) Message-ID: <20180123.112246.308462044491465065.davem@davemloft.net> References: <07dcfcd8098979f6693426fd562867ffa67dd65b.1516702945.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]:55326 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751290AbeAWQWr (ORCPT ); Tue, 23 Jan 2018 11:22:47 -0500 In-Reply-To: <07dcfcd8098979f6693426fd562867ffa67dd65b.1516702945.git.lucien.xin@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Xin Long Date: Tue, 23 Jan 2018 18:22:25 +0800 > Commit 97a6ec4ac021 ("rhashtable: Change rhashtable_walk_start to > return void") only initialized ret for the first time, when going > to again path, the next tsp could be NULL. Without resetting ret, > cb_done would be called with tsp as NULL. > > A kernel crash was caused by this when running sctpdiag testcase > in sctp-tests. > > Note that this issue doesn't affect net.git yet. > > Fixes: 97a6ec4ac021 ("rhashtable: Change rhashtable_walk_start to return void") > Signed-off-by: Xin Long Applied, thanks.