From: Steffen Klassert <steffen.klassert@secunet.com>
To: David Miller <davem@davemloft.net>
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] xfrm: Force a dst refcount before entering the xfrm type handlers
Date: Wed, 16 Mar 2011 08:43:06 +0100 [thread overview]
Message-ID: <20110316074306.GT31402@secunet.com> (raw)
In-Reply-To: <20110316.001732.112599674.davem@davemloft.net>
On Wed, Mar 16, 2011 at 12:17:32AM -0700, David Miller wrote:
>
> Steffen we really need to find another way to fix these problems.
>
> We already make way too many expensive atomic operations in these code
> paths modified by your 3 patches, we should strive to not add new
> ones.
>
I know that it is exspensive, but we have to take a refcount if
the crypto layer returns asyncronous. Unfortunately it is too
late to take the refcount when the crypto layer notifies us about
that as the skb might be already gone.
The second patch just moves the refcount from xfrm_output_one
to skb_dst_pop. As xfrm_output_one is the only user of
skb_dst_pop, we take the refcont just a bit realier.
The third one makes the socket policy case consistent to the
case where we get the destination entry from the flow cache
where we take a reference. We can either return the dst entry
with or without a refcont in both cases. But we can't return
sometimes with and somtimes without a refcount.
I'd be happy to see all these refcounts gone too of course,
but that's way beyond a simple bug fix.
Steffen
next prev parent reply other threads:[~2011-03-16 7:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-16 7:08 [PATCH 1/2] xfrm: Force a dst refcount before entering the xfrm type handlers Steffen Klassert
2011-03-16 7:09 ` [PATCH 2/2] dst: Clone child entry in skb_dst_pop Steffen Klassert
2011-03-16 7:17 ` [PATCH 1/2] xfrm: Force a dst refcount before entering the xfrm type handlers David Miller
2011-03-16 7:43 ` Steffen Klassert [this message]
2011-03-16 17:41 ` David Miller
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=20110316074306.GT31402@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).