lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200130144728.24072-1-madhuparnabhowmik10@gmail.com>
Date:   Thu, 30 Jan 2020 20:17:28 +0530
From:   madhuparnabhowmik10@...il.com
To:     peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
        mark.rutland@....com, alexander.shishkin@...ux.intel.com,
        olsa@...hat.com, namhyung@...nel.org
Cc:     linux-kernel@...r.kernel.org, frextrite@...il.com,
        joel@...lfernandes.org, paulmck@...nel.org,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>
Subject: [PATCH] perf_event.h: Add RCU Annotation to struct ring_buffer in perf_event

From: Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>

This patch fixes the following sparse errors in events/core.c
and events/ring_buffer.c by adding RCU Annotation to struct
ring_buffer in perf_event:

kernel/events/core.c:5597:9: error: incompatible types in comparison expression
kernel/events/core.c:5303:22: error: incompatible types in comparison expression
kernel/events/core.c:5439:14: error: incompatible types in comparison expression
kernel/events/core.c:5472:14: error: incompatible types in comparison expression
kernel/events/core.c:5529:14: error: incompatible types in comparison expression
kernel/events/core.c:5615:14: error: incompatible types in comparison expression
kernel/events/core.c:5615:14: error: incompatible types in comparison expression
kernel/events/core.c:7183:13: error: incompatible types in comparison expression

kernel/events/ring_buffer.c:169:14: error: incompatible types in comparison expression

Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>
---
 include/linux/perf_event.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 6d4c22aee384..1691107d2800 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -694,7 +694,7 @@ struct perf_event {
 	struct mutex			mmap_mutex;
 	atomic_t			mmap_count;
 
-	struct ring_buffer		*rb;
+	struct ring_buffer __rcu	*rb;
 	struct list_head		rb_entry;
 	unsigned long			rcu_batches;
 	int				rcu_pending;
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ