Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'ieee802154-for-davem-2018-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next

Stefan Schmidt says:

====================
pull-request: ieee802154-next 2018-03-29

An update from ieee802154 for *net-next*

Colin fixed a unused variable in the new mcr20a driver.
Harry fixed an unitialised data read in the debugfs interface of the
ca8210 driver.

If there are any issues or you think these are to late for -rc1 (both can also
go into -rc2 as they are simple fixes) let me know.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+11 -5
+11 -3
drivers/net/ieee802154/ca8210.c
··· 2493 2493 struct ca8210_priv *priv = filp->private_data; 2494 2494 u8 command[CA8210_SPI_BUF_SIZE]; 2495 2495 2496 - if (len > CA8210_SPI_BUF_SIZE) { 2496 + memset(command, SPI_IDLE, 6); 2497 + if (len > CA8210_SPI_BUF_SIZE || len < 2) { 2497 2498 dev_warn( 2498 2499 &priv->spi->dev, 2499 - "userspace requested erroneously long write (%zu)\n", 2500 + "userspace requested erroneous write length (%zu)\n", 2500 2501 len 2501 2502 ); 2502 - return -EMSGSIZE; 2503 + return -EBADE; 2503 2504 } 2504 2505 2505 2506 ret = copy_from_user(command, in_buf, len); ··· 2511 2510 ret 2512 2511 ); 2513 2512 return -EIO; 2513 + } 2514 + if (len != command[1] + 2) { 2515 + dev_err( 2516 + &priv->spi->dev, 2517 + "write len does not match packet length field\n" 2518 + ); 2519 + return -EBADE; 2514 2520 } 2515 2521 2516 2522 ret = ca8210_test_check_upstream(command, priv->spi);
-2
drivers/net/ieee802154/mcr20a.c
··· 723 723 struct mcr20a_local *lp = hw->priv; 724 724 int ret; 725 725 u8 rx_frame_filter_reg = 0x0; 726 - u8 val; 727 726 728 727 dev_dbg(printdev(lp), "%s(%d)\n", __func__, on); 729 728 730 729 if (on) { 731 730 /* All frame types accepted*/ 732 - val |= DAR_PHY_CTRL4_PROMISCUOUS; 733 731 rx_frame_filter_reg &= ~(IAR_RX_FRAME_FLT_FRM_VER); 734 732 rx_frame_filter_reg |= (IAR_RX_FRAME_FLT_ACK_FT | 735 733 IAR_RX_FRAME_FLT_NS_FT);