]> git.baikalelectronics.ru Git - kernel.git/commit
s390/pkey: Use -ENODEV instead of -EOPNOTSUPP
authorDavid Hildenbrand <david@redhat.com>
Wed, 12 Jun 2019 13:33:03 +0000 (15:33 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Sat, 15 Jun 2019 10:24:36 +0000 (12:24 +0200)
commit8b7c9e6899b9308c81d2dcaeab6ccd1b63b7b9ca
tree231fbb6f791c046abca004297a1f507e954e3d4b
parenta5db604e7dbcde7bde2e1c0722e2137f5ba78fec
s390/pkey: Use -ENODEV instead of -EOPNOTSUPP

systemd-modules-load.service automatically tries to load the pkey module
on systems that have MSA.

Pkey also requires the MSA3 facility and a bunch of subfunctions.
Failing with -EOPNOTSUPP makes "systemd-modules-load.service" fail on
any system that does not have all needed subfunctions. For example,
when running under QEMU TCG (but also on systems where protected keys
are disabled via the HMC).

Let's use -ENODEV, so systemd-modules-load.service properly ignores
failing to load the pkey module because of missing HW functionality.

While at it, also convert the -EOPNOTSUPP in pkey_clr2protkey() to -ENODEV.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
drivers/s390/crypto/pkey_api.c