1. 29 11月, 2018 1 次提交
  2. 27 11月, 2018 1 次提交
  3. 26 11月, 2018 2 次提交
    • E
      net: remove unsafe skb_insert() · 4bffc669
      Eric Dumazet 提交于
      I do not see how one can effectively use skb_insert() without holding
      some kind of lock. Otherwise other cpus could have changed the list
      right before we have a chance of acquiring list->lock.
      
      Only existing user is in drivers/infiniband/hw/nes/nes_mgt.c and this
      one probably meant to use __skb_insert() since it appears nesqp->pau_list
      is protected by nesqp->pau_lock. This looks like nesqp->pau_lock
      could be removed, since nesqp->pau_list.lock could be used instead.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Faisal Latif <faisal.latif@intel.com>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: linux-rdma <linux-rdma@vger.kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4bffc669
    • C
      net: bridge: remove redundant checks for null p->dev and p->br · 40b1c813
      Colin Ian King 提交于
      A recent change added a null check on p->dev after p->dev was being
      dereferenced by the ns_capable check on p->dev. It turns out that
      neither the p->dev and p->br null checks are necessary, and can be
      removed, which cleans up a static analyis warning.
      
      As Nikolay Aleksandrov noted, these checks can be removed because:
      
      "My reasoning of why it shouldn't be possible:
      - On port add new_nbp() sets both p->dev and p->br before creating
        kobj/sysfs
      
      - On port del (trickier) del_nbp() calls kobject_del() before call_rcu()
        to destroy the port which in turn calls sysfs_remove_dir() which uses
        kernfs_remove() which deactivates (shouldn't be able to open new
        files) and calls kernfs_drain() to drain current open/mmaped files in
        the respective dir before continuing, thus making it impossible to
        open a bridge port sysfs file with p->dev and p->br equal to NULL.
      
      So I think it's safe to remove those checks altogether. It'd be nice to
      get a second look over my reasoning as I might be missing something in
      sysfs/kernfs call path."
      
      Thanks to Nikolay Aleksandrov's suggestion to remove the check and
      David Miller for sanity checking this.
      
      Detected by CoverityScan, CID#751490 ("Dereference before null check")
      
      Fixes: a5f3ea54 ("net: bridge: add support for raw sysfs port options")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Acked-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      40b1c813
  4. 24 11月, 2018 20 次提交
  5. 23 11月, 2018 1 次提交
  6. 22 11月, 2018 8 次提交
  7. 21 11月, 2018 5 次提交
  8. 20 11月, 2018 2 次提交