public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Infiniband stack allows references to freed memory
Date: Wed, 1 Feb 2012 18:02:53 -0700	[thread overview]
Message-ID: <20120202010253.GB25606@obsidianresearch.com> (raw)
In-Reply-To: <CAG4TOxMbDxYYyLRFJqvpDQk99f5cA7M=AA37W9R=yL5tBeshdQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Wed, Feb 01, 2012 at 03:32:26PM -0800, Roland Dreier wrote:

> > Would making the allocation of the neigh structure returned by
> > dst_lookup_neigh() large enough to hold the ARP/ND HW addr and also
> > the IB path record solve these problems? At least for UD?
> 
> I don't think so, because we don't always have a neighbour when
> we get a packet to send (eg unicast ARP), and we need a place to
> queue up packets while we do the path lookup (the ipoib_neigh.queue
> list does that now).  So we definitely need paths/AHs separate from
> neighs for the first part and we need more than just data in the neigh
> for the second part.

I guess I'm missing something. I thought the stack didn't have
a unicast hwaddr separate from a neighbour structure? Isn't that where
it is stored? Unicast arp does have a destination IP address and a
destination hwaddr...

To elaborate a bit more what was idly in my head, if the new approach
is to always lookup the neighbor on demand, and that can include an
ARP to the network, then can't we piggyback on that same process to
issue a path record? With a 1:1 correspondence between unicast
neighbour, path record, and AH they can all be stored in the same
allocation, with the same lifetime. Thus you don't need the second
part, and maybe the first part becomes an inefficient special case?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2012-02-02  1:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01 20:22 Infiniband stack allows references to freed memory David Miller
     [not found] ` <20120201.152213.433850213028883896.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-02-01 21:04   ` Roland Dreier
     [not found]     ` <CAG4TOxPrAhac1y-TzA=x47sm88JfQdkrpWW4Em_mBD=KbyRo+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-01 21:13       ` David Miller
     [not found]         ` <20120201.161333.2203265702893105548.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-02-01 21:42           ` Roland Dreier
     [not found]             ` <CAG4TOxMHG04_REzB9faBcjgUS43845qG5CgDYCUfLDYC6sEjmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-01 21:50               ` David Miller
     [not found]                 ` <20120201.165041.1820098802489365638.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-02-01 22:02                   ` David Miller
     [not found]                     ` <20120201.170210.981802234698152048.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-02-01 22:06                       ` Roland Dreier
     [not found]                         ` <CAG4TOxNNTOc0hwjOuEa-p2SBf5GBnEjVQyOERiTq5gkprLioYQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-01 22:17                           ` David Miller
     [not found]                             ` <20120201.171703.1299449838314569881.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-02-01 23:28                               ` Roland Dreier
     [not found]                                 ` <CAG4TOxN75jXze4iy_nCBO1vwqvXnwKcqbAFAEFR=n-PdiG4moA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-02  1:21                                   ` David Miller
     [not found]                                     ` <20120201.202128.703330634975191244.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-02-02  2:19                                       ` Roland Dreier
2012-04-17  8:02                                       ` Or Gerlitz
     [not found]                                         ` <4F8D23A0.7000109-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2012-04-18  3:04                                           ` David Miller
     [not found]                                             ` <20120417.230418.1898458010494189728.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-04-18  5:58                                               ` Or Gerlitz
     [not found]                                                 ` <4F8E57F8.9050703-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2012-04-18  6:15                                                   ` David Miller
     [not found]                                                     ` <20120418.021558.255251358104374047.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-04-18  7:55                                                       ` Or Gerlitz
2012-02-01 22:26               ` Jason Gunthorpe
     [not found]                 ` <20120201222638.GA24483-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2012-02-01 23:32                   ` Roland Dreier
     [not found]                     ` <CAG4TOxMbDxYYyLRFJqvpDQk99f5cA7M=AA37W9R=yL5tBeshdQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-02  1:02                       ` Jason Gunthorpe [this message]
     [not found]                         ` <20120202010253.GB25606-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2012-02-02  1:42                           ` Roland Dreier

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=20120202010253.GB25606@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox