Jiri Slaby b2e018
From: Jiri Slaby <jslaby@suse.cz>
Jiri Slaby b2e018
Subject: kabi: PCI: endpoint: Fix for concurrent memory allocation in OB
Jiri Slaby b2e018
 address region
Jiri Slaby b2e018
Patch-mainline: never, kabi
Jiri Slaby b2e018
References: git-fixes
Jiri Slaby b2e018
Jiri Slaby b2e018
Commit 04e046ca57eb (PCI: endpoint: Fix for concurrent memory allocation
Jiri Slaby b2e018
in OB address region) added a mutex to struct pci_epc_mem. That struct
Jiri Slaby b2e018
is allocated only in __pci_epc_mem_init(). And the struct is referenced
Jiri Slaby b2e018
only by a pointer in struct pci_epc.
Jiri Slaby b2e018
Jiri Slaby b2e018
So hide the change by usual __GENKSYMS__ #ifdef.
Jiri Slaby b2e018
Jiri Slaby b2e018
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Jiri Slaby b2e018
---
Jiri Slaby b2e018
 include/linux/pci-epc.h |    2 ++
Jiri Slaby b2e018
 1 file changed, 2 insertions(+)
Jiri Slaby b2e018
Jiri Slaby b2e018
--- a/include/linux/pci-epc.h
Jiri Slaby b2e018
+++ b/include/linux/pci-epc.h
Jiri Slaby b2e018
@@ -72,7 +72,9 @@ struct pci_epc_mem {
Jiri Slaby b2e018
 	size_t		page_size;
Jiri Slaby b2e018
 	int		pages;
Jiri Slaby b2e018
 	/* mutex to protect against concurrent access for memory allocation*/
Jiri Slaby b2e018
+#ifndef __GENKSYMS__
Jiri Slaby b2e018
 	struct mutex	lock;
Jiri Slaby b2e018
+#endif
Jiri Slaby b2e018
 };
Jiri Slaby b2e018
 
Jiri Slaby b2e018
 /**