Patch "module/decompress: Never use kunmap() for local un-mappings" has been added to the 6.2-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

    module/decompress: Never use kunmap() for local un-mappings

to the 6.2-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:
     module-decompress-never-use-kunmap-for-local-un-mapp.patch
and it can be found in the queue-6.2 subdirectory.

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



commit 8ceaedad8ada6b62d7dcdb3ed286719805e70337
Author: Fabio M. De Francesco <fmdefrancesco@xxxxxxxxx>
Date:   Wed Mar 15 13:52:56 2023 +0100

    module/decompress: Never use kunmap() for local un-mappings
    
    [ Upstream commit 3c17655ab13704582fe25e8ea3200a9b2f8bf20a ]
    
    Use kunmap_local() to unmap pages locally mapped with kmap_local_page().
    
    kunmap_local() must be called on the kernel virtual address returned by
    kmap_local_page(), differently from how we use kunmap() which instead
    expects the mapped page as its argument.
    
    In module_zstd_decompress() we currently map with kmap_local_page() and
    unmap with kunmap(). This breaks the code and so it should be fixed.
    
    Cc: Piotr Gorski <piotrgorski@xxxxxxxxxxx>
    Cc: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
    Cc: Luis Chamberlain <mcgrof@xxxxxxxxxx>
    Cc: Stephen Boyd <swboyd@xxxxxxxxxxxx>
    Cc: Ira Weiny <ira.weiny@xxxxxxxxx>
    Fixes: 169a58ad824d ("module/decompress: Support zstd in-kernel decompression")
    Signed-off-by: Fabio M. De Francesco <fmdefrancesco@xxxxxxxxx>
    Reviewed-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>
    Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>
    Reviewed-by: Piotr Gorski <piotrgorski@xxxxxxxxxxx>
    Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/module/decompress.c b/kernel/module/decompress.c
index bb79ac1a6d8f7..7ddc87bee2741 100644
--- a/kernel/module/decompress.c
+++ b/kernel/module/decompress.c
@@ -267,7 +267,7 @@ static ssize_t module_zstd_decompress(struct load_info *info,
 		zstd_dec.size = PAGE_SIZE;
 
 		ret = zstd_decompress_stream(dstream, &zstd_dec, &zstd_buf);
-		kunmap(page);
+		kunmap_local(zstd_dec.dst);
 		retval = zstd_get_error_code(ret);
 		if (retval)
 			break;



[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