Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xen-pciback: Add name prefix to global 'permissive' variable

The variable for the 'permissive' module parameter used to be static
but was recently changed to be extern. This puts it in the kernel
global namespace if the driver is built-in, so its name should begin
with a prefix identifying the driver.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Fixes: af6fc858a35b ("xen-pciback: limit guest control of command register")
Signed-off-by: David Vrabel <david.vrabel@citrix.com>

authored by

Ben Hutchings and committed by
David Vrabel
8014bcc8 2b953a5e

+5 -5
+3 -3
drivers/xen/xen-pciback/conf_space.c
··· 16 16 #include "conf_space.h" 17 17 #include "conf_space_quirks.h" 18 18 19 - bool permissive; 20 - module_param(permissive, bool, 0644); 19 + bool xen_pcibk_permissive; 20 + module_param_named(permissive, xen_pcibk_permissive, bool, 0644); 21 21 22 22 /* This is where xen_pcibk_read_config_byte, xen_pcibk_read_config_word, 23 23 * xen_pcibk_write_config_word, and xen_pcibk_write_config_byte are created. */ ··· 262 262 * This means that some fields may still be read-only because 263 263 * they have entries in the config_field list that intercept 264 264 * the write and do nothing. */ 265 - if (dev_data->permissive || permissive) { 265 + if (dev_data->permissive || xen_pcibk_permissive) { 266 266 switch (size) { 267 267 case 1: 268 268 err = pci_write_config_byte(dev, offset,
+1 -1
drivers/xen/xen-pciback/conf_space.h
··· 64 64 void *data; 65 65 }; 66 66 67 - extern bool permissive; 67 + extern bool xen_pcibk_permissive; 68 68 69 69 #define OFFSET(cfg_entry) ((cfg_entry)->base_offset+(cfg_entry)->field->offset) 70 70
+1 -1
drivers/xen/xen-pciback/conf_space_header.c
··· 118 118 119 119 cmd->val = value; 120 120 121 - if (!permissive && (!dev_data || !dev_data->permissive)) 121 + if (!xen_pcibk_permissive && (!dev_data || !dev_data->permissive)) 122 122 return 0; 123 123 124 124 /* Only allow the guest to control certain bits. */