Patch "wifi: iwlwifi: fix EWRD table validity check" has been added to the 6.7-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: iwlwifi: fix EWRD table validity check

to the 6.7-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-iwlwifi-fix-ewrd-table-validity-check.patch
and it can be found in the queue-6.7 subdirectory.

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



commit f73b1eea376800f4ee188b2dfdcb611debb6df42
Author: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>
Date:   Mon Jan 29 21:21:49 2024 +0200

    wifi: iwlwifi: fix EWRD table validity check
    
    [ Upstream commit c8d8f3911135921ace8e939ea0956b55f74bf8a0 ]
    
    EWRD ACPI table contains up to 3 additional sar profiles.
    According to the BIOS spec, the table contains a n_profile
    variable indicating how many additional profiles exist in the
    table.
    Currently we check that n_profiles is not <= 0.
    But according to the BIOS spec, 0 is a valid value,
    and it can't be < 0 anyway because we receive that from ACPI as
    an unsigned integer.
    
    Fixes: 39c1a9728f93 ("iwlwifi: refactor the SAR tables from mvm to acpi")
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>
    Reviewed-by: Gregory Greenman <gregory.greenman@xxxxxxxxx>
    Link: https://msgid.link/20240129211905.448ea2f40814.Iffd2aadf8e8693e6cb599bee0406a800a0c1e081@changeid
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
index f6ee5afb3320e..e161b44539069 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
@@ -767,7 +767,7 @@ int iwl_sar_get_ewrd_table(struct iwl_fw_runtime *fwrt)
 	 * from index 1, so the maximum value allowed here is
 	 * ACPI_SAR_PROFILES_NUM - 1.
 	 */
-	if (n_profiles <= 0 || n_profiles >= ACPI_SAR_PROFILE_NUM) {
+	if (n_profiles >= ACPI_SAR_PROFILE_NUM) {
 		ret = -EINVAL;
 		goto out_free;
 	}




[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