Patch "perf: Fix perf_aux_size() for greater-than 32-bit size" has been added to the 5.4-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

    perf: Fix perf_aux_size() for greater-than 32-bit size

to the 5.4-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:
     perf-fix-perf_aux_size-for-greater-than-32-bit-size.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 7eb980fbc41deda5f19ac76a71d1de5241503836
Author: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Date:   Mon Jun 24 23:10:58 2024 +0300

    perf: Fix perf_aux_size() for greater-than 32-bit size
    
    [ Upstream commit 3df94a5b1078dfe2b0c03f027d018800faf44c82 ]
    
    perf_buffer->aux_nr_pages uses a 32-bit type, so a cast is needed to
    calculate a 64-bit size.
    
    Fixes: 45bfb2e50471 ("perf: Add AUX area to ring buffer for raw data streams")
    Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240624201101.60186-5-adrian.hunter@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/events/internal.h b/kernel/events/internal.h
index 6e87b358e0826..30218d7c74e66 100644
--- a/kernel/events/internal.h
+++ b/kernel/events/internal.h
@@ -122,7 +122,7 @@ static inline unsigned long perf_data_size(struct ring_buffer *rb)
 
 static inline unsigned long perf_aux_size(struct ring_buffer *rb)
 {
-	return rb->aux_nr_pages << PAGE_SHIFT;
+	return (unsigned long)rb->aux_nr_pages << PAGE_SHIFT;
 }
 
 #define __DEFINE_OUTPUT_COPY_BODY(advance_buf, memcpy_func, ...)	\




[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