public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: linux-kernel@vger.kernel.org, Jason Gunthorpe <jgg@ziepe.ca>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Matthew Wilcox <willy@infradead.org>,
	Jason Gunthorpe <jgg@nvidia.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH] container_of: add type safety
Date: Wed, 8 Mar 2023 18:57:35 +0100	[thread overview]
Message-ID: <ZAjMj01l4A/eR0JX@kroah.com> (raw)
In-Reply-To: <c3611f95862a7f30d67d1c3cc56aaf7bb93d3b59.1678296892.git.mst@redhat.com>

On Wed, Mar 08, 2023 at 12:35:03PM -0500, Michael S. Tsirkin wrote:
> Using a wrong member in container_of will result in an error.
> No so for container_of_const - it is just a cast so will
> happily give you a wrong pointer.
> 
> Use logic from container_of to add safety.

Also your subject line is wrong :(


      parent reply	other threads:[~2023-03-08 17:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08 17:35 [PATCH] container_of: add type safety Michael S. Tsirkin
2023-03-08 17:57 ` Greg Kroah-Hartman
2023-03-08 20:58   ` Michael S. Tsirkin
2023-03-08 17:57 ` Greg Kroah-Hartman [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=ZAjMj01l4A/eR0JX@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jgg@nvidia.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=rafael@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox