[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140425162712.GH10187@tucsk.piliscsaba.szeredi.hu>
Date: Fri, 25 Apr 2014 18:27:12 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: Eric Biggers <ebiggers3@...il.com>
Cc: Dave Jones <davej@...hat.com>, Al Viro <viro@...iv.linux.org.uk>,
Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux-Fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH] vfs: rw_copy_check_uvector() - free iov on error
On Wed, Apr 23, 2014 at 12:25:34AM -0500, Eric Biggers wrote:
> On Wed, Apr 23, 2014 at 12:06:39AM -0500, Eric Biggers wrote:
> > The proposed patch doesn't work because in compat_rw_copy_check_uvector(),
> > 'iov' is incremented in the loop before it is freed or returned. This
> > probably should be changed to indexing with 'seg', like in the non-compat
> > version...
>
> Also, there is still a memory leak in vmsplice() as it does not free the iov
> buffer if 0 is returned from rw_copy_check_uvector() (possible if all segments
> are of zero length).
There are more problems. E.g. count is zero so nothing will be copied. This
function needs some care and attention (and testing).
Thanks,
Miklos
--
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