From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Agarwal, Lomesh" <lomesh.agarwal@intel.com>
Cc: nigel@suspend2.net, linux-kernel@vger.kernel.org
Subject: Re: which signal is sent to freeze process?
Date: Sat, 21 Jul 2007 00:10:05 +0200 [thread overview]
Message-ID: <200707210010.05877.rjw@sisk.pl> (raw)
In-Reply-To: <A3258B497F1C1441AD36A2E8B45FD62858CCA1@scsmsx412.amr.corp.intel.com>
On Friday, 20 July 2007 20:07, Agarwal, Lomesh wrote:
> Can you suggest a way I can debug the issue why I am getting EINTR error
> for system calls in resuming? What else can cause the system call
> failure with EINTR?
Well, I think I know what the problem is. do_poll checks
signal_pending(current) and breaks when it's set, but that may be caused
by the freezer.
You may try the patch below (untested) and see if that helps.
Greetings,
Rafael
---
fs/select.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Index: linux-2.6.22-rc6-mm1/fs/select.c
===================================================================
--- linux-2.6.22-rc6-mm1.orig/fs/select.c
+++ linux-2.6.22-rc6-mm1/fs/select.c
@@ -23,6 +23,7 @@
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/rcupdate.h>
+#include <linux/freezer.h>
#include <asm/uaccess.h>
@@ -593,6 +594,8 @@ static int do_poll(unsigned int nfds, s
struct poll_list *walk;
long __timeout;
+ try_to_freeze();
+
set_current_state(TASK_INTERRUPTIBLE);
for (walk = list; walk != NULL; walk = walk->next) {
struct pollfd * pfd, * pfd_end;
@@ -618,7 +621,8 @@ static int do_poll(unsigned int nfds, s
* a poll_table to them on the next loop iteration.
*/
pt = NULL;
- if (count || !*timeout || signal_pending(current))
+ if (count || !*timeout ||
+ (signal_pending(current) && !freezing(current)))
break;
count = wait->error;
if (count)
next prev parent reply other threads:[~2007-07-20 22:02 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-18 23:42 which signal is sent to freeze process? Agarwal, Lomesh
2007-07-19 2:18 ` Nigel Cunningham
2007-07-19 4:09 ` Agarwal, Lomesh
2007-07-19 4:59 ` Nigel Cunningham
2007-07-19 21:06 ` Agarwal, Lomesh
2007-07-19 22:02 ` Rafael J. Wysocki
2007-07-19 22:19 ` Nigel Cunningham
2007-07-19 23:22 ` Agarwal, Lomesh
2007-07-20 11:24 ` Rafael J. Wysocki
2007-07-20 18:07 ` Agarwal, Lomesh
2007-07-20 22:10 ` Rafael J. Wysocki [this message]
2007-07-23 18:38 ` Agarwal, Lomesh
2007-07-23 19:25 ` Rafael J. Wysocki
2007-07-23 19:31 ` Agarwal, Lomesh
2007-07-24 16:54 ` Pavel Machek
2007-07-23 20:57 ` Agarwal, Lomesh
2007-07-23 21:50 ` Rafael J. Wysocki
2007-07-23 22:18 ` Agarwal, Lomesh
2007-07-24 9:44 ` Rafael J. Wysocki
2007-07-19 22:02 ` Rafael J. Wysocki
2007-07-25 13:41 ` Pavel Machek
-- strict thread matches above, loose matches on Subject: below --
2007-07-23 19:52 Manfred Spraul
2007-07-23 20:11 ` Rafael J. Wysocki
2007-07-23 20:09 ` Manfred Spraul
2007-07-24 18:48 ` Manfred Spraul
2007-07-25 19:19 ` Rafael J. Wysocki
2007-07-26 21:12 ` Agarwal, Lomesh
2007-07-31 7:55 ` Pavel Machek
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=200707210010.05877.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=lomesh.agarwal@intel.com \
--cc=nigel@suspend2.net \
/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.