]> git.baikalelectronics.ru Git - kernel.git/commit
EDAC: Don't give write permission to read-only files
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Tue, 30 Apr 2013 09:47:16 +0000 (15:17 +0530)
committerBorislav Petkov <bp@suse.de>
Thu, 9 May 2013 10:40:45 +0000 (12:40 +0200)
commitea14b578887ce7ed7c7877c1bbb57c5e7da596d4
tree83d1831be5946a304b5d9d1551813832e2633eb3
parente3446a426cf00cf453a64959f357dff16f73720b
EDAC: Don't give write permission to read-only files

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>
Cc: <stable@vger.kernel.org> # 3.[89]
[ shorten commit message ]
Signed-off-by: Borislav Petkov <bp@suse.de>
drivers/edac/edac_mc_sysfs.c