All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] delay.h: add __must_check to msleep_interruptible
Date: Thu, 16 Dec 2010 08:17:11 +0200	[thread overview]
Message-ID: <20101216061711.GC26083@jasper.tkos.co.il> (raw)
In-Reply-To: <aed7ab07576c307653723b9bea04516879b3a3ed.1288860894.git.baruch@tkos.co.il>

Hi lkml,

On Thu, Nov 04, 2010 at 10:55:41AM +0200, Baruch Siach wrote:
> Code calling msleep_interruptible() must be aware that sleep time might be
> shorter than intended as a result of a signal being caught. Code not checking
> the return value of msleep_interruptible() is probably buggy, unless it's doing
> the signal_pending() check itself, which is redundant.

Ping?
Any reason not to apply this? This patch could have saved me from an incorrect 
handling of signaled userspace processes.

baruch

> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  include/linux/delay.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/delay.h b/include/linux/delay.h
> index a6ecb34..1be4994 100644
> --- a/include/linux/delay.h
> +++ b/include/linux/delay.h
> @@ -44,7 +44,7 @@ static inline void ndelay(unsigned long x)
>  extern unsigned long lpj_fine;
>  void calibrate_delay(void);
>  void msleep(unsigned int msecs);
> -unsigned long msleep_interruptible(unsigned int msecs);
> +unsigned long __must_check msleep_interruptible(unsigned int msecs);
>  void usleep_range(unsigned long min, unsigned long max);
>  
>  static inline void ssleep(unsigned int seconds)
> -- 
> 1.7.2.3

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

  reply	other threads:[~2010-12-16  6:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-04  8:55 [PATCH] delay.h: add __must_check to msleep_interruptible Baruch Siach
2010-12-16  6:17 ` Baruch Siach [this message]
2010-12-16  8:20   ` Andrew Morton
2010-12-17 23:49 ` Andrew Morton
2010-12-17 23:55   ` Andrew Morton

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=20101216061711.GC26083@jasper.tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.