This is a note to let you know that I've just added the patch titled bnxt_en: Free context memory in the open path if firmware has been reset. to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: bnxt_en-free-context-memory-in-the-open-path-if-firmware-has-been-reset.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Wed 01 Jan 2020 10:35:31 PM CET From: Michael Chan <michael.chan@xxxxxxxxxxxx> Date: Tue, 10 Dec 2019 02:49:08 -0500 Subject: bnxt_en: Free context memory in the open path if firmware has been reset. From: Michael Chan <michael.chan@xxxxxxxxxxxx> [ Upstream commit 325f85f37e5b35807d86185bdf2c64d2980c44ba ] This will trigger new context memory to be rediscovered and allocated during the re-probe process after a firmware reset. Without this, the newly reset firmware does not have valid context memory and the driver will eventually fail to allocate some resources. Fixes: ec5d31e3c15d ("bnxt_en: Handle firmware reset status during IF_UP.") Signed-off-by: Michael Chan <michael.chan@xxxxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -8766,6 +8766,9 @@ static int bnxt_hwrm_if_change(struct bn } if (resc_reinit || fw_reset) { if (fw_reset) { + bnxt_free_ctx_mem(bp); + kfree(bp->ctx); + bp->ctx = NULL; rc = bnxt_fw_init_one(bp); if (rc) { set_bit(BNXT_STATE_ABORT_ERR, &bp->state); Patches currently in stable-queue which might be from michael.chan@xxxxxxxxxxxx are queue-5.4/bnxt_en-fix-bp-fw_health-allocation-and-free-logic.patch queue-5.4/bnxt_en-fix-the-logic-that-creates-the-health-reporters.patch queue-5.4/bnxt_en-return-error-if-fw-returns-more-data-than-dump-length.patch queue-5.4/bnxt_en-fix-msix-request-logic-for-rdma-driver.patch queue-5.4/bnxt_en-free-context-memory-in-the-open-path-if-firmware-has-been-reset.patch queue-5.4/bnxt-apply-computed-clamp-value-for-coalece-parameter.patch queue-5.4/bnxt_en-remove-unnecessary-null-checks-for-fw_health.patch queue-5.4/bnxt_en-add-missing-devlink-health-reporters-for-vfs.patch