All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: "Håkon Bugge" <haakon.bugge@oracle.com>
Cc: kernel test robot <lkp@intel.com>, <kbuild-all@lists.01.org>,
	Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg+lists@ziepe.ca>,
	"OFED mailing list" <linux-rdma@vger.kernel.org>
Subject: Re: [rdma:for-next 16/50] drivers/infiniband/hw/mlx4/cm.c:496:48: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Wed, 2 Sep 2020 09:40:17 -0300	[thread overview]
Message-ID: <20200902124017.GS1152540@nvidia.com> (raw)
In-Reply-To: <CC1EC6BF-BAF0-42C2-9DF2-6E233B702119@oracle.com>

On Wed, Sep 02, 2020 at 02:18:27PM +0200, Håkon Bugge wrote:
> 
> 
> > On 2 Sep 2020, at 13:52, Jason Gunthorpe <jgg@nvidia.com> wrote:
> > 
> > On Wed, Sep 02, 2020 at 02:01:41PM +0800, kernel test robot wrote:
> >> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
> >> head:   524d8ffd07f0ca10b24011487339f836ed859b32
> >> commit: 227a0e142e375909959a74b7782403e14331f6f3 [16/50] IB/mlx4: Add support for REJ due to timeout
> >> config: i386-randconfig-s001-20200902 (attached as .config)
> >> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> >> reproduce:
> >>        # apt-get install sparse
> >>        # sparse version: v0.6.2-191-g10164920-dirty
> >>        git checkout 227a0e142e375909959a74b7782403e14331f6f3
> >>        # save the attached .config to linux build tree
> >>        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 
> >> 
> >> If you fix the issue, kindly add following tag as appropriate
> >> Reported-by: kernel test robot <lkp@intel.com>
> > 
> > Gah!
> > 
> > Håkon, radix trees are not allowed please change this to xarray!
> 
> I believe this is lack of __rcu in the variable definition. I started with
> 
> 	void **slot; 
> 
> but sparse didn't like it, so I changed it to:
> 
> 	__rcu void **slot;
> 
> sparse liked that, but then it didn't like:
> 
> 	struct rej_tmout_entry *item = *slot;
> 
> Shall I change that to:
> 
> 	struct rej_tmout_entry *item = rcu_dereference_protected(*slot, true);
> 
> ?
> 
> 
> Not sure why I need to meld in this rcu stuff when everything is protected by a mutex anyway.
> 
> Please advice,

Change to xarray.

Jason

WARNING: multiple messages have this Message-ID (diff)
From: Jason Gunthorpe <jgg@nvidia.com>
To: kbuild-all@lists.01.org
Subject: Re: [rdma:for-next 16/50] drivers/infiniband/hw/mlx4/cm.c:496:48: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Wed, 02 Sep 2020 09:40:17 -0300	[thread overview]
Message-ID: <20200902124017.GS1152540@nvidia.com> (raw)
In-Reply-To: <CC1EC6BF-BAF0-42C2-9DF2-6E233B702119@oracle.com>

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

On Wed, Sep 02, 2020 at 02:18:27PM +0200, Håkon Bugge wrote:
> 
> 
> > On 2 Sep 2020, at 13:52, Jason Gunthorpe <jgg@nvidia.com> wrote:
> > 
> > On Wed, Sep 02, 2020 at 02:01:41PM +0800, kernel test robot wrote:
> >> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
> >> head:   524d8ffd07f0ca10b24011487339f836ed859b32
> >> commit: 227a0e142e375909959a74b7782403e14331f6f3 [16/50] IB/mlx4: Add support for REJ due to timeout
> >> config: i386-randconfig-s001-20200902 (attached as .config)
> >> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> >> reproduce:
> >>        # apt-get install sparse
> >>        # sparse version: v0.6.2-191-g10164920-dirty
> >>        git checkout 227a0e142e375909959a74b7782403e14331f6f3
> >>        # save the attached .config to linux build tree
> >>        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 
> >> 
> >> If you fix the issue, kindly add following tag as appropriate
> >> Reported-by: kernel test robot <lkp@intel.com>
> > 
> > Gah!
> > 
> > Håkon, radix trees are not allowed please change this to xarray!
> 
> I believe this is lack of __rcu in the variable definition. I started with
> 
> 	void **slot; 
> 
> but sparse didn't like it, so I changed it to:
> 
> 	__rcu void **slot;
> 
> sparse liked that, but then it didn't like:
> 
> 	struct rej_tmout_entry *item = *slot;
> 
> Shall I change that to:
> 
> 	struct rej_tmout_entry *item = rcu_dereference_protected(*slot, true);
> 
> ?
> 
> 
> Not sure why I need to meld in this rcu stuff when everything is protected by a mutex anyway.
> 
> Please advice,

Change to xarray.

Jason

  reply	other threads:[~2020-09-02 12:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02  6:01 [rdma:for-next 16/50] drivers/infiniband/hw/mlx4/cm.c:496:48: sparse: sparse: incorrect type in initializer (different address spaces) kernel test robot
2020-09-02  6:01 ` kernel test robot
2020-09-02 11:52 ` Jason Gunthorpe
2020-09-02 11:52   ` Jason Gunthorpe
2020-09-02 12:18   ` Håkon Bugge
2020-09-02 12:18     ` Håkon Bugge
2020-09-02 12:40     ` Jason Gunthorpe [this message]
2020-09-02 12:40       ` Jason Gunthorpe
2020-09-02 13:06       ` Håkon Bugge
2020-09-02 13:06         ` Håkon Bugge

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=20200902124017.GS1152540@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=dledford@redhat.com \
    --cc=haakon.bugge@oracle.com \
    --cc=jgg+lists@ziepe.ca \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lkp@intel.com \
    /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.