Re: [PATCH] container_of: add type safety

From: Greg Kroah-Hartman
Date: Wed Mar 08 2023 - 12:57:49 EST


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 :(