Re: [PATCH] ovl: untangle copy up call chain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 7, 2018 at 7:06 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> On Sat, Oct 06, 2018 at 07:15:31AM +0300, Amir Goldstein wrote:
> > +static int ovl_link_tmpfile(struct ovl_copy_up_ctx *c, struct dentry *temp,
> > +                         struct dentry **newdentry)
> > +{
> > +     int err;
> > +     struct dentry *upper = NULL;
> > +     struct inode *udir = d_inode(c->destdir);
> > +
> > +     inode_lock_nested(udir, I_MUTEX_PARENT);
> > +     upper = lookup_one_len(c->destname.name, c->destdir, c->destname.len);
> > +     err = PTR_ERR(upper);
> > +     if (IS_ERR(upper))
> > +             goto out;
>
> dput(ERR_PTR(something)) will immediately oops on you...

And that's not the only braino in this patch:

+       unlock_rename(c->workdir, c->destdir);
+       if (err)
                ovl_cleanup(d_inode(c->workdir), temp);

Thanks for the review,
Amir.



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux