]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/AER: Queue one GHES event, not several uninitialized ones
authorYanjiang Jin <yanjiang.jin@hxt-semitech.com>
Fri, 14 Dec 2018 17:29:37 +0000 (11:29 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 14 Dec 2018 17:29:37 +0000 (11:29 -0600)
commitec61d860f629c29f0a3e1b94a2745e5aadab8d4f
tree763e820a0e296d120fdf76bd2bbe852e36143045
parent113817411b27c8399da347d8c0fef199adac3ac5
PCI/AER: Queue one GHES event, not several uninitialized ones

dffed5c573b0 ("PCI/AER: Use kfifo_in_spinlocked() to insert locked
elements") replaced kfifo_put() with kfifo_in_spinlocked(), but passed the
*size* of the queue entry, where kfifo_in_spinlocked() expects the *number*
of entries to be copied.

We want to insert only one element into kfifo, not "sizeof(entry) = 16".
Without this patch, we would get 15 uninitialized elements.

Fixes: dffed5c573b0 ("PCI/AER: Use kfifo_in_spinlocked() to insert locked elements")
Signed-off-by: Yanjiang Jin <yanjiang.jin@hxt-semitech.com>
[bhelgaas: changelog]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
drivers/pci/pcie/aer.c