linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix potential hang in cpqphp
@ 2004-06-29 18:56 Zink, Dan
  2004-06-30 23:03 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Zink, Dan @ 2004-06-29 18:56 UTC (permalink / raw)
  To: linux-hotplug

Someone reported a hang when shutting down their system when cpqphp was
built in.
Ron Urwin tracked this down to a long standing bug in the event thread.
It's not
meant to receive signals but we weren't masking them either.  Here is
Ron's patch
for 2.4.26.  From the looks of it, 2.6 changed the semantics so that
signals are
masked by default.  Is that right?

Thanks,
Dan


diff -Nuar linux-2.4.26/drivers/hotplug/cpqphp_ctrl.c
linux-2.4.26-working/drivers/hotplug/cpqphp_ctrl.c
--- linux-2.4.26/drivers/hotplug/cpqphp_ctrl.c	2003-11-28
12:26:20.000000000 -0600
+++ linux-2.4.26-working/drivers/hotplug/cpqphp_ctrl.c	2004-06-29
10:36:20.840104456 -0500
@@ -1726,7 +1726,14 @@
 	
 	//  New name
 	strcpy(current->comm, "phpd_event");
-	
+
+	/* avoid getting signals */
+	spin_lock_irq(&current->sigmask_lock);
+	flush_signals(current);
+	sigfillset(&current->blocked);
+	recalc_sigpending(current);
+	spin_unlock_irq(&current->sigmask_lock);
+
 	unlock_kernel();
 
 	while (1) {


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-07-30 21:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-29 18:56 [PATCH] fix potential hang in cpqphp Zink, Dan
2004-06-30 23:03 ` Greg KH
2004-06-30 23:33 ` Zink, Dan
2004-07-30 21:33 ` Greg KH

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).