netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
To: Krzysztof Halasa <khc@pm.waw.pl>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] NET: fix kernel panic from no dev->hard_header_len space
Date: Tue, 1 Aug 2006 23:54:31 +0400	[thread overview]
Message-ID: <20060801195431.GA29335@ms2.inr.ac.ru> (raw)
In-Reply-To: <m3bqr5z0ah.fsf@defiant.localdomain>

Hello!

> > Alexey, any suggestions on how to handle this kind of thing?

Device, which adds something at head must check for space.
Anyone, who adds something at head, must check.
Otherwise, it will remain buggy forever.


> What's wrong with my patch?

As I already said there is nothing wrong with the first chunk.
Except that it hides the real problem.


> hardly their author's fault. I don't think we've ever advertised
> "hard_header_len is valid only with non-NULL hard_header".

Do not get it wrong. dev->hard_header_len is _NEVER_ guaranteed.
The places, which allocate skb, take it as a hint to avoid reallocation.
But each place which stuffs something at head, still must check the space.

The only difference between the situation with dev->hard_header,
is that when dev->hard_header != NULL, the header is added by IP itself.
That's why IP checks it.

Alexey

  reply	other threads:[~2006-08-01 19:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-27 13:56 [PATCH] NET: fix kernel panic from no dev->hard_header_len space Krzysztof Halasa
2006-07-27 16:43 ` Alexey Kuznetsov
2006-07-27 17:28   ` Krzysztof Halasa
2006-07-28 14:11     ` Krzysztof Halasa
2006-07-30 16:40   ` Krzysztof Halasa
2006-07-30 22:30     ` David Miller
2006-07-31 15:39       ` Alexey Kuznetsov
     [not found]         ` <m3r701zgku.fsf@defiant.localdomain>
2006-07-31 20:23           ` David Miller
2006-08-01  1:04             ` Krzysztof Halasa
2006-08-01  1:13               ` David Miller
2006-08-01  1:56                 ` Krzysztof Halasa
2006-08-01 19:54                   ` Alexey Kuznetsov [this message]
2006-08-02  0:24                     ` Krzysztof Halasa
2006-08-02  0:38                       ` David Miller
2006-08-02 21:11                         ` Krzysztof Halasa
2006-07-31 20:24           ` David Miller
2006-08-01 20:25     ` Alexey Kuznetsov
2006-08-02  0:42       ` Krzysztof Halasa
2006-08-02  0:48         ` 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=20060801195431.GA29335@ms2.inr.ac.ru \
    --to=kuznet@ms2.inr.ac.ru \
    --cc=davem@davemloft.net \
    --cc=khc@pm.waw.pl \
    --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).