Re: [PATCH] PCI/AER: Fix the uninitialized aer_fifo

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

 



On Thu, Jan 23, 2020 at 04:26:31PM +0800, Dongdong Liu wrote:
> Current code do not call INIT_KFIFO() to init aer_fifo. This will lead to
> kfifo_put() sometimes return 0. This means the fifo was full. In fact, it
> is not. It is easy to reproduce the problem by using aer_inject.
> aer_inject -s :82:00.0 multiple-corr-nonfatal
> The content of multiple-corr-nonfatal file is as below.
> AER
> COR RCVR
> HL 0 1 2 3
> AER
> UNCOR POISON_TLP
> HL 4 5 6 7
> 
> Fixes: 27c1ce8bbed7 ("PCI/AER: Use kfifo for tracking events instead of reimplementing it")
> Signed-off-by: Dongdong Liu <liudongdong3@xxxxxxxxxx>

Applied to pci/aer for v5.6, thanks!

I tweaked the commit log for s/aer_inject/aer-inject/

> ---
>  drivers/pci/pcie/aer.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
> index 1ca86f2..4a818b0 100644
> --- a/drivers/pci/pcie/aer.c
> +++ b/drivers/pci/pcie/aer.c
> @@ -1445,6 +1445,7 @@ static int aer_probe(struct pcie_device *dev)
>  		return -ENOMEM;
>  
>  	rpc->rpd = port;
> +	INIT_KFIFO(rpc->aer_fifo);
>  	set_service_data(dev, rpc);
>  
>  	status = devm_request_threaded_irq(device, dev->irq, aer_irq, aer_isr,
> -- 
> 1.9.1
> 



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux