From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABF851094D for ; Mon, 19 Jun 2023 10:30:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FD4CC433C8; Mon, 19 Jun 2023 10:30:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1687170644; bh=sOiZEPsnmIolin2GEbvpYTAZfRyaCUbr0ry6XlYcJXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XdOeP3sPErAXdH12tcaKc7Uz3vDxgCz/6mRDL8nRVffKpfK9EmBCjmKhWuYHio63c cPWDfXs0uw0M6OPmAGq2M1FZOa2JzQVd0NWRIqE1kP2Exhex1FaFqyAvmnepNiKXcY JLWBmx+AXuJFedjNjO93h3InfrfRlu1JcrIX47ms= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Dan Carpenter , Xin Long , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 23/32] sctp: fix an error code in sctp_sf_eat_auth() Date: Mon, 19 Jun 2023 12:29:11 +0200 Message-ID: <20230619102128.776831969@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230619102127.461443957@linuxfoundation.org> References: <20230619102127.461443957@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Dan Carpenter [ Upstream commit 75e6def3b26736e7ff80639810098c9074229737 ] The sctp_sf_eat_auth() function is supposed to enum sctp_disposition values and returning a kernel error code will cause issues in the caller. Change -ENOMEM to SCTP_DISPOSITION_NOMEM. Fixes: 65b07e5d0d09 ("[SCTP]: API updates to suport SCTP-AUTH extensions.") Signed-off-by: Dan Carpenter Acked-by: Xin Long Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/sctp/sm_statefuns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 03434e7295eb6..80ab383d54950 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -4312,7 +4312,7 @@ enum sctp_disposition sctp_sf_eat_auth(struct net *net, SCTP_AUTH_NEWKEY, GFP_ATOMIC); if (!ev) - return -ENOMEM; + return SCTP_DISPOSITION_NOMEM; sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev)); -- 2.39.2