From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Hartkopp Subject: Re: [PATCH] can-raw: Fix skb_orphan_try handling Date: Tue, 03 Aug 2010 19:11:14 +0200 Message-ID: <4C584DB2.8020406@hartkopp.net> References: <4C529EFB.4090601@hartkopp.net> <20100801.010337.68133932.davem@davemloft.net> <4C555168.3090800@hartkopp.net> <20100803.003056.216763358.davem@davemloft.net> <4C583447.8010004@hartkopp.net> <1280852081.3266.834.camel@pohly-mobl1.ikn.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org" , "netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , David Miller , "eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" To: Patrick Ohly Return-path: In-Reply-To: <1280852081.3266.834.camel-/oqbx4SGF9pV+x+AlpbFz62pdiUAq4bhAL8bYrjMMd8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org Errors-To: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org List-Id: netdev.vger.kernel.org On 03.08.2010 18:14, Patrick Ohly wrote: > On Tue, 2010-08-03 at 18:22 +0300, Oliver Hartkopp wrote: >>>> The flags are tested all together in skb_orphan_try() ... >>> >>> This is why I hate using unions in situations like this... it makes >>> code impossible to audit easily. >>> >>> This damn thing should just be a "u8 flags" and a bunch of bit mask >>> CPP macro defines for the various boolean values. >> >> Yep! I also felt like this. >> >> Maybe Patrick Ohly can give some feedback, if he's ok with that kind of >> change. So far there are only a few places that would need to be changed for >> the flags bitops. > > I'm fine with using a simple u8. I'm not sure where I picked up the > union thing, it's not something that I usually do in my own code. > :-) Im currently busy until next week, would you like to provide a patch? Regards, Oliver