mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Linus Torvlads <torvalds@transmeta.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Thomas Hood <jdthood@mail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] Stop APM readers from responding to events
Date: Thu, 1 Nov 2001 01:29:00 +1100	[thread overview]
Message-ID: <20011101012900.1a2f3287.sfr@canb.auug.org.au> (raw)

Hi Linus,

This is just a small patch, but fills a hole.  Thanks to Thomas Hood for a
patch.

Alan, This will also apply to 2.4.13-ac5.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruN 2.4.14-pre5/arch/i386/kernel/apm.c 2.4.14-pre5-APM.1/arch/i386/kernel/apm.c
--- 2.4.14-pre5/arch/i386/kernel/apm.c	Wed Oct 24 16:12:20 2001
+++ 2.4.14-pre5-APM.1/arch/i386/kernel/apm.c	Thu Nov  1 01:09:48 2001
@@ -1471,7 +1471,7 @@
 	as = filp->private_data;
 	if (check_apm_user(as, "ioctl"))
 		return -EIO;
-	if (!as->suser)
+	if ((!as->suser) || (!as->writer))
 		return -EPERM;
 	switch (cmd) {
 	case APM_IOC_STANDBY:

             reply	other threads:[~2001-11-01  0:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-31 14:29 Stephen Rothwell [this message]
2001-11-01  0:50 ` David Weinehall

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=20011101012900.1a2f3287.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jdthood@mail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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®