From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: torvalds@osdl.org
Subject: Re: Driver core: warn when userspace writes to the uevent file in a non-supported way
Date: Fri, 27 Apr 2007 22:34:11 +0100 [thread overview]
Message-ID: <20070427223411.01cfecae@the-village.bc.nu> (raw)
In-Reply-To: <200704272059.l3RKxUYn024215@hera.kernel.org>
> In the future we will allow the uevent type to be written to the uevent
> file to trigger the different types of uevents. But for now, as we only
> support the ADD event, warn if userspace tries to write anything else to
> this file.
>
> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> ---
> drivers/base/core.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 72c6ee5..f69305c 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -296,6 +296,9 @@ out:
> static ssize_t store_uevent(struct device *dev, struct device_attribute *attr,
> const char *buf, size_t count)
> {
> + if (memcmp(buf, "add", 3) != 0)
> + dev_err(dev, "uevent: unsupported action-string; this will "
> + "be ignored in a future kernel version");
Warnings good, lack of rate limiting extremely bad indeed.
next parent reply other threads:[~2007-04-27 21:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200704272059.l3RKxUYn024215@hera.kernel.org>
2007-04-27 21:34 ` Alan Cox [this message]
2007-04-27 21:41 ` Alan Cox
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=20070427223411.01cfecae@the-village.bc.nu \
--to=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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®