From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Tong Zhang <ztong0001@gmail.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Dario Binacchi <dariobin@libero.it>,
linux-can@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] can: c_can: fix null-ptr-deref on ioctl()
Date: Tue, 7 Sep 2021 08:38:59 +0200 [thread overview]
Message-ID: <20210907063859.llgedf5wc4n4rc73@pengutronix.de> (raw)
In-Reply-To: <20210906233704.1162666-1-ztong0001@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]
On 06.09.2021 16:37:02, Tong Zhang wrote:
> the pdev maybe not a platform device, e.g. c_can_pci device,
> in this case, calling to_platform_device() would not make sense.
> Also, per the comment in drivers/net/can/c_can/c_can_ethtool.c, @bus_info
> sould match dev_name() string, so I am replacing this with dev_name() to
^^^^^
should
Fixed while applying.
> fix this issue.
>
> [ 1.458583] BUG: unable to handle page fault for address: 0000000100000000
> [ 1.460921] RIP: 0010:strnlen+0x1a/0x30
> [ 1.466336] ? c_can_get_drvinfo+0x65/0xb0 [c_can]
> [ 1.466597] ethtool_get_drvinfo+0xae/0x360
> [ 1.466826] dev_ethtool+0x10f8/0x2970
> [ 1.467880] sock_ioctl+0xef/0x300
>
> Fixes: 2722ac986e93 ("can: c_can: add ethtool support")
> Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Applied to linux-can/testing + added stable on Cc.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2021-09-07 6:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-06 23:37 [PATCH v1] can: c_can: fix null-ptr-deref on ioctl() Tong Zhang
2021-09-07 6:38 ` Marc Kleine-Budde [this message]
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=20210907063859.llgedf5wc4n4rc73@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=andrew@lunn.ch \
--cc=dariobin@libero.it \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wg@grandegger.com \
--cc=ztong0001@gmail.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;
as well as URLs for NNTP newsgroup(s).