Thread (13 messages) 13 messages, 2 authors, 2020-06-29

Re: [PATCH net-next 1/3] cxgb4: add mirror action to TC-MATCHALL offload

From: Jakub Kicinski <kuba@kernel.org>
Date: 2020-06-27 04:18:48

On Thu, 25 Jun 2020 17:28:41 +0530 Rahul Lakkireddy wrote:
+	if (refcount_read(&pi->vi_mirror_refcnt) > 1) {
+		refcount_dec(&pi->vi_mirror_refcnt);
+		return;
+	}
FWIW this looks very dodgy. If you know nothing changes the count
between the read and the dec here, you probably don't need atomic
refcounts at all..
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help