lkml.org 
[lkml]   [2001]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectDevfs races with block devices
[Finally, after other things have stabilised, I'm ready to tackle this
issue]

Alexander Viro writes:
> BTW, here's one more devfs rmmod race: check_disk_changed() in
> fs/devfs/base.c. Calling ->check_media_change() with no protection
> whatsoever. If rmmod happens at that point...

How about if I do this sequence:
lock_kernel();
devfs checks;
if (bd_op->owner)
__MOD_INC_USE_COUNT(bd_op->owner);
revalidate();
if (bd_op->owner)
__MOD_DEC_USE_COUNT(bd_op->owner);
unlock_kernel();

Is there any reason why that won't work?

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/

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