From mboxrd@z Thu Jan 1 00:00:00 1970 From: p.ittershagen@googlemail.com (Philipp Ittershagen) Date: Wed, 25 Apr 2012 00:06:26 +0200 Subject: side effects of calling interruptible_sleep_on_timeout() In-Reply-To: References: Message-ID: <20120424220626.GA6655@peter> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi Devendra, On Tue, Apr 24, 2012 at 03:24:23PM +0530, devendra rawat wrote: > Hi, > A switch driver is causing soft lockup on Montavista Linux Kernel > 2.6.10 system. > While browsing through the code of the driver. I came across a snippet > where after disabling the interrupts > a call is made to interruptible_sleep_on_timeout(). > The code snippet is like > cli(); > init_waitqueue_head(&queue); > interruptible_sleep_on_timeout(&queue, USEC_TO_JIFFIES(usec)); > thread_check_signals(); > sti(); > I need to know the side effect of this sort of code, can it be > responsible for the softlockup of the system ? Its a PowerPC based > system. you cannot call sleep functions after disabling interrupts, because no interrupt will arrive for the scheduler to see the timeout and resume your task. Greetings, Philipp