[ovs-dev] [PATCH 3/7] datapath: Add owner to file_operations declaration.

Ben Pfaff blp at nicira.com
Thu Dec 30 17:27:08 UTC 2010


On Wed, Dec 29, 2010 at 03:41:31PM -0800, Jesse Gross wrote:
> It's currently possible for operations on our character device to
> be still running when we unload the module.  This will result in
> an oops when the executing code is suddenly freed.  The chrdev
> code has a way to avoid this by taking a reference on the module
> every time the device is opened, which means that we can't be
> unloaded as long as there is an open file descriptor and therefore
> the possibility of an operation.  However, our file_operations
> structure doesn't include an owner member, which prevents this
> mechanism from working.  This adds one.
> 
> Signed-off-by: Jesse Gross <jesse at nicira.com>

Good catch.

Acked-by: Ben Pfaff <blp at nicira.com>




More information about the dev mailing list