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

* Re: [PATCH] fix potential hang in cpqphp
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2004-06-30 23:03 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Jun 29, 2004 at 01:56:45PM -0500, Zink, Dan wrote:
> 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?

I think so, yes.

But your patch is line-wrapped, care to resend it with the same comments
again?

thanks,

greg k-h


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

* RE: [PATCH] fix potential hang in cpqphp
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Zink, Dan @ 2004-06-30 23:33 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 900 bytes --]

Here is the patch as an attachment since our mailer won't cooperate.

Thanks,
Dan

-----Original Message-----
From: Greg KH [mailto:greg@kroah.com] 
Sent: Wednesday, June 30, 2004 6:03 PM
To: Zink, Dan
Cc: linux-hotplug-devel@lists.sourceforge.net; Urwin, Ron
Subject: Re: [PATCH] fix potential hang in cpqphp

On Tue, Jun 29, 2004 at 01:56:45PM -0500, Zink, Dan wrote:
> 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?

I think so, yes.

But your patch is line-wrapped, care to resend it with the same comments
again?

thanks,

greg k-h



[-- Attachment #2: cpqphp_signal.patch --]
[-- Type: application/octet-stream, Size: 604 bytes --]

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

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

* Re: [PATCH] fix potential hang in cpqphp
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2004-07-30 21:33 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Jun 30, 2004 at 06:33:53PM -0500, Zink, Dan wrote:
> Here is the patch as an attachment since our mailer won't cooperate.

Thanks, that worked.  Applied.

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.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).