Messages in this thread | | | Date | Mon, 09 Sep 2013 14:07:40 +0200 | From | Maarten Lankhorst <> | Subject | Re: [3.11-rc1] CONFIG_DEBUG_MUTEXES=y using gcc 3.x makes unbootablekernel. |
| |
Op 09-09-13 13:56, Tetsuo Handa schreef: > Maarten Lankhorst wrote: >> Almost correct. I meant passing it as parameter to __mutex_lock_common. Your version will still cause an extra pointless null check in the ww_mutex_lock case. > Ah, I see. > ---------- > >From 95f189eb37c25ddf8e48d5dfc2f9f1185c52b6a8 Mon Sep 17 00:00:00 2001 > From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> > Date: Mon, 9 Sep 2013 20:48:13 +0900 > Subject: [PATCH] mutex: Avoid gcc version dependent __builtin_constant_p() usage. > > Commit 040a0a37 "mutex: Add support for wound/wait style locks" used > "!__builtin_constant_p(p == NULL)" but gcc 3.x cannot handle such expression > correctly, leading to boot failure when built with CONFIG_DEBUG_MUTEXES=y. > > Fix it by explicitly passing a bool which tells whether p != NULL or not. > Yeah looks ok, did you run the selftests from CONFIG_DEBUG_LOCKING_API_SELFTESTS, with/without CONFIG_PROVE_LOCKING and once more with DEBUG_MUTEXES also unset?
~Maarten
| |