lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1465749234-25746-1-git-send-email-mnghuan@gmail.com>
Date:	Mon, 13 Jun 2016 00:33:54 +0800
From:	Minfei Huang <mnghuan@...il.com>
To:	viro@...iv.linux.org.uk, bcrl@...ck.org
Cc:	linux-fsdevel@...r.kernel.org, linux-aio@...ck.org,
	linux-kernel@...r.kernel.org, minfei.hmf@...baba-inc.com,
	Minfei Huang <mnghuan@...il.com>
Subject: [PATCH] aio: Cleanup unnecessary test for nr_pages

The variable nr_pages is always more than 1, because the size of
structure aio_ring is bigger than 0. So remove unnecessary test for
nr_page.

Signed-off-by: Minfei Huang <mnghuan@...il.com>
---
 fs/aio.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/aio.c b/fs/aio.c
index fb8e45b..ec05137 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -450,8 +450,6 @@ static int aio_setup_ring(struct kioctx *ctx)
 	size += sizeof(struct io_event) * nr_events;
 
 	nr_pages = PFN_UP(size);
-	if (nr_pages < 0)
-		return -EINVAL;
 
 	file = aio_private_file(ctx, nr_pages);
 	if (IS_ERR(file)) {
-- 
2.7.4 (Apple Git-66)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ