Patch "modpost: fix the missed iteration for the max bit in do_input()" has been added to the 5.15-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

    modpost: fix the missed iteration for the max bit in do_input()

to the 5.15-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:
     modpost-fix-the-missed-iteration-for-the-max-bit-in-.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 0f75d83a938640e65a563c7a59a66bf4ea0d5b13
Author: Masahiro Yamada <masahiroy@xxxxxxxxxx>
Date:   Thu Dec 26 00:33:35 2024 +0900

    modpost: fix the missed iteration for the max bit in do_input()
    
    [ Upstream commit bf36b4bf1b9a7a0015610e2f038ee84ddb085de2 ]
    
    This loop should iterate over the range from 'min' to 'max' inclusively.
    The last interation is missed.
    
    Fixes: 1d8f430c15b3 ("[PATCH] Input: add modalias support")
    Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
    Tested-by: John Paul Adrian Glaubitz <glaubitz@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 68a6b029397a..e6ab1eb5666d 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -732,7 +732,7 @@ static void do_input(char *alias,
 
 	for (i = min / BITS_PER_LONG; i < max / BITS_PER_LONG + 1; i++)
 		arr[i] = TO_NATIVE(arr[i]);
-	for (i = min; i < max; i++)
+	for (i = min; i <= max; i++)
 		if (arr[i / BITS_PER_LONG] & (1ULL << (i%BITS_PER_LONG)))
 			sprintf(alias + strlen(alias), "%X,*", i);
 }




[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