netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
To: ext David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, mporter@kernel.crashing.org,
	alexandre.bounine@idt.com, frank.kunz@nokia.com,
	marek.krzyzowski@nokia.com
Subject: Re: [PATCH] rionet: Don't try to corrupt skbuff assigning data pointer directly
Date: Fri, 3 Jul 2015 09:24:27 +0200	[thread overview]
Message-ID: <559638AB.9010707@nokia.com> (raw)
In-Reply-To: <20150702.121204.1674202660204278751.davem@davemloft.net>

Hi David,

On 02/07/15 21:12, ext David Miller wrote:
>> It's not allowed to assign data pointer of skbuff directly, this makes no sense
>> > if the assigned pointer is the very same as already existing one, or it brakes
>> > all the pointer arithmetics in all other cases. We cannot do better as just
>> > compare them and report BUG() in case of mismatch.
>> > 
>> > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
> BUG takes the entire machine out, which is worse than corrupting the
> skb->data
> 
> If you really want to assert this condition, do it in a way that
> doesn't kill the entire machine.

In fact, the machine goes down, some milliseconds later, but because of the following
inconsistencies, which are misleading. The function has no way to signal an error and
this line of code is simply wrong. To prevent others from copying this error, we can
simply delete it. Would it be fine from your PoV?

-- 
Best regards,
Alexander Sverdlin.

  reply	other threads:[~2015-07-03  7:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01 13:01 [PATCH] rionet: Don't try to corrupt skbuff assigning data pointer directly Alexander Sverdlin
2015-07-02 19:12 ` David Miller
2015-07-03  7:24   ` Alexander Sverdlin [this message]
2015-07-03  7:27     ` Krzyzowski, Marek (Nokia - DE/Ulm)

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=559638AB.9010707@nokia.com \
    --to=alexander.sverdlin@nokia.com \
    --cc=alexandre.bounine@idt.com \
    --cc=davem@davemloft.net \
    --cc=frank.kunz@nokia.com \
    --cc=marek.krzyzowski@nokia.com \
    --cc=mporter@kernel.crashing.org \
    --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).