Re: [PATCH] PCI: fix a scheduling in atomic bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 12, 2021 at 10:00:04AM +0300, Dan Carpenter wrote:
> This function is often called with a spinlock held so the allocation has
> to be atomic.  The call tree is:
> 
> pci_specified_resource_alignment() <-- takes spin_lock();
>  -> pci_dev_str_match()
>     -> pci_dev_str_match_path()
> 
> Fixes: 07d8d7e57c28 ("PCI: Make specifying PCI devices in kernel parameters reusable")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Applied with Logan's Reviewed-by and Fixes: update to pci/misc for
v5.15, thanks!

> ---
>  drivers/pci/pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 6714c58ce321..71baf5ff48fc 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -269,7 +269,7 @@ static int pci_dev_str_match_path(struct pci_dev *dev, const char *path,
>  
>  	*endptr = strchrnul(path, ';');
>  
> -	wpath = kmemdup_nul(path, *endptr - path, GFP_KERNEL);
> +	wpath = kmemdup_nul(path, *endptr - path, GFP_ATOMIC);
>  	if (!wpath)
>  		return -ENOMEM;
>  
> -- 
> 2.20.1
> 



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux