net/xen-netback: off by one in BUG_ON() condition
Subsystems (4)
PATCH 1/1 net/xen-netback: off by one in BUG_ON() condition
The > should be >=. I also added spaces around the '-' operations so the code is a little more consistent and matches the condition better.
Fixes f53c3fe8dad7 ('xen-netback: Introduce TX grant mapping')
Signed-off-by Dan Carpenter <[email protected]>
drivers/net/xen-netback/netback.c +1 -3
@@ -1566,13 +1566,13 @@ static inline void xenvif_tx_dealloc_action(struct xenvif_queue *queue)smp_rmb ();while (dc != dp) { -BUG_ON (gop - queue->tx_unmap_ops >MAX_PENDING_REQS ); +BUG_ON (gop - queue->tx_unmap_ops >=MAX_PENDING_REQS ); pending_idx queue->dealloc_ring[pending_index(dc++)]; - pending_idx_release[gop-queue->tx_unmap_ops] + pending_idx_release[gop - queue->tx_unmap_ops] pending_idx; - queue->pages_to_unmap[gop-queue->tx_unmap_ops] + queue->pages_to_unmap[gop - queue->tx_unmap_ops] queue->mmap_pages[pending_idx]; gnttab_set_unmap_op(gop, idx_to_kaddr(queue, pending_idx),
David Miller
maintainerFrom: Dan Carpenter <[email protected]>
Date: Sun, 12 Jul 2015 01:20:55 +0300
Quoted 5 lines
The > should be >=. I also added spaces around the '-' operations so the code is a little more consistent and matches the condition better.
Fixes f53c3fe8dad7 ('xen-netback: Introduce TX grant mapping')Signed-off-by Dan Carpenter <[email protected]>
Applied and queued up for -stable, thanks.
David Miller
maintainerFrom: Dan Carpenter <[email protected]>
Date: Sun, 12 Jul 2015 01:20:55 +0300
Quoted 5 lines
The > should be >=. I also added spaces around the '-' operations so the code is a little more consistent and matches the condition better.
Fixes f53c3fe8dad7 ('xen-netback: Introduce TX grant mapping')Signed-off-by Dan Carpenter <[email protected]>
Applied and queued up for -stable, thanks.