From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Nathan Huckleberry <nhuck@google.com>,
Dan Carpenter <error27@gmail.com>,
llvm@lists.linux.dev, Nathan Chancellor <nathan@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Sasha Levin <sashal@kernel.org>,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
ndesaulniers@google.com, khalasa@piap.pl,
thomas.lendacky@amd.com, shayagr@amazon.com,
wsa+renesas@sang-engineering.com, dmitry.torokhov@gmail.com,
netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 4.14 12/23] net: davicom: Fix return type of dm9000_start_xmit
Date: Sun, 9 Oct 2022 18:25:42 -0400 [thread overview]
Message-ID: <20221009222557.1219968-12-sashal@kernel.org> (raw)
In-Reply-To: <20221009222557.1219968-1-sashal@kernel.org>
From: Nathan Huckleberry <nhuck@google.com>
[ Upstream commit 0191580b000d50089a0b351f7cdbec4866e3d0d2 ]
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 dm9000_start_xmit should be changed from int to
netdev_tx_t.
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/1703
Cc: llvm@lists.linux.dev
Signed-off-by: Nathan Huckleberry <nhuck@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20220912194722.809525-1-nhuck@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/davicom/dm9000.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c
index 8b07890b0b23..833e27ce4a57 100644
--- a/drivers/net/ethernet/davicom/dm9000.c
+++ b/drivers/net/ethernet/davicom/dm9000.c
@@ -1025,7 +1025,7 @@ static void dm9000_send_packet(struct net_device *dev,
* Hardware start transmission.
* Send a packet to media from the upper layer.
*/
-static int
+static netdev_tx_t
dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
unsigned long flags;
--
2.35.1
next prev parent reply other threads:[~2022-10-09 22:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-09 22:25 [PATCH AUTOSEL 4.14 01/23] wifi: brcmfmac: fix invalid address access when enabling SCAN log level Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 02/23] openvswitch: Fix double reporting of drops in dropwatch Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 03/23] openvswitch: Fix overreporting " Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 04/23] tcp: annotate data-race around tcp_md5sig_pool_populated Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 05/23] wifi: ath9k: avoid uninit memory read in ath9k_htc_rx_msg() Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 06/23] xfrm: Update ipcomp_scratches with NULL when freed Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 07/23] net: xscale: Fix return type for implementation of ndo_start_xmit Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 08/23] net: lantiq_etop: " Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 09/23] net: ftmac100: fix endianness-related issues from 'sparse' Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 10/23] wifi: brcmfmac: fix use-after-free bug in brcmf_netdev_start_xmit() Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 11/23] Bluetooth: L2CAP: initialize delayed works at l2cap_chan_create() Sasha Levin
2022-10-09 22:25 ` Sasha Levin [this message]
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 13/23] net: ethernet: ti: davinci_emac: Fix return type of emac_dev_xmit Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 14/23] net: korina: Fix return type of korina_send_packet Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 15/23] Bluetooth: hci_sysfs: Fix attempting to call device_add multiple times Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 16/23] can: bcm: check the result of can_send() in bcm_can_tx() Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 17/23] wifi: rt2x00: don't run Rt5592 IQ calibration on MT7620 Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 18/23] wifi: rt2x00: set correct TX_SW_CFG1 MAC register for MT7620 Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 19/23] wifi: rt2x00: set SoC wmac clock register Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 20/23] wifi: rt2x00: correctly set BBP register 86 for MT7620 Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 21/23] net: If sock is dead don't access sock's sk_wq in sk_stream_wait_memory Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 22/23] Bluetooth: L2CAP: Fix user-after-free Sasha Levin
2022-10-09 22:25 ` [PATCH AUTOSEL 4.14 23/23] r8152: Rate limit overflow messages Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221009222557.1219968-12-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=dmitry.torokhov@gmail.com \
--cc=edumazet@google.com \
--cc=error27@gmail.com \
--cc=khalasa@piap.pl \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
--cc=nhuck@google.com \
--cc=pabeni@redhat.com \
--cc=shayagr@amazon.com \
--cc=stable@vger.kernel.org \
--cc=thomas.lendacky@amd.com \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®