]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnxt_en: Initialize CP doorbell value before ring allocation
authorPrashant Sreedharan <prashant@broadcom.com>
Mon, 28 Mar 2016 23:46:04 +0000 (19:46 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:37:05 +0000 (17:37 -0700)
commit88e8431f0530227d7987bb54fb97091f7319904e
treea105c52c4d991675dddb3fdebe6ab8951d9b93a0
parent61ff2d97e1a5057ef6920bee366e1e4933733d85
bnxt_en: Initialize CP doorbell value before ring allocation

Orabug: 23221795

The existing code does the following:
    allocate completion ring
    initialize completion ring doorbell
    disable interrupts on this completion ring by writing to the doorbell

We can have a race where firmware sends an asynchronous event to the host
after completion ring allocation and before doorbell is initialized.
When this happens driver can crash while ringing the doorbell using
uninitialized value as part of handling the IRQ/napi request.

Signed-off-by: Prashant Sreedharan <prashant.sreedharan@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 33e52d888d0c84a0c66f13357a53113fd9710bd6)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c