All of lore.kernel.org
 help / color / mirror / Atom feed
From: Atis Elsts <atis.elsts@gmail.com>
To: Jarek Poplawski <jarkao2@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	shemminger@vyatta.com, djohnson@starentnetworks.com,
	sakkiped@starentnetworks.com, netdev@vger.kernel.org
Subject: Re: [PATCH] ipv6: Fix possible NULL dereference in icmp6_dst_alloc
Date: Wed, 27 Jan 2010 14:35:10 +0200	[thread overview]
Message-ID: <7f9bf5711001270435v29217b9cw15a49a1d71580cc5@mail.gmail.com> (raw)
In-Reply-To: <20100127121746.GA15611@ff.dom.local>

> On Wed, Jan 27, 2010 at 03:04:16AM -0800, David Miller wrote:
>> From: Jarek Poplawski <jarkao2@gmail.com>
>> Date: Wed, 27 Jan 2010 10:34:17 +0000
>>
>> > (Btw, maybe it's a sign this might be more readable?)
>>
>> I welcome suggests that, tree wide, would make this harder
>> to misinterpret.

How about adding static inline functions for accessing the dst_entry
field in struct route via a cast? That way it would be immediately
obvious that invalid memory access is not going to happen. Like this:

static inline struct dst_entry *route_dst(struct rtable *rt)
{
	return (struct dst_entry *)rt;
}

static inline struct dst_entry *route6_dst(struct rt6_info *rt)
{
	return (struct dst_entry *)rt;
}

and so on...

Atis

      parent reply	other threads:[~2010-01-27 12:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-22 21:57 Deadlock in IPv6 code while garbage collection on the rwlock protecting the routing tree Akkipeddi, Srinivas
2009-12-22 22:36 ` Stephen Hemminger
2009-12-23 17:44   ` Dave Johnson
2009-12-23 18:13     ` Stephen Hemminger
2010-01-23 10:22       ` David Miller
2010-01-26  9:48         ` Jarek Poplawski
2010-01-26 10:35           ` Jarek Poplawski
2010-01-27  9:59             ` [PATCH] ipv6: Fix possible NULL dereference in icmp6_dst_alloc Jarek Poplawski
2010-01-27 10:14               ` David Miller
2010-01-27 10:34                 ` Jarek Poplawski
2010-01-27 11:04                   ` David Miller
2010-01-27 12:17                     ` Jarek Poplawski
2010-01-27 12:23                       ` David Miller
2010-01-27 12:43                         ` Jarek Poplawski
2010-01-27 13:14                           ` David Miller
2010-01-27 13:28                             ` Jarek Poplawski
2010-01-27 12:35                       ` Atis Elsts [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f9bf5711001270435v29217b9cw15a49a1d71580cc5@mail.gmail.com \
    --to=atis.elsts@gmail.com \
    --cc=davem@davemloft.net \
    --cc=djohnson@starentnetworks.com \
    --cc=jarkao2@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sakkiped@starentnetworks.com \
    --cc=shemminger@vyatta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.