From: Chris Mason <mason@suse.com>
To: Con Kolivas <kernel@kolivas.org>, axboe@suse.de
Cc: Greg Afinogenov <antisthenes@inbox.ru>,
linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
garloff@suse.de
Subject: Re: [PATCH] bio_uncopy_user mem leak
Date: Thu, 19 Aug 2004 09:51:34 -0400 [thread overview]
Message-ID: <1092923494.12138.1667.camel@watt.suse.com> (raw)
In-Reply-To: <412489E5.7000806@kolivas.org>
On Thu, 2004-08-19 at 07:07, Con Kolivas wrote:
> Greg Afinogenov wrote:
> > I'd just like to point out that this patch does not, as may be expected,
> > result in functional audio CDs. It merely results in a successful burn
> > process and a CD full of noise.
> >
> > Perhaps this should be tested/fixed?
>
> Ok I just tested this patch discretely and indeed the memory leak goes
> away but it still produces coasters so something is still amuck. Just as
> a data point; burning DVDs and data cds is ok. Burning audio *and
> videocds* is not.
It might be the cold medicine talking, but I think we need something
like this. gcc tested it for me, beyond that I make no promises....
--- l/fs/bio.c.1 2004-08-19 09:36:13.596858736 -0400
+++ l/fs/bio.c 2004-08-19 09:47:46.392537784 -0400
@@ -454,6 +454,7 @@
*/
if (!ret) {
if (!write_to_vm) {
+ unsigned long p = uaddr;
bio->bi_rw |= (1 << BIO_RW);
/*
* for a write, copy in data to kernel pages
@@ -462,8 +463,9 @@
bio_for_each_segment(bvec, bio, i) {
char *addr = page_address(bvec->bv_page);
- if (copy_from_user(addr, (char *) uaddr, bvec->bv_len))
+ if (copy_from_user(addr, (char *) p, bvec->bv_len))
goto cleanup;
+ p += bvec->bv_len;
}
}
next prev parent reply other threads:[~2004-08-19 13:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-19 9:59 Greg Afinogenov
2004-08-19 11:07 ` Con Kolivas
2004-08-19 13:51 ` Chris Mason [this message]
2004-08-19 19:55 ` Kurt Garloff
2004-08-20 3:19 ` Con Kolivas
2004-08-20 6:31 ` Andrew Morton
2004-08-20 12:54 ` Kurt Garloff
2004-08-20 20:28 ` sandr8
2004-08-20 7:15 ` Greg Afinogenov
2004-08-20 12:46 ` Kurt Garloff
-- strict thread matches above, loose matches on Subject: below --
2004-08-17 15:59 Kurt Garloff
2004-08-17 21:08 ` Gene Heskett
2004-08-17 22:50 ` Andrew Morton
2004-08-19 7:16 ` Colin Leroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1092923494.12138.1667.camel@watt.suse.com \
--to=mason@suse.com \
--cc=akpm@osdl.org \
--cc=antisthenes@inbox.ru \
--cc=axboe@suse.de \
--cc=garloff@suse.de \
--cc=kernel@kolivas.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®