Skip to content
  1. May 12, 2018
  2. May 11, 2018
  3. May 10, 2018
    • Ying Xue's avatar
      tipc: eliminate KMSAN uninit-value in strcmp complaint · 94f6a80c
      Ying Xue authored
      
      
      When we get link properties through netlink interface with
      tipc_nl_node_get_link(), we don't validate TIPC_NLA_LINK_NAME
      attribute at all, instead we directly use it. As a consequence,
      KMSAN detected the TIPC_NLA_LINK_NAME attribute was an uninitialized
      value, and then posted the following complaint:
      
      ==================================================================
      BUG: KMSAN: uninit-value in strcmp+0xf7/0x160 lib/string.c:329
      CPU: 1 PID: 4527 Comm: syz-executor655 Not tainted 4.16.0+ #87
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
      Google 01/01/2011
      Call Trace:
        __dump_stack lib/dump_stack.c:17 [inline]
        dump_stack+0x185/0x1d0 lib/dump_stack.c:53
        kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067
        __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:683
        strcmp+0xf7/0x160 lib/string.c:329
        tipc_nl_node_get_link+0x220/0x6f0 net/tipc/node.c:1881
        genl_family_rcv_msg net/netlink/genetlink.c:599 [inline]
        genl_rcv_msg+0x1686/0x1810 net/netlink/genetlink.c:624
        netlink_rcv_skb+0x378/0x600 net/netlink/af_netlink.c:2447
        genl_rcv+0x63/0x80 net/netlink/genetlink.c:635
        netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline]
        netlink_unicast+0x166b/0x1740 net/netlink/af_netlink.c:1337
        netlink_sendmsg+0x1048/0x1310 net/netlink/af_netlink.c:1900
        sock_sendmsg_nosec net/socket.c:630 [inline]
        sock_sendmsg net/socket.c:640 [inline]
        ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046
        __sys_sendmsg net/socket.c:2080 [inline]
        SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091
        SyS_sendmsg+0x54/0x80 net/socket.c:2087
        do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
        entry_SYSCALL_64_after_hwframe+0x3d/0xa2
      RIP: 0033:0x445589
      RSP: 002b:00007fb7ee66cdb8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
      RAX: ffffffffffffffda RBX: 00000000006dac24 RCX: 0000000000445589
      RDX: 0000000000000000 RSI: 0000000020023000 RDI: 0000000000000003
      RBP: 00000000006dac20 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
      R13: 00007fffa2bf3f3f R14: 00007fb7ee66d9c0 R15: 0000000000000001
      
      Uninit was created at:
        kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline]
        kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188
        kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314
        kmsan_slab_alloc+0x11/0x20 mm/kmsan/kmsan.c:321
        slab_post_alloc_hook mm/slab.h:445 [inline]
        slab_alloc_node mm/slub.c:2737 [inline]
        __kmalloc_node_track_caller+0xaed/0x11c0 mm/slub.c:4369
        __kmalloc_reserve net/core/skbuff.c:138 [inline]
        __alloc_skb+0x2cf/0x9f0 net/core/skbuff.c:206
        alloc_skb include/linux/skbuff.h:984 [inline]
        netlink_alloc_large_skb net/netlink/af_netlink.c:1183 [inline]
        netlink_sendmsg+0x9a6/0x1310 net/netlink/af_netlink.c:1875
        sock_sendmsg_nosec net/socket.c:630 [inline]
        sock_sendmsg net/socket.c:640 [inline]
        ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046
        __sys_sendmsg net/socket.c:2080 [inline]
        SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091
        SyS_sendmsg+0x54/0x80 net/socket.c:2087
        do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
        entry_SYSCALL_64_after_hwframe+0x3d/0xa2
      ==================================================================
      
      To quiet the complaint, TIPC_NLA_LINK_NAME attribute has been
      validated in tipc_nl_node_get_link() before it's used.
      
      Reported-by: default avatar <syzbot+df0257c92ffd4fcc58cd@syzkaller.appspotmail.com>
      Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      94f6a80c
    • Sun Lianwen's avatar
      net/9p: correct some comment errors in 9p file system code · 4a026da9
      Sun Lianwen authored
      
      
      There are follow comment errors:
      1 The function name is wrong in p9_release_pages() comment.
      2 The function name and variable name is wrong in p9_poll_workfn() comment.
      3 There is no variable dm_mr and lkey in struct p9_trans_rdma.
      4 The function name is wrong in rdma_create_trans() comment.
      5 There is no variable initialized in struct virtio_chan.
      6 The variable name is wrong in p9_virtio_zc_request() comment.
      
      Signed-off-by: default avatarSun Lianwen <sunlw.fnst@cn.fujitsu.com>
      Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4a026da9
  4. May 09, 2018
    • Heiner Kallweit's avatar
      r8169: fix powering up RTL8168h · 3148dedf
      Heiner Kallweit authored
      Since commit a92a0849
      
       "r8169: improve runtime pm in general and
      suspend unused ports" interfaces w/o link are runtime-suspended after
      10s. On systems where drivers take longer to load this can lead to the
      situation that the interface is runtime-suspended already when it's
      initially brought up.
      This shouldn't be a problem because rtl_open() resumes MAC/PHY.
      However with at least one chip version the interface doesn't properly
      come up, as reported here:
      https://bugzilla.kernel.org/show_bug.cgi?id=199549
      
      The vendor driver uses a delay to give certain chip versions some
      time to resume before starting the PHY configuration. So let's do
      the same. I don't know which chip versions may be affected,
      therefore apply this delay always.
      
      This patch was reported to fix the issue for RTL8168h.
      I was able to reproduce the issue on an Asus H310I-Plus which also
      uses a RTL8168h. Also in my case the patch fixed the issue.
      
      Reported-by: default avatarSlava Kardakov <ojab@ojab.ru>
      Tested-by: default avatarSlava Kardakov <ojab@ojab.ru>
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3148dedf
  5. May 08, 2018
    • David S. Miller's avatar
      Merge tag 'linux-can-fixes-for-4.17-20180508' of... · 42f02130
      David S. Miller authored
      
      Merge tag 'linux-can-fixes-for-4.17-20180508' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can 2018-05-08
      
      this is a pull request for 7 patches for net/master.
      
      The first patch is by Jakob Unterwurzacher and increases the severity of
      bus-off messages in the generic CAN device infrastructure. The next two patches
      are by Uwe Kleine-König and fix the endianess detection in the flexcan driver.
      Jimmy Assarsson's patch for the kvaser driver corrects the stats counter for
      dropped tx-messages. Geert Uytterhoeven provides one patch and Sergei Shtylyov
      two patches for the rcan_canfd device tree binding description.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      42f02130
    • David S. Miller's avatar
      Merge branch 'ieee802154-for-davem-2018-05-08' of... · 2dabf9f2
      David S. Miller authored
      
      Merge branch 'ieee802154-for-davem-2018-05-08' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan
      
      Stefan Schmidt says:
      
      ====================
      pull-request: ieee802154 2018-05-08
      
      An update from ieee802154 for your *net* tree.
      
      Two fixes for the mcr20a driver, which was being added in the 4.17 merge window,
      by Gustavo and myself.
      The atusb driver got a change to GFP_KERNEL where no GFP_ATOMIC is needed by
      Jia-Ju.
      
      The last and most important fix is from Alex to get IPv6 reassembly working
      again for the ieee802154 6lowpan adaptation. This got broken in 4.16 so please
      queue this one also up for the 4.16 stable tree.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2dabf9f2
    • Sergei Shtylyov's avatar
      DT: net: can: rcar_canfd: document R8A77980 bindings · 7a25ac2f
      Sergei Shtylyov authored
      
      
      Document the R-Car V3H (R8A77980) SoC support in the R-Car CAN-FD bindings.
      
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Reviewed-by: default avatarSimon Horman <horms+renesas@verge.net.au>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      7a25ac2f