Skip to content

Commit

Permalink
net: Fix skb_update_prio RCU usage.
Browse files Browse the repository at this point in the history
Change function rcu_dereference to rcu_dereference_bh to avoid warning

[ INFO: suspicious RCU usage. ]
-------------------------------
net/core/dev.c:2459 suspicious rcu_dereference_check() usage!

because we are locking with

rcu_read_lock_bh();

in function dev_queue_xmit(struct sk_buff *skb)

Signed-off-by: Igor Maravic <igorm@etf.rs>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Igor Maravic authored and David S. Miller committed Nov 29, 2011
1 parent 2bcc34b commit 6977a79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2473,7 +2473,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
#if IS_ENABLED(CONFIG_NETPRIO_CGROUP)
static void skb_update_prio(struct sk_buff *skb)
{
struct netprio_map *map = rcu_dereference(skb->dev->priomap);
struct netprio_map *map = rcu_dereference_bh(skb->dev->priomap);

if ((!skb->priority) && (skb->sk) && map)
skb->priority = map->priomap[skb->sk->sk_cgrp_prioidx];
Expand Down

0 comments on commit 6977a79

Please sign in to comment.