kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: p.ittershagen@googlemail.com (Philipp Ittershagen)
To: kernelnewbies@lists.kernelnewbies.org
Subject: side effects of calling interruptible_sleep_on_timeout()
Date: Wed, 25 Apr 2012 00:06:26 +0200	[thread overview]
Message-ID: <20120424220626.GA6655@peter> (raw)
In-Reply-To: <CACsJYqoJBbnV5C8BmmO11k=hEaNiF-D=Yso2RyaPMM86Htw2KA@mail.gmail.com>

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

  reply	other threads:[~2012-04-24 22:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24  9:54 side effects of calling interruptible_sleep_on_timeout() devendra rawat
2012-04-24 22:06 ` Philipp Ittershagen [this message]
2012-04-25 10:26   ` Srivatsa S. Bhat
2012-04-26  4:33     ` Arun KS
2012-04-26  8:03       ` Srivatsa S. Bhat
     [not found]       ` <E351E450E8B9F54684A699D42DC5ADF21FB079C4@MPBAGVEX02.corp.mphasis.com>
     [not found]         ` <CABOM9ZoJk5FMSPeFGrZhbS_raUdnpXYjZraJd0Ddm0E5E+n00A@mail.gmail.com>
     [not found]           ` <E351E450E8B9F54684A699D42DC5ADF21FB0812D@MPBAGVEX02.corp.mphasis.com>
     [not found]             ` <CABOM9ZqEyZh8Oe3hKp8wb6OhzqP+7mRiXRAYuD3+iWBPBNkUBg@mail.gmail.com>
     [not found]               ` <E351E450E8B9F54684A699D42DC5ADF21FB777E1@MPBAGVEX02.corp.mphasis.com>
2012-04-26 12:17                 ` Arun KS

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120424220626.GA6655@peter \
    --to=p.ittershagen@googlemail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).