Patch "media: vb2: frame_vector.c: replace WARN_ONCE with a comment" has been added to the 5.10-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

    media: vb2: frame_vector.c: replace WARN_ONCE with a comment

to the 5.10-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:
     media-vb2-frame_vector.c-replace-warn_once-with-a-co.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 6cc933c2b98978a3fd9b27b6dee0f7738a855a94
Author: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
Date:   Thu Aug 17 12:41:32 2023 +0200

    media: vb2: frame_vector.c: replace WARN_ONCE with a comment
    
    [ Upstream commit 735de5caf79e06cc9fb96b1b4f4974674ae3e917 ]
    
    The WARN_ONCE was issued also in cases that had nothing to do with VM_IO
    (e.g. if the start address was just a random value and uaccess fails with
    -EFAULT).
    
    There are no reports of WARN_ONCE being issued for actual VM_IO cases, so
    just drop it and instead add a note to the comment before the function.
    
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>
    Reported-by: Yikebaer Aizezi <yikebaer61@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/mm/frame_vector.c b/mm/frame_vector.c
index 0e589a9a88012..1cd81d38ad2d0 100644
--- a/mm/frame_vector.c
+++ b/mm/frame_vector.c
@@ -29,6 +29,10 @@
  * different type underlying the specified range of virtual addresses.
  * When the function isn't able to map a single page, it returns error.
  *
+ * Note that get_vaddr_frames() cannot follow VM_IO mappings. It used
+ * to be able to do that, but that could (racily) return non-refcounted
+ * pfns.
+ *
  * This function takes care of grabbing mmap_lock as necessary.
  */
 int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
@@ -77,8 +81,6 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
 			goto out;
 	}
 
-	/* This used to (racily) return non-refcounted pfns. Let people know */
-	WARN_ONCE(1, "get_vaddr_frames() cannot follow VM_IO mapping");
 	vec->nr_frames = 0;
 
 out:



[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