lkml.org 
[lkml]   [2003]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] sigprocmask and invalid how parameter
Hello,

I was playing around with sigprocmask and found that if the
"how" parameter was bad, the kernel treated it just like a
SIG_SETMASK was passed in except that it returned an error.
I think that it should perform no action if "how" is
invalid.

The attached patch makes the kernel unlock the irq and
leave if how is invalid. The patch was created against a
2.4.18 kernel, but this function hasn't changed. Even the
2.5 kernels look the same for this function.

Best Regards,
-Steve Grubb

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com--- signal.c.orig 2003-05-25 07:12:46.000000000 -0400
+++ signal.c 2003-05-25 07:15:02.000000000 -0400
@@ -885,11 +885,13 @@
break;
}

+ if (error) {
+ spin_unlock_irq(&current->sigmask_lock);
+ goto out;
+ }
current->blocked = new_set;
recalc_sigpending(current);
spin_unlock_irq(&current->sigmask_lock);
- if (error)
- goto out;
if (oset)
goto set_old;
} else if (oset) {
\
 
 \ /
  Last update: 2005-03-22 13:35    [W:1.483 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site