Re: [PATCH] 2.6.8.1 MegaRAID Driver Race

From: Andrew Morton
Date: Mon Aug 23 2004 - 17:22:58 EST


"bradgoodman.com" <bkgoodman@xxxxxxxxxxxxxxx> wrote:
>
> [PATCH] 2.6.8.1 to LSI Logic MegaRAID Adapter - ioctl function calls
> mega_internal_command, which uses wait_event, which calls schedule.
> This means schedule() is called while big kernel_lock is held.
>
> Locks/Unlocks were done here because
>
> 1. There are a lot of return()s in the ioctl function to dodge.
> 2. mega_internal_command is also called by read and writes,
> which don't hold big kernel_lock

Calling schedule() inside lock_kernel() is legal.

It may, however, be wrong within the context of the particular caller
because schedule() will drop the lock. So new races might have been
introduced.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/