mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steve G <linux_4ever@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] sigprocmask and invalid how parameter
Date: Sun, 25 May 2003 06:33:58 -0700 (PDT)	[thread overview]
Message-ID: <20030525133358.75349.qmail@web9607.mail.yahoo.com> (raw)

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

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

[-- Attachment #2: inv_how.patch --]
[-- Type: text/plain, Size: 409 bytes --]

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

                 reply	other threads:[~2003-05-25 13:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20030525133358.75349.qmail@web9607.mail.yahoo.com \
    --to=linux_4ever@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®