[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1398207423-21119-1-git-send-email-ebiggers3@gmail.com>
Date: Tue, 22 Apr 2014 17:57:03 -0500
From: Eric Biggers <ebiggers3@...il.com>
To: viro@...iv.linux.org.uk
Cc: bcrl@...ck.org, linux-fsdevel@...r.kernel.org, linux-aio@...ck.org,
linux-kernel@...r.kernel.org, Eric Biggers <ebiggers3@...il.com>
Subject: [PATCH] aio: Fix type of iterator variable in do_io_submit()
do_io_submit() iterated over the userspace iocb structure pointers using
a variable i of type 'int'. This was wrong since 'nr', the number of
iocb structure pointers, could potentially be up to LONG_MAX /
sizeof(struct iocb *). Fix it (and also remove the unnecessary
initialization to 0).
Signed-off-by: Eric Biggers <ebiggers3@...il.com>
---
fs/aio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/aio.c b/fs/aio.c
index 12a3de0e..4c96af7 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1441,7 +1441,7 @@ long do_io_submit(aio_context_t ctx_id, long nr,
{
struct kioctx *ctx;
long ret = 0;
- int i = 0;
+ long i;
struct blk_plug plug;
if (unlikely(nr < 0))
--
1.9.2
--
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