public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Domsch <Matt_Domsch@dell.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, Michael_E_Brown@dell.com
Subject: EDD - set sysfs attr owner field
Date: Wed, 21 Apr 2004 10:18:44 -0500	[thread overview]
Message-ID: <20040421151844.GA11269@lists.us.dell.com> (raw)

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

Andrew, the patch below from Michael E. Brown properly sets the owner
field of a sysfs attribute.  Without this patch, it is possible to
crash the kernel with a simultaneous insmod/rmmod while reading files
exported by the module.

Thanks,
Matt

-- 
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com


# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/04/21 00:13:44-05:00 michael_e_brown@meb-laptop.michaels-house.net 
#   fix edd module unload race vs sysfs access
# 
# drivers/firmware/edd.c
#   2004/04/21 00:13:35-05:00 michael_e_brown@meb-laptop.michaels-house.net +1 -1
#   fix edd module unload race vs sysfs access
# 
diff -Nru a/drivers/firmware/edd.c b/drivers/firmware/edd.c
--- a/drivers/firmware/edd.c	Wed Apr 21 00:41:03 2004
+++ b/drivers/firmware/edd.c	Wed Apr 21 00:41:03 2004
@@ -86,7 +86,7 @@
 
 #define EDD_DEVICE_ATTR(_name,_mode,_show,_test) \
 struct edd_attribute edd_attr_##_name = { 	\
-	.attr = {.name = __stringify(_name), .mode = _mode },	\
+	.attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE },	\
 	.show	= _show,				\
 	.test	= _test,				\
 };

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

                 reply	other threads:[~2004-04-21 15: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=20040421151844.GA11269@lists.us.dell.com \
    --to=matt_domsch@dell.com \
    --cc=Michael_E_Brown@dell.com \
    --cc=akpm@osdl.org \
    --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