* Kylene Hall ([EMAIL PROTECTED]) wrote:
> There were misplaced spinlock acquires and releases in the probe, open, 
> close and release paths which were causing might_sleep and schedule while 
> atomic error messages accompanied by stack traces when the kernel was 
> compiled with SMP support. Bug reported by Reben Jenster 
> <[EMAIL PROTECTED]>
> 
> Signed-off-by: Kylene Hall <[EMAIL PROTECTED]>
> ---
> diff -uprN linux-2.6.10/drivers/char/tpm/tpm.c 
> linux-2.6.10-tpm/drivers/char/tpm/tpm.c
> --- linux-2.6.10/drivers/char/tpm/tpm.c       2005-01-18 16:42:17.000000000 
> -0600
> +++ linux-2.6.10-tpm/drivers/char/tpm/tpm.c   2005-01-18 12:52:53.000000000 
> -0600
> @@ -373,8 +372,9 @@ int tpm_open(struct inode *inode, struct
>  {
>       int rc = 0, minor = iminor(inode);
>       struct tpm_chip *chip = NULL, *pos;
> +     unsigned long flags;
>  
> -     spin_lock(&driver_lock);
> +     spin_lock_irqsave(&driver_lock, flags);

Hmm, unless I'm missing something, this is only worse (for might sleep
warnings).  Now you've disabled irq's too.

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net
-
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/

Reply via email to