Skip to contentSkip to conversation

ocfs2: Incorrect address of pos passed to __generic_file_aio_read()

PATCH New Sunil Mushran 2 participants 3 messages Dec 3, 2009 – Dec 4, 2009 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocfs2: Incorrect address of pos passed to __generic_file_aio_read()

__generic_file_aio_read() was being passed as incorrect address for pos leading to a run-away read.

---
 kapi-compat/include/aiovec.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kapi-compat/include/aiovec.h +1 -1
index a10d5b5..a8896f1 100644
@@ -13,7 +13,7 @@ static ssize_t kapi_generic_file_aio_read(struct kiocb *iocb,
 {
 	BUG_ON(iocb->ki_pos != pos);
 
-	return __generic_file_aio_read(iocb, iov, nr_segs, &pos);
+	return __generic_file_aio_read(iocb, iov, nr_segs, &iocb->ki_pos);
 }
 
 static ssize_t __ocfs2_file_aio_read(struct kiocb *iocb,
Signature · 1 line
1.5.6.5
#1 lore raw

PATCH 1/1 ocfs2: Incorrect address of pos passed to __generic_file_aio_read()

This is for ocfs2 1.6. Not mainline.

Quoted 22 lines · Sunil Mushran

__generic_file_aio_read() was being passed as incorrect address for pos leading to a run-away read.

---
 kapi-compat/include/aiovec.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kapi-compat/include/aiovec.h +1 -1
index a10d5b5..a8896f1 100644
@@ -13,7 +13,7 @@ static ssize_t kapi_generic_file_aio_read(struct kiocb *iocb,
 {
 	BUG_ON(iocb->ki_pos != pos);
 
-	return __generic_file_aio_read(iocb, iov, nr_segs, &pos);
+	return __generic_file_aio_read(iocb, iov, nr_segs, &iocb->ki_pos);
 }
 
 static ssize_t __ocfs2_file_aio_read(struct kiocb *iocb,
#2 lore raw

PATCH 1/1 ocfs2: Incorrect address of pos passed to __generic_file_aio_read()

In reply to Sunil Mushran
Quoted 4 lines · Sunil Mushran

__generic_file_aio_read() was being passed as incorrect address for pos leading to a run-away read.

ack

Signature · 11 lines
 Brain: I shall pollute the water supply with this DNAdefibuliser,
        turning everyone into mindless slaves.
 Pinky: What about the people who drink bottled water?
 Brain: Pinky, people who pay 5 dollars for a bottle of water are
        already mindless slaves.

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127