Skip to content

Commit 3df94a5

Browse files
ahunter6Peter Zijlstra
authored andcommitted
perf: Fix perf_aux_size() for greater-than 32-bit size
perf_buffer->aux_nr_pages uses a 32-bit type, so a cast is needed to calculate a 64-bit size. Fixes: 45bfb2e ("perf: Add AUX area to ring buffer for raw data streams") Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3520b25 commit 3df94a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/events/internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static inline unsigned long perf_data_size(struct perf_buffer *rb)
128128

129129
static inline unsigned long perf_aux_size(struct perf_buffer *rb)
130130
{
131-
return rb->aux_nr_pages << PAGE_SHIFT;
131+
return (unsigned long)rb->aux_nr_pages << PAGE_SHIFT;
132132
}
133133

134134
#define __DEFINE_OUTPUT_COPY_BODY(advance_buf, memcpy_func, ...) \

0 commit comments

Comments
 (0)