[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CBE87BE@AcuExch.aculab.com>
Date: Tue, 8 Dec 2015 14:35:34 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'David Miller' <davem@...emloft.net>,
"eric.dumazet@...il.com" <eric.dumazet@...il.com>
CC: "davej@...emonkey.org.uk" <davej@...emonkey.org.uk>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: 4.4-rc2 xfrm_lookup kasan trace
From: Of David Miller
> Sent: 03 December 2015 16:59
> From: Eric Dumazet <eric.dumazet@...il.com>
> Date: Mon, 30 Nov 2015 17:22:11 -0800
>
> > @@ -2198,6 +2198,7 @@ struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig,
> > xdst = NULL;
> > route = NULL;
> >
> > + sk = sk_to_full_sk((struct sock *)sk);
>
> The war against const...
>
> I know this is the only instance where const is input, but you may want to
> consider adding the const verion of the helper anyways to avoid ugly casts
> like this.
In that case you could use something like:
#define SK_TO_FULL_SK(sk) (typeof (sk))sk_to_full_sk(sk))
With the helper arg and result being 'const struct sock *'.
David
--
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