Re: "scheduling while atomic" ?

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

 



>When you say enable a lock, do you mean that you grabbed a lock?  Now if
>you grabbed a spinlock, it is really bad to then call schedule, since a
>another process that will grab that same spinlock will deadlock the CPU
>(on an SMP system). Since you are using locks (I'm also assuming that
>you are using spinlocks) I assume that you will be running this on a
>CONFIG_PREEMPT or SMP system.
>
>So the fix will be to release the lock before calling something that
>will schedule, and regrab it afterwards.
>  
>
Sorry for not being too precise. Yes, your assumptions were correct ;-)
I grab a lock using

spin_lock(&ieee->lock);

and release it using

spin_unlock(&ieee->lock);

there is quite a lot of debugging printk's inbetween. Can this be a cause ?

-
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