1. 24 Nov, 2019 36 commits
  2. 20 Nov, 2019 4 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.19.85 · c63ee293
      Greg Kroah-Hartman authored
      c63ee293
    • Jouni Hogander's avatar
      slcan: Fix memory leak in error path · e99d6483
      Jouni Hogander authored
      commit ed50e160 upstream.
      
      This patch is fixing memory leak reported by Syzkaller:
      
      BUG: memory leak unreferenced object 0xffff888067f65500 (size 4096):
        comm "syz-executor043", pid 454, jiffies 4294759719 (age 11.930s)
        hex dump (first 32 bytes):
          73 6c 63 61 6e 30 00 00 00 00 00 00 00 00 00 00 slcan0..........
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
        backtrace:
          [<00000000a06eec0d>] __kmalloc+0x18b/0x2c0
          [<0000000083306e66>] kvmalloc_node+0x3a/0xc0
          [<000000006ac27f87>] alloc_netdev_mqs+0x17a/0x1080
          [<0000000061a996c9>] slcan_open+0x3ae/0x9a0
          [<000000001226f0f9>] tty_ldisc_open.isra.1+0x76/0xc0
          [<0000000019289631>] tty_set_ldisc+0x28c/0x5f0
          [<000000004de5a617>] tty_ioctl+0x48d/0x1590
          [<00000000daef496f>] do_vfs_ioctl+0x1c7/0x1510
          [<0000000059068dbc>] ksys_ioctl+0x99/0xb0
          [<000000009a6eb334>] __x64_sys_ioctl+0x78/0xb0
          [<0000000053d0332e>] do_syscall_64+0x16f/0x580
          [<0000000021b83b99>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
          [<000000008ea75434>] 0xffffffffffffffff
      
      Cc: Wolfgang Grandegger <wg@grandegger.com>
      Cc: Marc Kleine-Budde <mkl@pengutronix.de>
      Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
      Signed-off-by: default avatarJouni Hogander <jouni.hogander@unikie.com>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      Cc: Oliver Hartkopp <socketcan@hartkopp.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e99d6483
    • zhong jiang's avatar
      memfd: Use radix_tree_deref_slot_protected to avoid the warning. · e4cc9c81
      zhong jiang authored
      The commit 99b45e7a ("memfd: Fix locking when tagging pins")
      introduces the following warning messages.
      
      *WARNING: suspicious RCU usage in memfd_wait_for_pins*
      
      It is because we still use radix_tree_deref_slot without read_rcu_lock.
      We should use radix_tree_deref_slot_protected instead in the case.
      
      Cc: stable@vger.kernel.org
      Fixes: 99b45e7a ("memfd: Fix locking when tagging pins")
      Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
      Reviewed-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e4cc9c81
    • Arnd Bergmann's avatar
      net: phy: mdio-bcm-unimac: mark PM functions as __maybe_unused · 914834a7
      Arnd Bergmann authored
      [ Upstream commit 9b97123a ]
      
      The newly added runtime-pm support causes a harmless warning
      when CONFIG_PM is disabled:
      
      drivers/net/phy/mdio-bcm-unimac.c:330:12: error: 'unimac_mdio_resume' defined but not used [-Werror=unused-function]
       static int unimac_mdio_resume(struct device *d)
      drivers/net/phy/mdio-bcm-unimac.c:321:12: error: 'unimac_mdio_suspend' defined but not used [-Werror=unused-function]
       static int unimac_mdio_suspend(struct device *d)
      
      Marking the functions as __maybe_unused is the easiest workaround
      and avoids adding #ifdef checks.
      
      Fixes: b78ac6ec ("net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      914834a7