Skip to content

Commit

Permalink
ptr_ring: bugfix ptr_ring_consume_bh() was using wrong spin_lock variant
Browse files Browse the repository at this point in the history
The BH version of ptr_ring_consume_bh() was using plain spinlocks, it
should have used the *_bh() variant.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
  • Loading branch information
netoptimizer committed Jun 3, 2016
1 parent b7bd9b9 commit 24da4f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/include/linux/ptr_ring.h
Expand Up @@ -278,9 +278,9 @@ static inline void *ptr_ring_consume_bh(struct ptr_ring *r)
{
void *ptr;

spin_lock(&r->consumer_lock);
spin_lock_bh(&r->consumer_lock);
ptr = __ptr_ring_consume(r);
spin_unlock(&r->consumer_lock);
spin_unlock_bh(&r->consumer_lock);

return ptr;
}
Expand Down

0 comments on commit 24da4f4

Please sign in to comment.