Re: [PATCH rdma-next] RDMA/srpt: Fix RCU debug build error

Doug Ledford
2018-01-24T22:36:33Z

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

On Tue, 2018-01-23 at 22:30 +0000, Bart Van Assche wrote:
> On Tue, 2018-01-23 at 20:57 +0200, Leon Romanovsky wrote:
> > So how are we going to solve that rdma/for-next doesn't compile?
>
> How about the following?
>
> [PATCH] IB/srpt: Fix CONFIG_DEBUG_OBJECTS_RCU_HEAD=y build
>
> Avoid that the kernel build fails as follows if RCU debugging is
> enabled:
>
> ERROR: "init_rcu_head" [drivers/infiniband/ulp/srpt/ib_srpt.ko] undefined!
>
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index 5ccc75c389e2..a78a79791950 100644
> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> @@ -1977,7 +1977,6 @@ static struct srpt_nexus *srpt_get_nexus(struct srpt_port *sport,
> nexus = ERR_PTR(-ENOMEM);
> break;
> }
> - init_rcu_head(&tmp_nexus->rcu);
> INIT_LIST_HEAD(&tmp_nexus->ch_list);
> memcpy(tmp_nexus->i_port_id, i_port_id, 16);
> memcpy(tmp_nexus->t_port_id, t_port_id, 16);
> @@ -2147,7 +2146,6 @@ static int srpt_cm_req_recv(struct srpt_device *const sdev,
> goto reject;
> }
>
> - init_rcu_head(&ch->rcu);
> kref_init(&ch->kref);
> ch->pkey = be16_to_cpu(pkey);
> ch->nexus = nexus;

Hi Bart,

Can you please resend this as an official patch with SOB so we can pull
this in? Thanks.

--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD

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