Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1498618

Re: slab corruption with current -git (was Re: [git pull] vfs pile 1 (splice))

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: slab corruption with current -git (was Re: [git pull] vfs pile 1 (splice))
Date 2016-10-11 07:50 +0200
Message-ID <sqY6R-2Ee-1@gated-at.bofh.it> (permalink)
References <sqtZ7-XZ-9@gated-at.bofh.it> <sqx6F-2MG-1@gated-at.bofh.it> <sqxJo-3dZ-5@gated-at.bofh.it> <sqyP7-3YV-1@gated-at.bofh.it> <sqzLb-4wh-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Sun, Oct 9, 2016 at 8:41 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> This COMPLETELY UNTESTED patch tries to fix the nf_hook_entry code to do this.
>
> I repeat: it's ENTIRELY UNTESTED.

Gaah.

That patch was subtle garbage.

The "add to list" thing did this:

        rcu_assign_pointer(entry->next, p);
        rcu_assign_pointer(*pp, p);

which is not so subtly broken - that second assignment just assigns
"p" to "*pp", but that was what *pp already contained. Too much
cut-and-paste.

That also explains why I then get the NOT FOUND case, because the add
never actually worked.

It *should* be

        rcu_assign_pointer(entry->next, p);
        rcu_assign_pointer(*pp, entry);

and then the warnings about "not found" are gone.

Duh.

I guess I will have to double-check that the slub corruption is gone
still with that fixed.

Anyway, new version of the patch (just that one line changed) attached.

                Linus

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

slab corruption with current -git (was Re: [git pull] vfs pile 1 (splice)) Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-09 23:40 +0200
  Re: slab corruption with current -git (was Re: [git pull] vfs pile 1  (splice)) Florian Westphal <fw@strlen.de> - 2016-10-10 03:00 +0200
    Re: slab corruption with current -git (was Re: [git pull] vfs pile 1 (splice)) Aaron Conole <aconole@redhat.com> - 2016-10-10 03:40 +0200
      Re: slab corruption with current -git (was Re: [git pull] vfs pile 1 (splice)) Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-10 04:50 +0200
        Re: slab corruption with current -git (was Re: [git pull] vfs pile 1 (splice)) Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-10 05:50 +0200
          Re: slab corruption with current -git David Miller <davem@davemloft.net> - 2016-10-10 06:00 +0200
            Re: slab corruption with current -git David Miller <davem@davemloft.net> - 2016-10-10 10:30 +0200
              Re: slab corruption with current -git Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-10 18:20 +0200
              Re: slab corruption with current -git Michal Kubecek <mkubecek@suse.cz> - 2016-10-11 15:20 +0200
                Re: slab corruption with current -git Aaron Conole <aconole@bytheb.org> - 2016-10-11 16:10 +0200
          Re: slab corruption with current -git (was Re: [git pull] vfs pile 1 (splice)) Aaron Conole <aconole@redhat.com> - 2016-10-10 15:50 +0200
            Re: slab corruption with current -git (was Re: [git pull] vfs pile 1 (splice)) Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-10 18:40 +0200
              Re: slab corruption with current -git (was Re: [git pull] vfs pile 1 (splice)) Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-10 21:10 +0200
                Re: slab corruption with current -git (was Re: [git pull] vfs pile 1 (splice)) Aaron Conole <aconole@bytheb.org> - 2016-10-10 21:20 +0200
                Re: slab corruption with current -git David Miller <davem@davemloft.net> - 2016-10-11 02:40 +0200
                Re: slab corruption with current -git Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-11 03:00 +0200
          Re: slab corruption with current -git (was Re: [git pull] vfs pile 1 (splice)) Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-11 07:50 +0200
            Re: slab corruption with current -git (was Re: [git pull] vfs pile 1 (splice)) Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-11 07:50 +0200
              Re: slab corruption with current -git David Miller <davem@davemloft.net> - 2016-10-11 11:00 +0200

csiph-web