> +/** > + * release_open_intent - free up open intent resources > + * @nd: pointer to nameidata > + */ > +void release_open_intent(struct nameidata *nd) > +{ > + if (nd->intent.open.file->f_dentry == NULL) > + put_filp(nd->intent.open.file); > + else > + fput(nd->intent.open.file); > +} > + This (or at least it's call site in open_namei()) should check for IS_ERR(nd->intent.open.file). If lookup_instantiate_filp() retuns an error and is called from ->create(), release_open_intent() will be called twice, and the second one will Oops. Miklos - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- [RFC] atomic create+open
- From: Miklos Szeredi <[email protected]>
- Re: [RFC] atomic create+open
- From: Trond Myklebust <[email protected]>
- Re: [RFC] atomic create+open
- From: Miklos Szeredi <[email protected]>
- Re: [RFC] atomic create+open
- From: Miklos Szeredi <[email protected]>
- Re: [RFC] atomic create+open
- From: Trond Myklebust <[email protected]>
- Re: [RFC] atomic create+open
- From: Miklos Szeredi <[email protected]>
- Re: [RFC] atomic create+open
- From: Trond Myklebust <[email protected]>
- Re: [RFC] atomic create+open
- From: Miklos Szeredi <[email protected]>
- Re: [RFC] atomic create+open
- From: Trond Myklebust <[email protected]>
- Re: [RFC] atomic create+open
- From: Miklos Szeredi <[email protected]>
- Re: [RFC] atomic create+open
- From: Trond Myklebust <[email protected]>
- Re: [RFC] atomic create+open
- From: Miklos Szeredi <[email protected]>
- Re: [RFC] atomic create+open
- From: Trond Myklebust <[email protected]>
- Re: [RFC] atomic create+open
- From: Miklos Szeredi <[email protected]>
- Re: [RFC] atomic create+open
- From: Trond Myklebust <[email protected]>
- Re: [RFC] atomic create+open
- From: Miklos Szeredi <[email protected]>
- Re: [RFC] atomic create+open
- From: Trond Myklebust <[email protected]>
- Re: [RFC] atomic create+open
- From: Miklos Szeredi <[email protected]>
- Re: [RFC] atomic create+open
- From: Trond Myklebust <[email protected]>
- Re: [RFC] atomic create+open
- From: Miklos Szeredi <[email protected]>
- [RFC] atomic create+open
- Prev by Date: Re: blocking file lock functions (lockf,flock,fcntl) do not return after timer signal
- Next by Date: Re: blocking file lock functions (lockf,flock,fcntl) do not return after timer signal
- Previous by thread: Re: [RFC] atomic create+open
- Next by thread: Found a new way to hang my IDE CD
- Index(es):