public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roman Gushchin <roman.gushchin@linux.dev>
To: Parav Pandit <parav@mellanox.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
	Maher Sanalla <msanalla@nvidia.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] RDMA/core: don't expose hw_counters outside of init net namespace
Date: Thu, 27 Feb 2025 16:48:23 +0000	[thread overview]
Message-ID: <Z8CXV4c9GSPXvgLN@google.com> (raw)
In-Reply-To: <CY8PR12MB719566F1EE6987670B7D85F0DCCD2@CY8PR12MB7195.namprd12.prod.outlook.com>

On Thu, Feb 27, 2025 at 05:22:59AM +0000, Parav Pandit wrote:
> 
> > From: Roman Gushchin <roman.gushchin@linux.dev>
> > Sent: Thursday, February 27, 2025 12:32 AM
> > 
> > Commit 5fd8529350f0 ("RDMA/core: fix a NULL-pointer dereference in
> > hw_stat_device_show()") accidentally almost exposed hw counters to non-init
> > net namespaces. It didn't expose them fully, as an attempt to read any of
> > those counters leads to a crash like this one:
> > 
> It is not the commit 5fd8529350f0.
> You just want to say cited commit accidentally..

Right, it's a typo, it had to be 467f432a521a ("RDMA/core: Split port
and device counter sysfs attributes").

> >  	WARN(true, "struct ib_device->groups is too small"); diff --git
> > a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index
> > b59bf30de430..a5761038935d 100644
> > --- a/include/rdma/ib_verbs.h
> > +++ b/include/rdma/ib_verbs.h
> > @@ -2767,6 +2767,7 @@ struct ib_device {
> >  	 * It is a NULL terminated array.
> >  	 */
> >  	const struct attribute_group	*groups[4];
> > +	u8				hw_stats_attr_index;
> > 
> >  	u64			     uverbs_cmd_mask;
> > 
> > --
> > 2.48.1.711.g2feabab25a-goog
> 
> With above suggested small commit log correction, 
> Reviewed-by: Parav Pandit <parav@nvidia.com>

Thank you!

  reply	other threads:[~2025-02-27 16:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-26 19:02 [PATCH] RDMA/core: don't expose hw_counters outside of init net namespace Roman Gushchin
2025-02-27  5:22 ` Parav Pandit
2025-02-27 16:48   ` Roman Gushchin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-27 16:54 Roman Gushchin
2025-03-02 12:07 ` Leon Romanovsky

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=Z8CXV4c9GSPXvgLN@google.com \
    --to=roman.gushchin@linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=msanalla@nvidia.com \
    --cc=parav@mellanox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox