Merge tag 'linux-can-fixes-for-5.13-20210624' of git://git.kernel.org/

pub/scm/linux/kernel/git/mkl/linux-can

Marc Kleine-Budde says:

====================
pull-request: can 2021-06-24

this is a pull request of 2 patches for net/master.

The first patch is by Norbert Slusarek and prevent allocation of
filter for optlen == 0 in the j1939 CAN protocol.

The last patch is by Stephane Grosjean and fixes a potential
starvation in the TX path of the peak_pciefd driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller
2021-06-24 11:24:36 -07:00
2 changed files with 3 additions and 3 deletions

View File

@ -351,8 +351,8 @@ static int pucan_handle_status(struct peak_canfd_priv *priv,
return err; return err;
} }
/* start network queue (echo_skb array is empty) */ /* wake network queue up (echo_skb array is empty) */
netif_start_queue(ndev); netif_wake_queue(ndev);
return 0; return 0;
} }

View File

@ -676,7 +676,7 @@ static int j1939_sk_setsockopt(struct socket *sock, int level, int optname,
switch (optname) { switch (optname) {
case SO_J1939_FILTER: case SO_J1939_FILTER:
if (!sockptr_is_null(optval)) { if (!sockptr_is_null(optval) && optlen != 0) {
struct j1939_filter *f; struct j1939_filter *f;
int c; int c;