pull-request: can-next 2021-04-26
Subsystems (6)
Marc Kleine-Budde
maintainerHello Jakub, hello David,
this is a pull request of 4 patches for net-next/master.
the first two patches are from Colin Ian King and target the etas_es58x driver, they add a missing NULL pointer check and fix some typos.
The next two patches are by Erik Flodin. The first one updates the CAN documentation regarding filtering, the other one fixes the header alignment in CAN related proc output on 64 bit systems.
regards,
Marc
---
The following changes since commit b2f0ca00e6b34bd57c9298a869ea133699e8ec39:
phy: nxp-c45-tja11xx: add interrupt support (2021-04-23 14:13:16 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git tags/linux-can-next-for-5.13-20210426
for you to fetch changes up to e6b031d3c37f79d135c642834bdda7233a29db8d:
can: proc: fix rcvlist_* header alignment on 64-bit system (2021-04-25 19:43:00 +0200)
----------------------------------------------------------------
linux-can-next-for-5.13-20210426
----------------------------------------------------------------
Colin Ian King (2):
can: etas_es58x: Fix missing null check on netdev pointer
can: etas_es58x: Fix a couple of spelling mistakes
Erik Flodin (2):
can: add a note that RECV_OWN_MSGS frames are subject to filtering
can: proc: fix rcvlist_* header alignment on 64-bit system
Documentation/networking/can.rst | 2 ++ drivers/net/can/usb/etas_es58x/es58x_core.c | 4 ++-- drivers/net/can/usb/etas_es58x/es58x_core.h | 2 +- net/can/proc.c | 6 ++++-- 4 files changed, 9 insertions(+), 5 deletions(-)
Marc Kleine-Budde
maintainerPATCH 1/4 can: etas_es58x: Fix missing null check on netdev pointer
From: Colin Ian King <[email protected]>
There is an assignment to *netdev that is that can potentially be null but the null check is checking netdev and not *netdev as intended. Fix this by adding in the missing * operator.
Addresses-Coverity: ("Dereference before null check")
--- drivers/net/can/usb/etas_es58x/es58x_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/usb/etas_es58x/es58x_core.h +1 -1
@@ -625,7 +625,7 @@ static inline int es58x_get_netdev(struct es58x_device *es58x_dev,return -ECHRNG ; *netdev = es58x_dev->netdev[channel_idx]; -if (!netdev || !netif_device_present (*netdev)) +if (!*netdev || !netif_device_present (*netdev))return -ENODEV ;return 0 ;
base-commit: b2f0ca00e6b34bd57c9298a869ea133699e8ec39
Signature · 1 line
2.30.2
Marc Kleine-Budde
maintainerPATCH 2/4 can: etas_es58x: Fix a couple of spelling mistakes
In reply to Marc Kleine-BuddeFrom: Colin Ian King <[email protected]>
There are spelling mistakes in netdev_dbg and netdev_dbg messages, fix these.
--- drivers/net/can/usb/etas_es58x/es58x_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/can/usb/etas_es58x/es58x_core.c +2 -2
@@ -688,7 +688,7 @@ int es58x_rx_err_msg(struct net_device *netdev, enum es58x_err error,case ES58X_ERR_PROT_STUFF :if (net_ratelimit ()) -netdev_dbg (netdev,"Error BITSUFF\n" ); +netdev_dbg (netdev,"Error BITSTUFF\n" );if (cf) cf->data[2 ] |=CAN_ERR_PROT_STUFF ;break ;
@@ -1015,7 +1015,7 @@ int es58x_rx_cmd_ret_u32(struct net_device *netdev,int ret;netdev_warn (netdev, -"%s: channel is already opened, closing and re-openning it to reflect new configuration\n" , +"%s: channel is already opened, closing and re-opening it to reflect new configuration\n" , ret_desc); ret = ops->disable_channel (es58x_priv (netdev));if (ret)
Signature · 1 line
2.30.2
Marc Kleine-Budde
maintainerPATCH 3/4 can: add a note that RECV_OWN_MSGS frames are subject to filtering
In reply to Marc Kleine-BuddeFrom: Erik Flodin <[email protected]>
Some parts of the documentation may lead the reader to think that the socket's own frames are always received when CAN_RAW_RECV_OWN_MSGS is enabled, but all frames are subject to filtering.
As explained by Marc Kleine-Budde:
On TX complete of a CAN frame it's pushed into the RX path of the networking stack, along with the information of the originating socket.
Then the CAN frame is delivered into AF_CAN, where it is passed on to all registered receivers depending on filters. One receiver is the sending socket in CAN_RAW. Then in CAN_RAW the it is checked if the sending socket has RECV_OWN_MSGS enabled.
--- Documentation/networking/can.rst | 2 ++ 1 file changed, 2 insertions(+)
Documentation/networking/can.rst +2 -0
@@ -608,6 +608,8 @@ demand: setsockopt(s, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS, &recv_own_msgs, sizeof(recv_own_msgs)); +Note that reception of a socket's own CAN frames are subject to the same +filtering as other CAN frames (see :ref:`socketcan-rawfilter`). .. _socketcan-rawfd:
Signature · 1 line
2.30.2
Marc Kleine-Budde
maintainerPATCH 4/4 can: proc: fix rcvlist_* header alignment on 64-bit system
In reply to Marc Kleine-BuddeFrom: Erik Flodin <[email protected]>
Before this fix, the function and userdata columns weren't aligned:
device can_id can_mask function userdata matches ident vcan0 92345678 9fffffff 0000000000000000 0000000000000000 0 raw vcan0 123 00000123 0000000000000000 0000000000000000 0 raw
After the fix they are:
device can_id can_mask function userdata matches ident vcan0 92345678 9fffffff 0000000000000000 0000000000000000 0 raw vcan0 123 00000123 0000000000000000 0000000000000000 0 raw
--- net/can/proc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
net/can/proc.c +4 -2
@@ -205,8 +205,10 @@ static void can_print_recv_banner(struct seq_file *m)* can1. 00000000 00000000 00000000 * ....... 0 tp20 */ -seq_puts (m," device can_id can_mask function" -" userdata matches ident\n" ); +if (IS_ENABLED (CONFIG_64BIT )) +seq_puts (m," device can_id can_mask function userdata matches ident\n" ); +else +seq_puts (m," device can_id can_mask function userdata matches ident\n" ); }static int can_stats_proc_show (struct seq_file *m,void *v)
Signature · 1 line
2.30.2
This pull request was applied to netdev/net-next.git (refs/heads/master):
Hello:
This pull request was applied to netdev/net-next.git (refs/heads/master):
Quoted 9 lines · On Mon, 26 Apr 2021 08:54:48 +0200 you wrote:
Hello Jakub, hello David,
this is a pull request of 4 patches for net-next/master.
the first two patches are from Colin Ian King and target the
etas_es58xdriver, they add a missing NULL pointer check and fix some typos.[...]
Here is the summary with links:
- pull-request: can-next 2021-04-26
https://git.kernel.org/netdev/net-next/c/d0c5d18da2da - [net-next,2/4] can: etas_es58x: Fix a couple of spelling mistakes https://git.kernel.org/netdev/net-next/c/1c9690dd308e - [net-next,3/4] can: add a note that RECV_OWN_MSGS frames are subject to filtering https://git.kernel.org/netdev/net-next/c/924e464f4a8a - [net-next,4/4] can: proc: fix rcvlist_* header alignment on 64-bit system https://git.kernel.org/netdev/net-next/c/e6b031d3c37f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html