Skip to content

Commit

Permalink
virtio_net: workaround for lockdep checker issue
Browse files Browse the repository at this point in the history
This is just a workaround, see the thread [1] on the netdev mailing
list for the discussion around this issue. But it allows us to avoid
the initial lockdep warning on boot that disables futher lockdep
checks.

[1] https://www.spinics.net/lists/netdev/msg529595.html

Signed-off-by: Octavian Purdila <[email protected]>
  • Loading branch information
tavip authored and dbaluta committed Feb 8, 2021
1 parent b40e9b6 commit 6b6127c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1259,9 +1259,11 @@ static bool try_fill_recv(struct virtnet_info *vi, struct receive_queue *rq,
if (virtqueue_kick_prepare(rq->vq) && virtqueue_notify(rq->vq)) {
unsigned long flags;

local_bh_disable();
flags = u64_stats_update_begin_irqsave(&rq->stats.syncp);
rq->stats.kicks++;
u64_stats_update_end_irqrestore(&rq->stats.syncp, flags);
local_bh_enable();
}

return !oom;
Expand Down

0 comments on commit 6b6127c

Please sign in to comment.