From: David Miller <davem@davemloft.net>
To: dwmw2@infradead.org
Cc: netdev@vger.kernel.org, simon@fire.lp0.eu,
linux-atm-general@lists.sourceforge.net, nathan@traverse.com.au
Subject: Re: [PATCH RFC] solos-pci: Fix BUG() with shared skb
Date: Wed, 04 Sep 2013 14:30:56 -0400 (EDT) [thread overview]
Message-ID: <20130904.143056.1558570610941220565.davem@davemloft.net> (raw)
In-Reply-To: <1378223125.4210.11.camel@i7.infradead.org>
From: David Woodhouse <dwmw2@infradead.org>
Date: Tue, 03 Sep 2013 16:45:25 +0100
> Simon reported this BUG():
>
> kernel BUG at net/core/skbuff.c:1065!
> Call Trace:
> [<f9b7c12c>] ? pppoatm_send+0x3f/0x1a0 [pppoatm]
> [<f8751797>] psend+0xa9/0x14a [solos_pci]
> [<f9b7c248>] pppoatm_send+0x15b/0x1a0 [pppoatm]
> [<f8a2f77d>] ppp_push+0x76/0x533 [ppp_generic]
>
> (Rest of backtrace at http://s85.org/mn0aOxMN ― the skb appears to be
> IPv6, forwarded from another interface over PPPoATM.)
>
> I wasn't expecting to see shared skbs in the ATM driver's ->send()
> function. Is this the right fix?
skb_realloc_headroom() should do everything you need.
This is what ethernet drivers do to prepend custom headers
when skb_headroom() is not large enough.
For example, see drivers/net/ethernet/sun/niu.c:niu_start_xmit().
There, the driver is attempting to prepend a TX descriptor to the
SKB.
If the SKB is shared, skb_realloc_headroom() will do the clone
for you if necessary.
next prev parent reply other threads:[~2013-09-04 18:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-03 15:45 [PATCH RFC] solos-pci: Fix BUG() with shared skb David Woodhouse
2013-09-04 18:30 ` David Miller [this message]
2013-09-04 20:41 ` David Woodhouse
2013-09-04 21:51 ` David Miller
2015-09-15 19:10 ` David Woodhouse
2015-09-16 11:32 ` Simon Arlott
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=20130904.143056.1558570610941220565.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dwmw2@infradead.org \
--cc=linux-atm-general@lists.sourceforge.net \
--cc=nathan@traverse.com.au \
--cc=netdev@vger.kernel.org \
--cc=simon@fire.lp0.eu \
/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).