Patch "pds_core: protect devlink callbacks from fw_down state" has been added to the 6.4-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    pds_core: protect devlink callbacks from fw_down state

to the 6.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:
     pds_core-protect-devlink-callbacks-from-fw_down-stat.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e7e7c0ccaf07a157c55dd08f40f5e7af4f652a60
Author: Shannon Nelson <shannon.nelson@xxxxxxx>
Date:   Thu Aug 24 09:17:50 2023 -0700

    pds_core: protect devlink callbacks from fw_down state
    
    [ Upstream commit 91202ce78fcd070982a115f0bf6f328af619aa00 ]
    
    Don't access structs that have been cleared when in the fw_down
    state and the various structs have been cleaned and are waiting
    to recover.  This caused a panic on rmmod when already in fw_down
    and devlink_param_unregister() tried to check the parameters.
    
    Fixes: 40ced8944536 ("pds_core: devlink params for enabling VIF support")
    Signed-off-by: Shannon Nelson <shannon.nelson@xxxxxxx>
    Reviewed-by: Brett Creeley <brett.creeley@xxxxxxx>
    Reviewed-by: Simon Horman <horms@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230824161754.34264-2-shannon.nelson@xxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/amd/pds_core/devlink.c b/drivers/net/ethernet/amd/pds_core/devlink.c
index 9c6b3653c1c7c..d9607033bbf21 100644
--- a/drivers/net/ethernet/amd/pds_core/devlink.c
+++ b/drivers/net/ethernet/amd/pds_core/devlink.c
@@ -10,6 +10,9 @@ pdsc_viftype *pdsc_dl_find_viftype_by_id(struct pdsc *pdsc,
 {
 	int vt;
 
+	if (!pdsc->viftype_status)
+		return NULL;
+
 	for (vt = 0; vt < PDS_DEV_TYPE_MAX; vt++) {
 		if (pdsc->viftype_status[vt].dl_id == dl_id)
 			return &pdsc->viftype_status[vt];



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux