<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 15, 2020 at 8:35 PM Wei Liu <<a href="mailto:wei.liu@kernel.org">wei.liu@kernel.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Jan 15, 2020 at 07:48:40PM +0530, <a href="mailto:madhuparnabhowmik04@gmail.com" target="_blank">madhuparnabhowmik04@gmail.com</a> wrote:<br>
> From: Madhuparna Bhowmik <<a href="mailto:madhuparnabhowmik04@gmail.com" target="_blank">madhuparnabhowmik04@gmail.com</a>><br>
> <br>
> list_for_each_entry_rcu has built-in RCU and lock checking.<br>
> Pass cond argument to list_for_each_entry_rcu.<br>
> <br>
> Signed-off-by: Madhuparna Bhowmik <<a href="mailto:madhuparnabhowmik04@gmail.com" target="_blank">madhuparnabhowmik04@gmail.com</a>><br>
<br>
You seem to have dropped the second hunk which modified<br>
xenvif_flush_hash, is that a mistake?<br></blockquote><div> </div><div>I am sorry again, Yes I forgot to add the second hunk.</div><div>I will send the final patch with both the hunks in a while.</div><div><br></div><div>Thank you,</div><div>Madhuparna</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Wei.<br>
<br>
> ---<br>
>  drivers/net/xen-netback/hash.c | 3 ++-<br>
>  1 file changed, 2 insertions(+), 1 deletion(-)<br>
> <br>
> diff --git a/drivers/net/xen-netback/hash.c b/drivers/net/xen-netback/hash.c<br>
> index 10d580c3dea3..3f9783f70a75 100644<br>
> --- a/drivers/net/xen-netback/hash.c<br>
> +++ b/drivers/net/xen-netback/hash.c<br>
> @@ -51,7 +51,8 @@ static void xenvif_add_hash(struct xenvif *vif, const u8 *tag,<br>
>  <br>
>       found = false;<br>
>       oldest = NULL;<br>
> -     list_for_each_entry_rcu(entry, &vif->hash.cache.list, link) {<br>
> +     list_for_each_entry_rcu(entry, &vif->hash.cache.list, link,<br>
> +                             lockdep_is_held(&vif->hash.cache.lock)) {<br>
>               /* Make sure we don't add duplicate entries */<br>
>               if (entry->len == len &&<br>
>                   memcmp(entry->tag, tag, len) == 0)<br>
> -- <br>
> 2.17.1<br>
> <br>
</blockquote></div></div>