net: remove unsafe skb_insert()
authorEric Dumazet <edumazet@google.com>
Sun, 25 Nov 2018 16:26:23 +0000 (08:26 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 25 Nov 2018 18:36:19 +0000 (10:36 -0800)
commit4bffc669d6248d655aeb985a0e51bfaaf21c8b40
tree4e60ee772adb097ec25619769dcf4e02d8829fcb
parent40b1c813ba8e0aac9ee36b57f2835777506084c6
net: remove unsafe skb_insert()

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: Eric 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: David S. Miller <davem@davemloft.net>
drivers/infiniband/hw/nes/nes_mgt.c
include/linux/skbuff.h
net/core/skbuff.c