Re: [PATCH] shmem: fix __shmem_file_setup error path leaks

2017-03-27 Thread Hillf Danton
On March 28, 2017 1:06 AM Vito Caputo wrote: > > The existing path and memory cleanups appear to be in reverse order, and > there's no iput() potentially leaking the inode in the last two error gotos. > > Also make put_memory shmem_unacct_size() conditional on !inode since if we > entered cleanu

Re: [PATCH] shmem: fix __shmem_file_setup error path leaks

2017-03-27 Thread vcaputo
On Mon, Mar 27, 2017 at 10:21:27PM +0100, Al Viro wrote: > On Mon, Mar 27, 2017 at 10:05:34AM -0700, Vito Caputo wrote: > > The existing path and memory cleanups appear to be in reverse order, and > > there's no iput() potentially leaking the inode in the last two error gotos. > > > > Also make pu

Re: [PATCH] shmem: fix __shmem_file_setup error path leaks

2017-03-27 Thread Al Viro
On Mon, Mar 27, 2017 at 10:05:34AM -0700, Vito Caputo wrote: > The existing path and memory cleanups appear to be in reverse order, and > there's no iput() potentially leaking the inode in the last two error gotos. > > Also make put_memory shmem_unacct_size() conditional on !inode since if we > en

[PATCH] shmem: fix __shmem_file_setup error path leaks

2017-03-27 Thread Vito Caputo
The existing path and memory cleanups appear to be in reverse order, and there's no iput() potentially leaking the inode in the last two error gotos. Also make put_memory shmem_unacct_size() conditional on !inode since if we entered cleanup at put_inode, shmem_evict_inode() occurs via iput()->iput