All of lore.kernel.org
 help / color / mirror / Atom feed
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, geoff@infradead.org, mw@semihalf.com,
	dmitry.torokhov@gmail.com, wsa+renesas@sang-engineering.com,
	netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 4.19 12/25] net: davicom: Fix return type of dm9000_start_xmit
Date: Sun,  9 Oct 2022 18:24:17 -0400	[thread overview]
Message-ID: <20221009222436.1219411-12-sashal@kernel.org> (raw)
In-Reply-To: <20221009222436.1219411-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


  parent reply	other threads:[~2022-10-09 22:25 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-09 22:24 [PATCH AUTOSEL 4.19 01/25] wifi: brcmfmac: fix invalid address access when enabling SCAN log level Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 02/25] openvswitch: Fix double reporting of drops in dropwatch Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 03/25] openvswitch: Fix overreporting " Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 04/25] tcp: annotate data-race around tcp_md5sig_pool_populated Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 05/25] wifi: ath9k: avoid uninit memory read in ath9k_htc_rx_msg() Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 06/25] xfrm: Update ipcomp_scratches with NULL when freed Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 07/25] net: xscale: Fix return type for implementation of ndo_start_xmit Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 08/25] net: lantiq_etop: " Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 09/25] net: ftmac100: fix endianness-related issues from 'sparse' Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 10/25] wifi: brcmfmac: fix use-after-free bug in brcmf_netdev_start_xmit() Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 11/25] Bluetooth: L2CAP: initialize delayed works at l2cap_chan_create() Sasha Levin
2022-10-09 22:24 ` Sasha Levin [this message]
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 13/25] net: ethernet: ti: davinci_emac: Fix return type of emac_dev_xmit Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 14/25] net: korina: Fix return type of korina_send_packet Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 15/25] Bluetooth: hci_sysfs: Fix attempting to call device_add multiple times Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 16/25] wifi: ath10k: reset pointer after memory free to avoid potential use-after-free Sasha Levin
2022-10-09 22:24   ` Sasha Levin
2022-10-18  9:53   ` Pavel Machek
2022-10-18  9:53     ` Pavel Machek
2022-10-18 11:10     ` Greg KH
2022-10-18 11:10       ` Greg KH
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 17/25] can: bcm: check the result of can_send() in bcm_can_tx() Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 18/25] wifi: rt2x00: don't run Rt5592 IQ calibration on MT7620 Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 19/25] wifi: rt2x00: set correct TX_SW_CFG1 MAC register for MT7620 Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 20/25] wifi: rt2x00: set SoC wmac clock register Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 21/25] wifi: rt2x00: correctly set BBP register 86 for MT7620 Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 22/25] net: If sock is dead don't access sock's sk_wq in sk_stream_wait_memory Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 23/25] Bluetooth: L2CAP: Fix user-after-free Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 24/25] libbpf: Fix overrun in netlink attribute iteration Sasha Levin
2022-10-09 22:24 ` [PATCH AUTOSEL 4.19 25/25] 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=20221009222436.1219411-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=geoff@infradead.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mw@semihalf.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhuck@google.com \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.