1. 05 Mar, 2020 5 commits
    • Taehee Yoo's avatar
      hsr: fix refcnt leak of hsr slave interface · 56dc0a0e
      Taehee Yoo authored
      In the commit e0a4b997 ("hsr: use upper/lower device infrastructure"),
      dev_get() was removed but dev_put() in the error path wasn't removed.
      So, if creating hsr interface command is failed, the reference counter leak
      of lower interface would occur.
      
      Test commands:
          ip link add dummy0 type dummy
          ip link add ipvlan0 link dummy0 type ipvlan mode l2
          ip link add ipvlan1 link dummy0 type ipvlan mode l2
          ip link add hsr0 type hsr slave1 ipvlan0 slave2 ipvlan1
          ip link del ipvlan0
      
      Result:
      [  633.271992][ T1280] unregister_netdevice: waiting for ipvlan0 to become free. Usage count = -1
      
      Fixes: e0a4b997 ("hsr: use upper/lower device infrastructure")
      Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      56dc0a0e
    • David S. Miller's avatar
      Merge branch 'rmnet-cleanups' · d9904528
      David S. Miller authored
      Taehee Yoo says:
      
      ====================
      net: rmnet: several code cleanup for rmnet module
      
      This patchset is to cleanup rmnet module code.
      
      1. The first patch is to add module alias
      rmnet module can not be loaded automatically because there is no
      alias name.
      
      2. The second patch is to add extack error message code.
      When rmnet netlink command fails, it doesn't print any error message.
      So, users couldn't know the exact reason.
      In order to tell the exact reason to the user, the extack error message
      is used in this patch.
      
      3. The third patch is to use GFP_KERNEL instead of GFP_ATOMIC.
      In the sleepable context, GFP_KERNEL can be used.
      So, in this patch, GFP_KERNEL is used instead of GFP_ATOMIC.
      
      Change log:
       - v1->v2: change error message in the second patch.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d9904528
    • Taehee Yoo's avatar
      net: rmnet: use GFP_KERNEL instead of GFP_ATOMIC · 9c9cc918
      Taehee Yoo authored
      In the current code, rmnet_register_real_device() and rmnet_newlink()
      are using GFP_ATOMIC.
      But, these functions are allowed to sleep.
      So, GFP_KERNEL can be used.
      Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9c9cc918
    • Taehee Yoo's avatar
      net: rmnet: print error message when command fails · fcf8f4eb
      Taehee Yoo authored
      When rmnet netlink command fails, it doesn't print any error message.
      So, users couldn't know the exact reason.
      In order to tell the exact reason to the user, the extack error message
      is used in this patch.
      Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fcf8f4eb
    • Taehee Yoo's avatar
      net: rmnet: add missing module alias · eed22a06
      Taehee Yoo authored
      In the current rmnet code, there is no module alias.
      So, RTNL couldn't load rmnet module automatically.
      
      Test commands:
          ip link add dummy0 type dummy
          modprobe -rv rmnet
          ip link add rmnet0 link dummy0 type rmnet  mux_id 1
      Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eed22a06
  2. 04 Mar, 2020 35 commits