From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:35892 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753782AbbIZSl7 (ORCPT ); Sat, 26 Sep 2015 14:41:59 -0400 Subject: Patch "net/xen-netback: off by one in BUG_ON() condition" has been added to the 4.1-stable tree To: dan.carpenter@oracle.com, davem@davemloft.net, gregkh@linuxfoundation.org Cc: , From: Date: Sat, 26 Sep 2015 11:41:58 -0700 Message-ID: <1443292918157174@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled net/xen-netback: off by one in BUG_ON() condition to the 4.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-xen-netback-off-by-one-in-bug_on-condition.patch and it can be found in the queue-4.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Sat Sep 26 11:13:07 PDT 2015 From: Dan Carpenter Date: Sun, 12 Jul 2015 01:20:55 +0300 Subject: net/xen-netback: off by one in BUG_ON() condition From: Dan Carpenter [ Upstream commit 50c2e4dd6749725338621fff456b26d3a592259f ] 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/xen-netback/netback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -1571,13 +1571,13 @@ static inline void xenvif_tx_dealloc_act 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), Patches currently in stable-queue which might be from dan.carpenter@oracle.com are queue-4.1/rds-fix-an-integer-overflow-test-in-rds_info_getsockopt.patch queue-4.1/net-xen-netback-off-by-one-in-bug_on-condition.patch queue-4.1/packet-missing-dev_put-in-packet_do_bind.patch