Messages in this thread | | | Subject | Re: [RFC] atomic create+open | From | Miklos Szeredi <> | Date | Wed, 12 Oct 2005 17:20:18 +0200 |
| |
> +/** > + * 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |