Prohibit replacement of the PCMCIA Card Information Structure when the
kernel is locked down.
Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit
634dc9eb8591baee1d8fbe22066c6dfbe10d988e
git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
struct pcmcia_socket *s;
int error;
+ if (kernel_is_locked_down()) {
+ pr_err("Direct CIS storage isn't permitted when the kernel is locked down\n");
+ return -EPERM;
+ }
+
s = to_socket(container_of(kobj, struct device, kobj));
if (off)