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>
This commit is contained in:

committed by
David S. Miller

parent
40b1c813ba
commit
4bffc669d6
@@ -1749,8 +1749,6 @@ static inline void skb_queue_head_init_class(struct sk_buff_head *list,
|
||||
* The "__skb_xxxx()" functions are the non-atomic ones that
|
||||
* can only be called with interrupts disabled.
|
||||
*/
|
||||
void skb_insert(struct sk_buff *old, struct sk_buff *newsk,
|
||||
struct sk_buff_head *list);
|
||||
static inline void __skb_insert(struct sk_buff *newsk,
|
||||
struct sk_buff *prev, struct sk_buff *next,
|
||||
struct sk_buff_head *list)
|
||||
|
Reference in New Issue
Block a user