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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <A3258B497F1C1441AD36A2E8B45FD62858D7B7@scsmsx412.amr.corp.intel.com>
Date:	Mon, 23 Jul 2007 15:18:26 -0700
From:	"Agarwal, Lomesh" <lomesh.agarwal@...el.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	<nigel@...pend2.net>, <linux-kernel@...r.kernel.org>
Subject: RE: which signal is sent to freeze process?

The net effect would be same. Why would you choose one over other
(do_sys_poll vs. do_poll)?
Can you point me to code where socket read returns in case of
signal_pending? I need to try couple of things.

-----Original Message-----
From: Rafael J. Wysocki [mailto:rjw@...k.pl] 
Sent: Monday, July 23, 2007 2:51 PM
To: Agarwal, Lomesh
Cc: nigel@...pend2.net; linux-kernel@...r.kernel.org
Subject: Re: which signal is sent to freeze process?

On Monday, 23 July 2007 22:57, Agarwal, Lomesh wrote:
> Why do you need try_to_freeze in below patch? Shouldn't
> !freezing(current) checking is enough?

The try_to_freeze() is needed so that the process doesn't block the
freezing
of tasks (it is supposed to call refrigerator() as soon as reasonably
possible
when freezing(current) is true).

Alternatively, we might return 0 from do_sys_poll() if do_poll() has
returned 0 and both signal_pending(current) and freezing(current) are
true.  Below is a patch that implements that.  Could you please try it?

Greetings,
Rafael


---
 fs/select.c |    2 +-
 1 file changed, 1 insertion(+), 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
@@ -722,7 +722,7 @@ int do_sys_poll(struct pollfd __user *uf
 		walk = walk->next;
   	}
 	err = fdcount;
-	if (!fdcount && signal_pending(current))
+	if (!fdcount && (signal_pending(current) && !freezing(current)))
 		err = -EINTR;
 out_fds:
 	walk = head;
-
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