Patch "drm/i915/gvt: Fix uninitialized variable in handle_mmio()" 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

    drm/i915/gvt: Fix uninitialized variable in handle_mmio()

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:
     drm-i915-gvt-fix-uninitialized-variable-in-handle_mm.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 0719e6d1c059c6cea0e7122979a426e0c2910c62
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Fri Jan 26 11:41:47 2024 +0300

    drm/i915/gvt: Fix uninitialized variable in handle_mmio()
    
    [ Upstream commit 47caa96478b99d6d1199b89467cc3e5a6cc754ee ]
    
    This code prints the wrong variable in the warning message.  It should
    print "i" instead of "info->offset".  On the first iteration "info" is
    uninitialized leading to a crash and on subsequent iterations it prints
    the previous offset instead of the current one.
    
    Fixes: e0f74ed4634d ("i915/gvt: Separate the MMIO tracking table from GVT-g")
    Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Signed-off-by: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx>
    Link: http://patchwork.freedesktop.org/patch/msgid/11957c20-b178-4027-9b0a-e32e9591dd7c@moroto.mountain
    Reviewed-by: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c
index daac2050d77d..6f531bb61f7e 100644
--- a/drivers/gpu/drm/i915/gvt/handlers.c
+++ b/drivers/gpu/drm/i915/gvt/handlers.c
@@ -2844,8 +2844,7 @@ static int handle_mmio(struct intel_gvt_mmio_table_iter *iter, u32 offset,
 	for (i = start; i < end; i += 4) {
 		p = intel_gvt_find_mmio_info(gvt, i);
 		if (p) {
-			WARN(1, "dup mmio definition offset %x\n",
-				info->offset);
+			WARN(1, "dup mmio definition offset %x\n", i);
 
 			/* We return -EEXIST here to make GVT-g load fail.
 			 * So duplicated MMIO can be found as soon as




[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