Thread (16 messages) flat view 16 messages, 3 authors, 2012-07-06

Re: BUG: unable to handle kernel paging request at 00000000d8be176d

From: Eric Dumazet <hidden>
Date: 2012-07-06 06:53:12

On Thu, 2012-07-05 at 23:44 -0700, David Miller wrote:
From: Eric Dumazet <redacted>
Date: Fri, 06 Jul 2012 08:41:47 +0200
quoted
David, what do you think if I submit a patch using following accessor ?

/* get a rt6_info given a dst_entry pointer */
static inline struct rt6_info *dst_rt6_info(struct dst_entry *dst)
{
	return (struct rt6_info *)dst;
}
I'd rather we simply not use address-of pointers in our interfaces
like we do now in some spots.

99 times out of 100 it's a case where PTR_ERR() would do.

I spent a lot of time moving both ipv4 and ipv6 in this direction,
we're almost there, and should simply finish off the remaining
cases.
Not sure what you mean. I dont use address of pointer.

I suggested a type safe thing

ie change all

struct rt6_info *rt = (struct rt6_info *)dst;

by

struct rt6_info *rt = dst_rt6_info(dst);


same generated code, but we have compiler checks instead of a raw cast.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help