summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorHarald Freudenberger <freude@linux.vnet.ibm.com>2016-03-17 14:52:17 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-15 08:27:46 +0200
commit72f4972b8812e0a1749d3be19d8017de25a9d15d (patch)
treee9379630b37956041b1980dde9521e373fda3466 /arch/s390
parentf3de8fbe2a2a3ec4c612e2e0ddeee68f9c5bd972 (diff)
downloadlinux-72f4972b8812e0a1749d3be19d8017de25a9d15d.tar.gz
linux-72f4972b8812e0a1749d3be19d8017de25a9d15d.tar.bz2
linux-72f4972b8812e0a1749d3be19d8017de25a9d15d.zip
s390/crypto: provide correct file mode at device register.
[ Upstream commit 74b2375e6767935e6d9220bdbc6ed0db57f71a59 ] When the prng device driver calls misc_register() there is the possibility to also provide the recommented file permissions. This fix now gives useful values (0644) where previously just the default was used (resulting in 0600 for the device file). Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/crypto/prng.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c
index b8045b97f4fb..d750cc0dfe30 100644
--- a/arch/s390/crypto/prng.c
+++ b/arch/s390/crypto/prng.c
@@ -669,11 +669,13 @@ static const struct file_operations prng_tdes_fops = {
static struct miscdevice prng_sha512_dev = {
.name = "prandom",
.minor = MISC_DYNAMIC_MINOR,
+ .mode = 0644,
.fops = &prng_sha512_fops,
};
static struct miscdevice prng_tdes_dev = {
.name = "prandom",
.minor = MISC_DYNAMIC_MINOR,
+ .mode = 0644,
.fops = &prng_tdes_fops,
};