Re: [PATCH linux-2.6-block:master] block: fix try_module_get race in elevator_find

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 26 2005, Tejun Heo wrote:
>  Hello, Jens.
> 
>  This patch removes try_module_get race in elevator_find.
> try_module_get should always be called with the spinlock protecting
> what the module init/cleanup routines register/unregister to held.  In
> the case of elevators, we should be holding elv_list to avoid it going
> away between spin_unlock_irq and try_module_get.
> 
>  This currently doesn't cause any problem as elevators are never
> unloaded, but the fix is simple and it's always nice to be correct.

Looks good. Elevators _are_ unloaded, right now you just can't unload as
and cfq because they use io contexts. But that will happen in the future
as well.

-- 
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux