Michel Alexandre Salim d0cfe2
--- a/tools/perf/util/header.c
Michel Alexandre Salim d0cfe2
+++ b/tools/perf/util/header.c
Michel Alexandre Salim d0cfe2
@@ -3044,11 +3044,6 @@ static int process_bpf_prog_info(struct
Michel Alexandre Salim d0cfe2
 		if (do_read_u32(ff, &data_len))
Michel Alexandre Salim d0cfe2
 			goto out;
Michel Alexandre Salim d0cfe2
 
Michel Alexandre Salim d0cfe2
-		if (info_len > sizeof(struct bpf_prog_info)) {
Michel Alexandre Salim d0cfe2
-			pr_warning("detected invalid bpf_prog_info\n");
Michel Alexandre Salim d0cfe2
-			goto out;
Michel Alexandre Salim d0cfe2
-		}
Michel Alexandre Salim d0cfe2
-
Michel Alexandre Salim d0cfe2
 		info_linear = malloc(sizeof(struct bpf_prog_info_linear) +
Michel Alexandre Salim d0cfe2
 				     data_len);
Michel Alexandre Salim d0cfe2
 		if (!info_linear)