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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 15 Jan 2020 19:48:40 +0530 From: madhuparnabhowmik04@...il.com To: wei.liu@...nel.org, paul@....org Cc: xen-devel@...ts.xenproject.org, netdev@...r.kernel.org, linux-kernel@...r.kernel.org, paulmck@...nel.org, joel@...lfernandes.org, frextrite@...il.com, linux-kernel-mentees@...ts.linuxfoundation.org, Madhuparna Bhowmik <madhuparnabhowmik04@...il.com> Subject: [PATCH] net: xen-netback: hash.c: Use built-in RCU list checking From: Madhuparna Bhowmik <madhuparnabhowmik04@...il.com> list_for_each_entry_rcu has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu. Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04@...il.com> --- drivers/net/xen-netback/hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/xen-netback/hash.c b/drivers/net/xen-netback/hash.c index 10d580c3dea3..3f9783f70a75 100644 --- a/drivers/net/xen-netback/hash.c +++ b/drivers/net/xen-netback/hash.c @@ -51,7 +51,8 @@ static void xenvif_add_hash(struct xenvif *vif, const u8 *tag, found = false; oldest = NULL; - list_for_each_entry_rcu(entry, &vif->hash.cache.list, link) { + list_for_each_entry_rcu(entry, &vif->hash.cache.list, link, + lockdep_is_held(&vif->hash.cache.lock)) { /* Make sure we don't add duplicate entries */ if (entry->len == len && memcmp(entry->tag, tag, len) == 0) -- 2.17.1
Powered by blists - more mailing lists