hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/pcmcia/cistpl.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * cistpl.c -- 16-bit PCMCIA Card Information Structure parser
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
74 *
85 * The initial developer of the original code is David A. Hinds
96 * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
....@@ -24,12 +21,14 @@
2421 #include <linux/pci.h>
2522 #include <linux/ioport.h>
2623 #include <linux/io.h>
24
+#include <linux/security.h>
2725 #include <asm/byteorder.h>
2826 #include <asm/unaligned.h>
2927
3028 #include <pcmcia/ss.h>
3129 #include <pcmcia/cisreg.h>
3230 #include <pcmcia/cistpl.h>
31
+#include <pcmcia/ds.h>
3332 #include "cs_internal.h"
3433
3534 static const u_char mantissa[] = {
....@@ -1578,6 +1577,10 @@
15781577 struct pcmcia_socket *s;
15791578 int error;
15801579
1580
+ error = security_locked_down(LOCKDOWN_PCMCIA_CIS);
1581
+ if (error)
1582
+ return error;
1583
+
15811584 s = to_socket(container_of(kobj, struct device, kobj));
15821585
15831586 if (off)