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


Groups > linux.kernel > #1592267

Re: [GIT PULL] sched.h split-up

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [GIT PULL] sched.h split-up
Date 2017-03-03 21:20 +0100
Message-ID <th1Qe-6jM-9@gated-at.bofh.it> (permalink)
References <tgKZ3-2I4-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Mar 2, 2017 at 5:36 PM, Ingo Molnar <mingo@kernel.org> wrote:
>
> I tried to test as many build configurations as possible, but some build breakage
> is probably still left - but it should be mostly limited to architectures that
> have no cross-compiler binaries available on kernel.org, and non-default
> configurations.

So I merged this, and it's pushed out, but it showed a real annoyance
almost immediately.

That annoyance is also pushed out - it's the pull of the overlayfs
updates. And the reason that was annoying was that that pull caused
this build error due to a subtle semantic clash:

   fs/overlayfs/util.c: In function ‘ovl_copy_up_start’:
   ./include/linux/wait.h:634:7: error: implicit declaration of
function ‘signal_pending’ [-Werror=implicit-function-declaration]
      if (signal_pending(current)) {    \
          ^
   ./include/linux/wait.h:679:9: note: in expansion of macro
‘__wait_event_interruptible_locked’
      ? 0 : __wait_event_interruptible_locked(wq, condition, 0, 0))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/overlayfs/util.c:275:8: note: in expansion of macro
‘wait_event_interruptible_locked’
     err = wait_event_interruptible_locked(ofs->copyup_wq, !oe->copying);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and that's just complete bullshit.

The thing is, fs/overlayfs/util.c included <linux/fs.h>, which in turn
includes <linux/wait.h>

So using "wait_event_interruptible_locked()" should damn well have worked.

The fact that you can include <linux/wait.h>, and then cannot use the
wait event functions because you're missing "signal_pending()" is
complete garbage. This needs to be fixed.

The most obvious way to fix it is likely to just shrink that
__wait_event_interruptible_locked() macro.

Yes, yes, some of it absolutely does need to remain as a macro,
because it has that

   do { .. } while (condition);

part of it, but I think the stuff inside that while loop could be made
into a function of its own. Actually, maybe two different functions
(for the "irq" case on/off).

Anyway, I fixed the semantic merge error by just including thar
<linux/sched/signal.h> file, but this is just not acceptable.

Having to have files know that if they use the wait-event functins
(well, _some_ of them), they not only need to include <linux/wait.h>,
they need to completely illogically also include
<linux/sched/signal.h> is just not maintainable.

And who knows what similar semantic cases I _won't_ notice, because
they occur in code I don't build even with my allmodconfig builds?

                     Linus

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


Thread

Re: [GIT PULL] sched.h split-up Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-03 21:20 +0100
  Re: [GIT PULL] sched.h split-up Ingo Molnar <mingo@kernel.org> - 2017-03-04 08:40 +0100
  Re: [GIT PULL] sched.h split-up Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-08 00:50 +0100
    Re: [GIT PULL] sched.h split-up Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-08 01:20 +0100
      Re: [GIT PULL] sched.h split-up Ingo Molnar <mingo@kernel.org> - 2017-03-08 18:30 +0100
    [RFC PATCH] sched/wait: Introduce new, more compact wait_event*()  primitives Ingo Molnar <mingo@kernel.org> - 2017-03-08 09:50 +0100
      [RFC PATCH] sched/wait: Add <linux/sched/signal.h> dependency for now Ingo Molnar <mingo@kernel.org> - 2017-03-08 10:30 +0100
        [PATCH -v2] sched/wait: Add <linux/sched/signal.h> dependency for now Ingo Molnar <mingo@kernel.org> - 2017-03-08 11:20 +0100
      [RFC PATCH, -v2] sched/wait: Introduce new, more compact  wait_event*() primitives Ingo Molnar <mingo@kernel.org> - 2017-03-08 13:30 +0100
        Re: [RFC PATCH, -v2] sched/wait: Introduce new, more compact  wait_event*() primitives Peter Zijlstra <peterz@infradead.org> - 2017-03-09 17:30 +0100
      Re: [RFC PATCH] sched/wait: Introduce new, more compact  wait_event*() primitives Ingo Molnar <mingo@kernel.org> - 2017-03-08 14:20 +0100
      Re: [RFC PATCH] sched/wait: Introduce new, more compact wait_event*() primitives Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-08 17:40 +0100
        Re: [RFC PATCH] sched/wait: Introduce new, more compact  wait_event*() primitives Ingo Molnar <mingo@kernel.org> - 2017-03-08 18:20 +0100

csiph-web