Patch "wifi: ath9k: Remove error checks when creating debugfs entries" has been added to the 6.1-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

    wifi: ath9k: Remove error checks when creating debugfs entries

to the 6.1-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:
     wifi-ath9k-remove-error-checks-when-creating-debugfs.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 28ba64c1dd64883cb792d96d14eff49417c44c1d
Author: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>
Date:   Mon Aug 5 13:02:22 2024 +0200

    wifi: ath9k: Remove error checks when creating debugfs entries
    
    [ Upstream commit f6ffe7f0184792c2f99aca6ae5b916683973d7d3 ]
    
    We should not be checking the return values from debugfs creation at all: the
    debugfs functions are designed to handle errors of previously called functions
    and just transparently abort the creation of debugfs entries when debugfs is
    disabled. If we check the return value and abort driver initialisation, we break
    the driver if debugfs is disabled (such as when booting with debugfs=off).
    
    Earlier versions of ath9k accidentally did the right thing by checking the
    return value, but only for NULL, not for IS_ERR(). This was "fixed" by the two
    commits referenced below, breaking ath9k with debugfs=off starting from the 6.6
    kernel (as reported in the Bugzilla linked below).
    
    Restore functionality by just getting rid of the return value check entirely.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=219122
    Fixes: 1e4134610d93 ("wifi: ath9k: use IS_ERR() with debugfs_create_dir()")
    Fixes: 6edb4ba6fb5b ("wifi: ath9k: fix parameter check in ath9k_init_debug()")
    Reported-by: Daniel Tobias <dan.g.tob@xxxxxxxxx>
    Tested-by: Daniel Tobias <dan.g.tob@xxxxxxxxx>
    Signed-off-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>
    Signed-off-by: Kalle Valo <quic_kvalo@xxxxxxxxxxx>
    Link: https://patch.msgid.link/20240805110225.19690-1-toke@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 72660a66be1df..9955b9c4df2b4 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1420,8 +1420,6 @@ int ath9k_init_debug(struct ath_hw *ah)
 
 	sc->debug.debugfs_phy = debugfs_create_dir("ath9k",
 						   sc->hw->wiphy->debugfsdir);
-	if (IS_ERR(sc->debug.debugfs_phy))
-		return -ENOMEM;
 
 #ifdef CONFIG_ATH_DEBUG
 	debugfs_create_file("debug", 0600, sc->debug.debugfs_phy,
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
index e79bbcd3279af..81332086e2899 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
@@ -491,8 +491,6 @@ int ath9k_htc_init_debug(struct ath_hw *ah)
 
 	priv->debug.debugfs_phy = debugfs_create_dir(KBUILD_MODNAME,
 					     priv->hw->wiphy->debugfsdir);
-	if (IS_ERR(priv->debug.debugfs_phy))
-		return -ENOMEM;
 
 	ath9k_cmn_spectral_init_debug(&priv->spec_priv, priv->debug.debugfs_phy);
 




[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