From: Bhumika Goyal <bhumirks@gmail.com>
To: julia.lawall@lip6.fr, rjw@rjwysocki.net, lenb@kernel.org,
bhelgaas@google.com, linux-acpi@vger.kernel.org,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: keescook@chromium.org, Bhumika Goyal <bhumirks@gmail.com>
Subject: [PATCH] PCI: acpiphp_ibm: add __ro_after_init to ibm_apci_table_attr
Date: Mon, 26 Dec 2016 21:06:35 +0530 [thread overview]
Message-ID: <1482766595-12679-1-git-send-email-bhumirks@gmail.com> (raw)
The object ibm_apci_table_attr of type bin_attribute structure is not
modified after getting initialized by ibm_acpiphp_init. Apart from
getting referenced in init it is also passed as an argument to the functions
sysfs_{remove/create}_bin_file but both the arguments are of type const
struct bin_attribute *. Therefore add __ro_after_init to its declaration.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/pci/hotplug/acpiphp_ibm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
index f6221d7..188cdfa 100644
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
@@ -107,7 +107,7 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle,
static acpi_handle ibm_acpi_handle;
static struct notification ibm_note;
-static struct bin_attribute ibm_apci_table_attr = {
+static struct bin_attribute ibm_apci_table_attr __ro_after_init = {
.attr = {
.name = "apci_table",
.mode = S_IRUGO,
--
1.9.1
next reply other threads:[~2016-12-26 15:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-26 15:36 Bhumika Goyal [this message]
2017-01-03 23:10 ` [PATCH] PCI: acpiphp_ibm: add __ro_after_init to ibm_apci_table_attr Kees Cook
2017-01-11 21:00 ` Bjorn Helgaas
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=1482766595-12679-1-git-send-email-bhumirks@gmail.com \
--to=bhumirks@gmail.com \
--cc=bhelgaas@google.com \
--cc=julia.lawall@lip6.fr \
--cc=keescook@chromium.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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;
as well as URLs for NNTP newsgroup(s).