All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Cc: Shlomo Pongratz <shlomop-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] IB/ipoib: Fix RCU annotations in ipoib_neigh_hash_init()
Date: Tue, 26 May 2015 11:55:21 -0400	[thread overview]
Message-ID: <1432655721.28905.116.camel@redhat.com> (raw)
In-Reply-To: <55646F34.9010803-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1557 bytes --]

On Tue, 2015-05-26 at 15:03 +0200, Bart Van Assche wrote:
> Avoid that sparse complains about ipoib_neigh_hash_init(). This
> patch does not change any functionality. See also patch "IPoIB:
> Fix memory leak in the neigh table deletion flow" (commit ID
> 66172c09938b).
> 
> Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
> Cc: Shlomo Pongratz <shlomop-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>  drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index 9e1b203..fec8207 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -1128,7 +1128,7 @@ static int ipoib_neigh_hash_init(struct ipoib_dev_priv *priv)
>  {
>  	struct ipoib_neigh_table *ntbl = &priv->ntbl;
>  	struct ipoib_neigh_hash *htbl;
> -	struct ipoib_neigh **buckets;
> +	struct ipoib_neigh __rcu **buckets;
>  	u32 size;
>  
>  	clear_bit(IPOIB_NEIGH_TBL_FLUSH, &priv->flags);
> @@ -1146,7 +1146,7 @@ static int ipoib_neigh_hash_init(struct ipoib_dev_priv *priv)
>  	htbl->size = size;
>  	htbl->mask = (size - 1);
>  	htbl->buckets = buckets;
> -	ntbl->htbl = htbl;
> +	RCU_INIT_POINTER(ntbl->htbl, htbl);
>  	htbl->ntbl = ntbl;
>  	atomic_set(&ntbl->entries, 0);
>  

Thanks, applied.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
              GPG KeyID: 0E572FDD


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      parent reply	other threads:[~2015-05-26 15:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26 13:03 [PATCH] IB/ipoib: Fix RCU annotations in ipoib_neigh_hash_init() Bart Van Assche
     [not found] ` <55646F34.9010803-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2015-05-26 15:55   ` Doug Ledford [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432655721.28905.116.camel@redhat.com \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=shlomop-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.