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 AB7675C97 for ; Sun, 9 Oct 2022 22:17:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07171C433B5; Sun, 9 Oct 2022 22:17:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665353852; bh=qd2i4tybodrnYJgJ/z55dTiwmf1DCHNDvw1vSahM3EU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p4iirJwZjMorK8XyQFU11KvJa1iCwkaWKRD1suDcAbZN2EHe4GGucfT+YKwVSMHVJ O83X3sau32+jOyv/UOitQtjDyJL7XkBH1siS4JNyrUkI5TbGIYzdlClLitHe02a9KM inE+C3D0+V438GS4PflMlM5Z5c7I4ge/WPuPepdFZtbWI54Hsr5SdflrfeIsgQHz+g /AHCseDMxiQYcuQpd+fAZkEfYykxJHAYy/l0n+9VRJalb8WaASuUJX1Jh80dslMKz9 Sh3i19/01RtZmPlYTAg6uh5RIXUcT6cm7BKWdDAiE0s0ZXEcz1IGoU3cSbJ62m2r3+ G3m3LKgjLXJ/A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Huckleberry , Dan Carpenter , llvm@lists.linux.dev, Lukasz Stelmach , Jakub Kicinski , Sasha Levin , davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, nathan@kernel.org, ndesaulniers@google.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.19 42/73] net: ax88796c: Fix return type of ax88796c_start_xmit Date: Sun, 9 Oct 2022 18:14:20 -0400 Message-Id: <20221009221453.1216158-42-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221009221453.1216158-1-sashal@kernel.org> References: <20221009221453.1216158-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Nathan Huckleberry [ Upstream commit fcb7c210a24209ea8f6f32593580b57f52382ec2 ] The ndo_start_xmit field in net_device_ops is expected to be of type netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb, struct net_device *dev). The mismatched return type breaks forward edge kCFI since the underlying function definition does not match the function hook definition. The return type of ax88796c_start_xmit should be changed from int to netdev_tx_t. Reported-by: Dan Carpenter Link: https://github.com/ClangBuiltLinux/linux/issues/1703 Cc: llvm@lists.linux.dev Signed-off-by: Nathan Huckleberry Acked-by: Lukasz Stelmach Link: https://lore.kernel.org/r/20220912194031.808425-1-nhuck@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/asix/ax88796c_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/asix/ax88796c_main.c b/drivers/net/ethernet/asix/ax88796c_main.c index 6ba5b024a7be..f1d610efd69e 100644 --- a/drivers/net/ethernet/asix/ax88796c_main.c +++ b/drivers/net/ethernet/asix/ax88796c_main.c @@ -381,7 +381,7 @@ static int ax88796c_hard_xmit(struct ax88796c_device *ax_local) return 1; } -static int +static netdev_tx_t ax88796c_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct ax88796c_device *ax_local = to_ax88796c_device(ndev); -- 2.35.1