From: Marc Kleine-Budde <mkl@pengutronix.de> Date: 2021-09-07 06:52:59
Hello Jakub, hello David,
this is a pull request of 2 patches for net/master.
The first patch is by my and silences a warning in the rcar_canfd
driver, if it's compiled with CONFIG_OF disabled.
Tong Zhang's patch fixes a null-ptr-deref in the c_can driver's
ethtool drvinfo function, for non platform bus based c_can devices.
regards,
Marc
---
The following changes since commit b539c44df067ac116ec1b58b956efda51b6a7fc1:
net: wwan: iosm: Unify IO accessors used in the driver (2021-09-06 16:45:30 +0100)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git tags/linux-can-fixes-for-5.15-20210907
for you to fetch changes up to 644d0a5bcc3361170d84fb8d0b13943c354119db:
can: c_can: fix null-ptr-deref on ioctl() (2021-09-07 08:46:58 +0200)
----------------------------------------------------------------
linux-can-fixes-for-5.15-20210907
----------------------------------------------------------------
Marc Kleine-Budde (1):
can: rcar_canfd: add __maybe_unused annotation to silence warning
Tong Zhang (1):
can: c_can: fix null-ptr-deref on ioctl()
drivers/net/can/c_can/c_can_ethtool.c | 4 +---
drivers/net/can/rcar/rcar_canfd.c | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
From: Marc Kleine-Budde <mkl@pengutronix.de> Date: 2021-09-07 06:53:02
From: Tong Zhang <redacted>
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 should
match dev_name() string, so I am replacing this with dev_name() to 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")
Link: https://lore.kernel.org/r/20210906233704.1162666-1-ztong0001@gmail.com
Cc: stable@vger.kernel.org # 5.14+
Signed-off-by: Tong Zhang <redacted>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/c_can/c_can_ethtool.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
From: Marc Kleine-Budde <mkl@pengutronix.de> Date: 2021-09-07 06:53:02
Since commit
| dd3bd23eb438 ("can: rcar_canfd: Add Renesas R-Car CAN FD driver")
the rcar_canfd driver can be compile tested on all architectures. On
non OF enabled archs, or archs where OF is optional (and disabled in
the .config) the compilation throws the following warning:
| drivers/net/can/rcar/rcar_canfd.c:2020:34: warning: unused variable 'rcar_canfd_of_table' [-Wunused-const-variable]
| static const struct of_device_id rcar_canfd_of_table[] = {
| ^
This patch fixes the warning by marking the variable
rcar_canfd_of_table as __maybe_unused.
Fixes: ac4224087312 ("can: rcar: Kconfig: Add helper dependency on COMPILE_TEST")
Fixes: dd3bd23eb438 ("can: rcar_canfd: Add Renesas R-Car CAN FD driver")
Link: https://lore.kernel.org/all/20210907064537.1054268-1-mkl@pengutronix.de
Cc: linux-renesas-soc@vger.kernel.org
Cc: Cai Huoqing <redacted>
Reported-by: kernel test robot <redacted>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/rcar/rcar_canfd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Hello:
This pull request was applied to netdev/net.git (refs/heads/master):
On Tue, 7 Sep 2021 08:52:50 +0200 you wrote:
Hello Jakub, hello David,
this is a pull request of 2 patches for net/master.
The first patch is by my and silences a warning in the rcar_canfd
driver, if it's compiled with CONFIG_OF disabled.
[...]