diff options
author | Srivatsa S. Bhat | 2013-04-30 04:47:16 -0500 |
---|---|---|
committer | Greg Kroah-Hartman | 2013-05-11 15:54:10 -0500 |
commit | 5a3f1f30a22ab33f948f0c4a6d56fc7cc5df5199 (patch) | |
tree | b78952047e6614f0756b29da4304408062ae37ea | |
parent | c665070565cc75380d09c4a94142781191e8c22e (diff) | |
download | kernel-omap-5a3f1f30a22ab33f948f0c4a6d56fc7cc5df5199.tar.gz kernel-omap-5a3f1f30a22ab33f948f0c4a6d56fc7cc5df5199.tar.xz kernel-omap-5a3f1f30a22ab33f948f0c4a6d56fc7cc5df5199.zip |
EDAC: Don't give write permission to read-only files
commit c8c64d165ccfd2274058ac84e0c680f9b48c4ec1 upstream.
I get the following warning on boot:
------------[ cut here ]------------
WARNING: at drivers/base/core.c:575 device_create_file+0x9a/0xa0()
Hardware name: -[8737R2A]-
Write permission without 'store'
...
</snip>
Drilling down, this is related to dynamic channel ce_count attribute
files sporting a S_IWUSR mode without a ->store() function. Looking
around, it appears that they aren't supposed to have a ->store()
function. So remove the bogus write permission to get rid of the
warning.
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
[ shorten commit message ]
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/edac/edac_mc_sysfs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index 0ca1ca71157f..c9303edc9324 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c | |||
@@ -330,17 +330,17 @@ static struct device_attribute *dynamic_csrow_dimm_attr[] = { | |||
330 | }; | 330 | }; |
331 | 331 | ||
332 | /* possible dynamic channel ce_count attribute files */ | 332 | /* possible dynamic channel ce_count attribute files */ |
333 | DEVICE_CHANNEL(ch0_ce_count, S_IRUGO | S_IWUSR, | 333 | DEVICE_CHANNEL(ch0_ce_count, S_IRUGO, |
334 | channel_ce_count_show, NULL, 0); | 334 | channel_ce_count_show, NULL, 0); |
335 | DEVICE_CHANNEL(ch1_ce_count, S_IRUGO | S_IWUSR, | 335 | DEVICE_CHANNEL(ch1_ce_count, S_IRUGO, |
336 | channel_ce_count_show, NULL, 1); | 336 | channel_ce_count_show, NULL, 1); |
337 | DEVICE_CHANNEL(ch2_ce_count, S_IRUGO | S_IWUSR, | 337 | DEVICE_CHANNEL(ch2_ce_count, S_IRUGO, |
338 | channel_ce_count_show, NULL, 2); | 338 | channel_ce_count_show, NULL, 2); |
339 | DEVICE_CHANNEL(ch3_ce_count, S_IRUGO | S_IWUSR, | 339 | DEVICE_CHANNEL(ch3_ce_count, S_IRUGO, |
340 | channel_ce_count_show, NULL, 3); | 340 | channel_ce_count_show, NULL, 3); |
341 | DEVICE_CHANNEL(ch4_ce_count, S_IRUGO | S_IWUSR, | 341 | DEVICE_CHANNEL(ch4_ce_count, S_IRUGO, |
342 | channel_ce_count_show, NULL, 4); | 342 | channel_ce_count_show, NULL, 4); |
343 | DEVICE_CHANNEL(ch5_ce_count, S_IRUGO | S_IWUSR, | 343 | DEVICE_CHANNEL(ch5_ce_count, S_IRUGO, |
344 | channel_ce_count_show, NULL, 5); | 344 | channel_ce_count_show, NULL, 5); |
345 | 345 | ||
346 | /* Total possible dynamic ce_count attribute file table */ | 346 | /* Total possible dynamic ce_count attribute file table */ |