lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu,  4 Nov 2010 10:55:41 +0200
From:	Baruch Siach <baruch@...s.co.il>
To:	linux-kernel@...r.kernel.org
Cc:	Baruch Siach <baruch@...s.co.il>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH] delay.h: add __must_check to msleep_interruptible

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.

Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Baruch Siach <baruch@...s.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ