From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] sctp: reinit stream if stream outcnt has been change by sinit in sendmsg Date: Tue, 16 Jan 2018 14:20:57 -0500 (EST) Message-ID: <20180116.142057.1449511465809553791.davem@davemloft.net> References: <1330acc7e606c50a26e7f972eb9875da82ad8ce9.1516006879.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]:58226 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750892AbeAPTVB (ORCPT ); Tue, 16 Jan 2018 14:21:01 -0500 In-Reply-To: <1330acc7e606c50a26e7f972eb9875da82ad8ce9.1516006879.git.lucien.xin@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Xin Long Date: Mon, 15 Jan 2018 17:01:19 +0800 > After introducing sctp_stream structure, sctp uses stream->outcnt as the > out stream nums instead of c.sinit_num_ostreams. > > However when users use sinit in cmsg, it only updates c.sinit_num_ostreams > in sctp_sendmsg. At that moment, stream->outcnt is still using previous > value. If it's value is not updated, the sinit_num_ostreams of sinit could > not really work. > > This patch is to fix it by updating stream->outcnt and reiniting stream > if stream outcnt has been change by sinit in sendmsg. > > Fixes: a83863174a61 ("sctp: prepare asoc stream for stream reconf") > Signed-off-by: Xin Long Applied and queued up for -stable.