[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1398647481.479968699@decadent.org.uk>
Date: Mon, 28 Apr 2014 02:11:21 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, "Wei Liu" <wei.liu2@...rix.com>,
"Paul Durrant" <paul.durrant@...rix.com>,
"Ian Campbell" <ian.campbell@...rix.com>,
"David S. Miller" <davem@...emloft.net>,
"Sander Eikelenboom" <linux@...elenboom.it>
Subject: [PATCH 3.2 10/94] xen-netback: remove pointless clause from if
statement
3.2.58-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Paul Durrant <Paul.Durrant@...rix.com>
[ Upstream commit 0576eddf24df716d8570ef8ca11452a9f98eaab2 ]
This patch removes a test in start_new_rx_buffer() that checks whether
a copy operation is less than MAX_BUFFER_OFFSET in length, since
MAX_BUFFER_OFFSET is defined to be PAGE_SIZE and the only caller of
start_new_rx_buffer() already limits copy operations to PAGE_SIZE or less.
Signed-off-by: Paul Durrant <paul.durrant@...rix.com>
Cc: Ian Campbell <ian.campbell@...rix.com>
Cc: Wei Liu <wei.liu2@...rix.com>
Cc: Sander Eikelenboom <linux@...elenboom.it>
Reported-By: Sander Eikelenboom <linux@...elenboom.it>
Tested-By: Sander Eikelenboom <linux@...elenboom.it>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
drivers/net/xen-netback/netback.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -346,8 +346,8 @@ static bool start_new_rx_buffer(int offs
* into multiple copies tend to give large frags their
* own buffers as before.
*/
- if ((offset + size > MAX_BUFFER_OFFSET) &&
- (size <= MAX_BUFFER_OFFSET) && offset && !head)
+ BUG_ON(size > MAX_BUFFER_OFFSET);
+ if ((offset + size > MAX_BUFFER_OFFSET) && offset && !head)
return true;
return false;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists