]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Fix issue with "pci=disable_acs_redir" parameter being ignored
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 10 Apr 2019 21:05:31 +0000 (15:05 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 12 Apr 2019 20:32:08 +0000 (15:32 -0500)
commitf1a36d85725e96b5618679d366a4eb95ddf9cd25
tree91a010b549580aeed358fb85267ad558ec82721c
parent2215a4f897596c6138efa9b60aa09bd54987fcdc
PCI: Fix issue with "pci=disable_acs_redir" parameter being ignored

In most cases, kmalloc() will not be available early in boot when
pci_setup() is called.  Thus, the kstrdup() call that was added to fix the
__initdata bug with the disable_acs_redir parameter usually returns NULL,
so the parameter is discarded and has no effect.

To fix this, store the string that's in initdata until an initcall function
can allocate the memory appropriately.  This way we don't need any
additional static memory.

Fixes: be62bf60524b ("PCI: Fix __initdata issue with "pci=disable_acs_redir" parameter")
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci.c