[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211025145043.GA357677@nvidia.com>
Date: Mon, 25 Oct 2021 11:50:43 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Leon Romanovsky <leon@...nel.org>
Cc: Doug Ledford <dledford@...hat.com>,
Mark Zhang <markzhang@...dia.com>,
Ira Weiny <ira.weiny@...el.com>,
John Fleck <john.fleck@...el.com>,
Kaike Wan <kaike.wan@...el.com>, linux-kernel@...r.kernel.org,
linux-rdma@...r.kernel.org, Maor Gottlieb <maorg@...dia.com>,
Mark Bloch <markb@...lanox.com>, Mark Bloch <mbloch@...dia.com>
Subject: Re: [PATCH rdma-rc 2/2] RDMA/core: Initialize lock when allocate a
rdma_hw_stats structure
On Sun, Oct 24, 2021 at 09:08:21AM +0300, Leon Romanovsky wrote:
> From: Mark Zhang <markzhang@...dia.com>
>
> Initialize the rdma_hw_stats "lock" field when do allocation, to fix the
> warning below. Then we don't need to initialize it in sysfs, remove it.
This is a fine cleanup, but this does not describe the bug properly,
or have the right fixes line..
The issue is here:
static struct rdma_counter *alloc_and_bind(struct ib_device *dev, u32 port,
struct ib_qp *qp,
enum rdma_nl_counter_mode mode)
{
counter->stats = dev->ops.counter_alloc_stats(counter);
if (!counter->stats)
goto err_stats;
Which does not init counter->stat's mutex.
And trim the oops reports, don't include the usless ? fns, timestamps
or other junk.
Jason
Powered by blists - more mailing lists