]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/AER: Initialize aer_fifo
authorDongdong Liu <liudongdong3@huawei.com>
Thu, 23 Jan 2020 08:26:31 +0000 (16:26 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 23 Jan 2020 22:40:03 +0000 (16:40 -0600)
commit3d6223f7c066cf37b2be0f785f7552c0b1f14c25
tree44e82d11278e6fb72ffa8ff018984e39bf7d0519
parent9b236e4cff9b5a411369a749994f414809c05e29
PCI/AER: Initialize aer_fifo

Previously we did not call INIT_KFIFO() for aer_fifo.  This leads to
kfifo_put() sometimes returning 0 (queue full) when 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 the 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: d7b0ab7c29fc ("PCI/AER: Use kfifo for tracking events instead of reimplementing it")
Link: https://lore.kernel.org/r/1579767991-103898-1-git-send-email-liudongdong3@huawei.com
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pcie/aer.c