* [PATCH] fix SG_IO bio leak
@ 2006-12-10 16:33 FUJITA Tomonori
2006-12-11 8:55 ` Jens Axboe
2006-12-11 16:38 ` Mike Christie
0 siblings, 2 replies; 4+ messages in thread
From: FUJITA Tomonori @ 2006-12-10 16:33 UTC (permalink / raw)
To: jens.axboe; +Cc: linux-scsi
This patch fixes bio leaks in SG_IO.
http://marc.theaimsgroup.com/?l=linux-kernel&m=116570666807983&w=2
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
block/scsi_ioctl.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index b3e2107..045cabd 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -228,6 +228,7 @@ static int sg_io(struct file *file, requ
struct request *rq;
char sense[SCSI_SENSE_BUFFERSIZE];
unsigned char cmd[BLK_MAX_CDB];
+ struct bio *bio;
if (hdr->interface_id != 'S')
return -EINVAL;
@@ -308,6 +309,7 @@ static int sg_io(struct file *file, requ
if (ret)
goto out;
+ bio = rq->bio;
rq->retries = 0;
start_time = jiffies;
@@ -338,6 +340,7 @@ static int sg_io(struct file *file, requ
hdr->sb_len_wr = len;
}
+ rq->bio = bio;
if (blk_rq_unmap_user(rq))
ret = -EFAULT;
--
1.4.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fix SG_IO bio leak
2006-12-10 16:33 [PATCH] fix SG_IO bio leak FUJITA Tomonori
@ 2006-12-11 8:55 ` Jens Axboe
2006-12-11 16:38 ` Mike Christie
1 sibling, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2006-12-11 8:55 UTC (permalink / raw)
To: FUJITA Tomonori; +Cc: linux-scsi
On Mon, Dec 11 2006, FUJITA Tomonori wrote:
> This patch fixes bio leaks in SG_IO.
>
> http://marc.theaimsgroup.com/?l=linux-kernel&m=116570666807983&w=2
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Perhaps it was a mistake to remove the bio argument. I'll apply your
patch, and contemplate if we want to strengthen this api a little.
Thanks!
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix SG_IO bio leak
2006-12-10 16:33 [PATCH] fix SG_IO bio leak FUJITA Tomonori
2006-12-11 8:55 ` Jens Axboe
@ 2006-12-11 16:38 ` Mike Christie
2006-12-11 16:45 ` Mike Christie
1 sibling, 1 reply; 4+ messages in thread
From: Mike Christie @ 2006-12-11 16:38 UTC (permalink / raw)
To: FUJITA Tomonori; +Cc: jens.axboe, linux-scsi
FUJITA Tomonori wrote:
> This patch fixes bio leaks in SG_IO.
>
> http://marc.theaimsgroup.com/?l=linux-kernel&m=116570666807983&w=2
>
Tomo, when you ported and converted the patches there was another user
of blk_rq_map_user in the ide code. Did you get that path?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix SG_IO bio leak
2006-12-11 16:38 ` Mike Christie
@ 2006-12-11 16:45 ` Mike Christie
0 siblings, 0 replies; 4+ messages in thread
From: Mike Christie @ 2006-12-11 16:45 UTC (permalink / raw)
To: Mike Christie; +Cc: FUJITA Tomonori, jens.axboe, linux-scsi
Mike Christie wrote:
> FUJITA Tomonori wrote:
>> This patch fixes bio leaks in SG_IO.
>>
>> http://marc.theaimsgroup.com/?l=linux-kernel&m=116570666807983&w=2
>>
>
> Tomo, when you ported and converted the patches there was another user
> of blk_rq_map_user in the ide code. Did you get that path?
Ignore that. I checked cdrom and it is ok.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-12-11 16:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-10 16:33 [PATCH] fix SG_IO bio leak FUJITA Tomonori
2006-12-11 8:55 ` Jens Axboe
2006-12-11 16:38 ` Mike Christie
2006-12-11 16:45 ` Mike Christie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox