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


Groups > linux.kernel > #1733323

Re: d57108d4f6 ("watchdog/core: Get rid of the thread .."): BUG: unable to handle kernel NULL pointer dereference at 0000000000000208

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: d57108d4f6 ("watchdog/core: Get rid of the thread .."): BUG: unable to handle kernel NULL pointer dereference at 0000000000000208
Date 2017-09-16 20:00 +0200
Message-ID <uqpxL-4Td-7@gated-at.bofh.it> (permalink)
References (1 earlier) <upTHA-8eD-25@gated-at.bofh.it> <upYnU-2Ux-25@gated-at.bofh.it> <uq1F8-5pk-7@gated-at.bofh.it> <uqkHL-1AN-1@gated-at.bofh.it> <uqpep-4Lo-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Sep 16, 2017 at 10:35 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
>
> Don't bother. I found it already. On UP we have:
>
> #define for_each_cpu(cpu, mask)               \
>         for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
>
> which is a total fail as it breaks any code which uses for_each_cpu() or
> any of the other variants on UP by assuming that all cpumask have bit 0
> set.

It's fairly fundamental. UP assumes that all CPU masks are always that
"one CPU set". Not just here - everywhere.

I guess we could somehow try to move away from that, but really, the
assumption of fixed masks ends up simplifying the code generation a
lot, so it made tons of sense back when UP was a primary target.

So it's an approach that is somewhat historical, but I'm not sure it's
worth re-visiting that old decision. People should simply not expect
to traverse over empty masks in anything that is UP.

So I suspect your perf fix is the right one, and maybe we could/should
just make people more aware of the empty cpumask issue with UP.

            Linus

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


Thread

Re: d57108d4f6 ("watchdog/core: Get rid of the thread .."): BUG:  unable to handle kernel NULL pointer dereference at 0000000000000208 Thomas Gleixner <tglx@linutronix.de> - 2017-09-15 10:00 +0200
  Re: d57108d4f6 ("watchdog/core: Get rid of the thread .."): BUG:  unable to handle kernel NULL pointer dereference at 0000000000000208 Thomas Gleixner <tglx@linutronix.de> - 2017-09-15 15:00 +0200
    Re: d57108d4f6 ("watchdog/core: Get rid of the thread .."): BUG:  unable to handle kernel NULL pointer dereference at 0000000000000208 Thomas Gleixner <tglx@linutronix.de> - 2017-09-15 18:30 +0200
      Re: d57108d4f6 ("watchdog/core: Get rid of the thread .."): BUG:  unable to handle kernel NULL pointer dereference at 0000000000000208 Fengguang Wu <fengguang.wu@intel.com> - 2017-09-16 14:50 +0200
        Re: d57108d4f6 ("watchdog/core: Get rid of the thread .."): BUG:  unable to handle kernel NULL pointer dereference at 0000000000000208 Thomas Gleixner <tglx@linutronix.de> - 2017-09-16 19:40 +0200
          Re: d57108d4f6 ("watchdog/core: Get rid of the thread .."): BUG:  unable to handle kernel NULL pointer dereference at 0000000000000208 Linus Torvalds <torvalds@linux-foundation.org> - 2017-09-16 20:00 +0200
            Re: d57108d4f6 ("watchdog/core: Get rid of the thread .."): BUG:  unable to handle kernel NULL pointer dereference at 0000000000000208 Thomas Gleixner <tglx@linutronix.de> - 2017-09-16 20:20 +0200
              Re: d57108d4f6 ("watchdog/core: Get rid of the thread .."): BUG:  unable to handle kernel NULL pointer dereference at 0000000000000208 Linus Torvalds <torvalds@linux-foundation.org> - 2017-09-16 20:30 +0200
                Re: d57108d4f6 ("watchdog/core: Get rid of the thread .."): BUG:  unable to handle kernel NULL pointer dereference at 0000000000000208 Thomas Gleixner <tglx@linutronix.de> - 2017-09-16 23:50 +0200
                Re: d57108d4f6 ("watchdog/core: Get rid of the thread .."): BUG:  unable to handle kernel NULL pointer dereference at 0000000000000208 Linus Torvalds <torvalds@linux-foundation.org> - 2017-09-17 00:10 +0200

csiph-web