lkml.org 
[lkml]   [2001]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [CFT][PATCH] cdrom-related rmmod races
In article <Pine.GSO.4.21.0110230640520.7440-100000@weyl.math.psu.edu> you wrote:
> Folks, patch below should fix the rmmod/open() races for
> cdrom drivers (including pcd and sr). The problem with the current
> code is that they use cdrom_open() as ->open() and bump module
> refcount only in cdrom_device_info->open() callback. cdrom_open()
> blocks before calling it, with obvious results.

> Patch is pretty straightforward - it gives these guys ->open()
> of their own that does MOD_INC_USE_COUNT and calls cdrom_open() - see
> below for examples. Please, give it a try - if there's no complaints it
> goes to Linus.

Wouldn't it be easier to add a 'struct module *owner' to struct
block_device_operations?

Christoph

--
Of course it doesn't work. We've performed a software upgrade.
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:10    [W:0.055 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site