Yes, I'll be submitting a patch to fix this.
> Also, the following looks wrong:
>
> if ( S_ISBLK (inode->i_mode) )
> {
> file->f_op = &def_blk_fops;
> if (df->ops) inode->i_bdev->bd_op = df->ops;
> }
> else file->f_op = fops_get ( (struct file_operations *) df->ops );
> if (file->f_op)
> err = file->f_op->open ? (*file->f_op->open) (inode, file) : 0;
> else
> {
> /* Fallback to legacy scheme */
> if ( S_ISCHR (inode->i_mode) ) err = chrdev_open (inode, file);
> else err = -ENODEV;
> }
> if (err < 0) return err;
>
> We can return without releasing the file operations after fops_get(),
> thereby effectively locking modules in memory.
How is this different from the chrdev_open() logic? It seems to me
this is taken care of in fput(), so no need to worry.
Regards,
Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca
-
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/