[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121029163544.GA10177@hmsreliant.think-freely.org>
Date: Mon, 29 Oct 2012 12:35:44 -0400
From: Neil Horman <nhorman@...driver.com>
To: Vlad Yasevich <vyasevich@...il.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
linux-sctp@...r.kernel.org
Subject: Re: [PATCH v2] sctp: Clean up type-punning in sctp_cmd_t union
On Fri, Oct 26, 2012 at 03:12:54PM -0400, Vlad Yasevich wrote:
> On 10/26/2012 09:41 AM, Neil Horman wrote:
> >Lots of points in the sctp_cmd_interpreter function treat the sctp_cmd_t arg as
> >a void pointer, even though they are written as various other types. Theres no
> >need for this as doing so just leads to possible type-punning issues that could
> >cause crashes, and if we remain type-consistent we can actually just remove the
> >void * member of the union entirely.
> >
> >Change Notes:
> >
> >v2)
> > * Dropped chunk that modified SCTP_NULL to create a marker pattern
> > should anyone try to use a SCTP_NULL() assigned sctp_arg_t, Assigning
> > to .zero provides the same effect and should be faster, per Vlad Y.
> >
> >Signed-off-by: Neil Horman <nhorman@...driver.com
> >CC: Vlad Yasevich <vyasevich@...il.com>
>
> Acked-by: Vlad Yasevich <vyasevich@...il.com>
>
> -vlad
>
Thanks for the ACk Vlad, do you have any thoughts regarding Dave M's comments
above on this .zero/memset question? He makes a good point regarding complete
initalization I think.
Neil
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists