From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
To: Andi Kleen <andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org>
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org,
davem <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Subject: Re: [PATCH] Fix up truesize after pskb_expand_head() in wireless stack
Date: Sun, 04 Jan 2009 17:41:28 +0100 [thread overview]
Message-ID: <1231087288.3296.15.camel@johannes> (raw)
In-Reply-To: <20090104162826.GT496-qrUzlfsMFqo/4alezvVtWx2eb7JE58TQ@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]
On Sun, 2009-01-04 at 17:28 +0100, Andi Kleen wrote:
> > Thanks, but I'll need to look at this in more detail, we need to make
> > sure that we orphan the skb before
>
> What do you mean with orphaning the skb?
Well, touching truesize is absolutely not allowed while the skb is
charged to a socket. This is what causes the truesize warning. The thing
we need to do is figure out is why the skb has a wrong truesize.
> etc. And then, we need to check
> > whether it makes sense to do this in pskb_expand_head().
>
> Well whatever you do this short term patch is needed, there's no
> reason to delay it.
Given that we've had this problem for a very long time now I think
there's no reason to rush a workaround now. I realise that we already
have a workaround like this in the tx path which we added because I
thought the tx path was the problem, but it still doesn't make much
sense to work around it at all spots until we know why it is required.
I think this patch similarly just papers over the problem with
pskb_expand_head(). I haven't looked through all the code yet, but if
anything then I think pskb_expand_head() should fix up truesize
afterwards, and we should audit all other callers too. Similar problems
exist in net/core/pktgen.c, drivers/net/wireless/libertas/rx.c,
net/ipv4/netfilter.c and many more, though those seem to not run into
trouble. Only a few users adjust truesize.
Any proper fix should also verify that the skb isn't charged to a socket
while it's being reallocated.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2009-01-04 16:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-04 15:18 [PATCH] Fix up truesize after pskb_expand_head() in wireless stack Andi Kleen
[not found] ` <20090104151819.GA6590-3rXA9MLqAseW/qJFnhkgxti2O/JbrIOy@public.gmane.org>
2009-01-04 16:05 ` Johannes Berg
2009-01-04 16:28 ` Andi Kleen
[not found] ` <20090104162826.GT496-qrUzlfsMFqo/4alezvVtWx2eb7JE58TQ@public.gmane.org>
2009-01-04 16:41 ` Johannes Berg [this message]
2009-01-04 17:43 ` Andi Kleen
[not found] ` <20090104174339.GX496-qrUzlfsMFqo/4alezvVtWx2eb7JE58TQ@public.gmane.org>
2009-01-04 17:33 ` Johannes Berg
2009-01-04 18:41 ` Andi Kleen
2009-01-05 6:49 ` David Miller
2009-01-05 13:32 ` Andi Kleen
2009-01-05 8:36 ` Johannes Berg
2009-01-05 13:21 ` Andi Kleen
[not found] ` <20090105132141.GO496-qrUzlfsMFqo/4alezvVtWx2eb7JE58TQ@public.gmane.org>
2009-01-05 13:16 ` Johannes Berg
2009-01-05 13:36 ` Andi Kleen
2009-01-05 13:31 ` Johannes Berg
2009-01-05 14:05 ` Andi Kleen
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=1231087288.3296.15.camel@johannes \
--to=johannes-cdvu00un1vgdhxzaddlk8q@public.gmane.org \
--cc=andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@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;
as well as URLs for NNTP newsgroup(s).