powerpc/sysfs: Disable writing to PURR in guest mode
authorMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
Tue, 1 Oct 2013 19:04:10 +0000 (00:34 +0530)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 26 Oct 2013 20:06:07 +0000 (21:06 +0100)
commit d1211af3049f4c9c1d8d4eb8f8098cc4f4f0d0c7 upstream.

arch/powerpc/kernel/sysfs.c exports PURR with write permission.
This may be valid for kernel in phyp mode. But writing to
the file in guest mode causes crash due to a priviledge violation

Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[bwh: Backported to 3.2:
 - Adjust context
 - CPUs are sysdev and we must use the sysdev API]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

No differences found