1. 23 10月, 2015 18 次提交
  2. 22 10月, 2015 8 次提交
  3. 21 10月, 2015 3 次提交
  4. 20 10月, 2015 11 次提交
    • S
      tracing: Have stack tracer force RCU to be watching · a2d76290
      Steven Rostedt (Red Hat) 提交于
      The stack tracer was triggering the WARN_ON() in module.c:
      
       static void module_assert_mutex_or_preempt(void)
       {
       #ifdef CONFIG_LOCKDEP
      	if (unlikely(!debug_locks))
      		return;
      
      	WARN_ON(!rcu_read_lock_sched_held() &&
      		!lockdep_is_held(&module_mutex));
       #endif
       }
      
      The reason is that the stack tracer traces all function calls, and some of
      those calls happen while exiting or entering user space and idle. Some of
      these functions are called after RCU had already stopped watching, as RCU
      does not watch userspace or idle CPUs.
      
      If a max stack is hit, then the save_stack_trace() is called, which will
      check module addresses and call module_assert_mutex_or_preempt(), and then
      trigger the warning. Sad part is, the warning itself will also do a stack
      trace and tigger the same warning. That probably should be fixed.
      
      The warning was added by 0be964be "module: Sanitize RCU usage and
      locking" but this bug has probably been around longer. But it's unlikely to
      cause much harm, but the new warning causes the system to lock up.
      
      Cc: stable@vger.kernel.org # 4.2+
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc:"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      a2d76290
    • C
      ASoC: wm8904: Correct number of EQ registers · 97aff2c0
      Charles Keepax 提交于
      There are 24 EQ registers not 25, I suspect this bug came about because
      the registers start at EQ1 not zero. The bug is relatively harmless as
      the extra register written is an unused one.
      Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      97aff2c0
    • T
      ALSA: hda - Fix deadlock at error in building PCM · d289619a
      Takashi Iwai 提交于
      The HDA codec driver issues snd_hda_codec_reset() at the error path of
      PCM build.  This was needed in the earlier code base, but the recent
      rewrite to use the standard bus binding made this a deadlock:
       modprobe        D 0000000000000005     0   720    716 0x00000080
       Call Trace:
        [<ffffffff816a5dbe>] schedule+0x3e/0x90
        [<ffffffff816a61a5>] schedule_preempt_disabled+0x15/0x20
        [<ffffffff816a7ae5>] __mutex_lock_slowpath+0xb5/0x120
        [<ffffffff816a7b6b>] mutex_lock+0x1b/0x30
        [<ffffffff8148656b>] device_release_driver+0x1b/0x30
        [<ffffffff81485c15>] bus_remove_device+0x105/0x180
        [<ffffffff814822b9>] device_del+0x139/0x260
        [<ffffffffa05e0ec5>] snd_hdac_device_unregister+0x25/0x30 [snd_hda_core]
        [<ffffffffa074fa6a>] snd_hda_codec_reset+0x2a/0x70 [snd_hda_codec]
        [<ffffffffa075007b>] snd_hda_codec_build_pcms+0x18b/0x1b0 [snd_hda_codec]
        [<ffffffffa074a44e>] hda_codec_driver_probe+0xbe/0x140 [snd_hda_codec]
        [<ffffffff81486ac4>] driver_probe_device+0x1f4/0x460
        [<ffffffff81486dc0>] __driver_attach+0x90/0xa0
        [<ffffffff81484844>] bus_for_each_dev+0x64/0xa0
        [<ffffffff814862de>] driver_attach+0x1e/0x20
        [<ffffffff81485e7b>] bus_add_driver+0x1eb/0x280
        [<ffffffff81487680>] driver_register+0x60/0xe0
        [<ffffffffa074a0da>] __hda_codec_driver_register+0x5a/0x60 [snd_hda_codec]
        [<ffffffffa070a01e>] realtek_driver_init+0x1e/0x1000 [snd_hda_codec_realtek]
        [<ffffffff810002f3>] do_one_initcall+0xb3/0x200
        [<ffffffff816a1fc5>] do_init_module+0x60/0x1f8
        [<ffffffff810ee5c3>] load_module+0x1653/0x1bd0
        [<ffffffff810eed48>] SYSC_finit_module+0x98/0xc0
        [<ffffffff810eed8e>] SyS_finit_module+0xe/0x10
        [<ffffffff816aa032>] entry_SYSCALL_64_fastpath+0x16/0x75
      
      The simple fix is just to remove this call, since we don't need to
      think about unbinding at there any longer.
      
      Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=948758
      Cc: <stable@vger.kernel.org> # v4.1+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d289619a
    • L
      Merge branch 'for-linus-4.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · be0e1987
      Linus Torvalds 提交于
      Pull UML fixes from Richard Weinberger:
       "This contains four overdue UML regression fixes"
      
      * 'for-linus-4.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: Fix kernel mode fault condition
        um: Fix waitpid() usage in helper code
        um: Do not rely on libc to provide modify_ldt()
        um: Fix out-of-tree build
      be0e1987
    • L
      Merge branch 'keys-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs · ce1fad27
      Linus Torvalds 提交于
      Pull key handling fixes from David Howells:
       "Here are two patches, the first of which at least should go upstream
        immediately:
      
        (1) Prevent a user-triggerable crash in the keyrings destructor when a
            negatively instantiated keyring is garbage collected.  I have also
            seen this triggered for user type keys.
      
        (2) Prevent the user from using requesting that a keyring be created
            and instantiated through an upcall.  Doing so is probably safe
            since the keyring type ignores the arguments to its instantiation
            function - but we probably shouldn't let keyrings be created in
            this manner"
      
      * 'keys-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        KEYS: Don't permit request_key() to construct a new keyring
        KEYS: Fix crash when attempt to garbage collect an uninstantiated keyring
      ce1fad27
    • R
      um: Fix kernel mode fault condition · 56b88a3b
      Richard Weinberger 提交于
      We have to exclude memory locations <= PAGE_SIZE from
      the condition and let the kernel mode fault path catch it.
      Otherwise a kernel NULL pointer exception will be reported
      as a kernel user space access.
      
      Fixes: d2313084 (um: Catch unprotected user memory access)
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      56b88a3b
    • R
      um: Fix waitpid() usage in helper code · 6b187337
      Richard Weinberger 提交于
      If UML is executing a helper program it is using
      waitpid() with the __WCLONE flag to wait for the program
      as the helper is executed from a clone()'ed thread.
      While using __WCLONE is perfectly fine for clone()'ed
      childs it won't detect terminated childs if the helper
      has issued an execve().
      
      We have to use __WALL to wait for both clone()'ed and
      regular childs to detect the termination before and
      after an execve().
      Reported-and-tested-by: NThomas Meyer <thomas@m3y3r.de>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      6b187337
    • H
      um: Do not rely on libc to provide modify_ldt() · 37e81a01
      Hans-Werner Hilse 提交于
      modify_ldt() was declared as an external symbol. Despite the man
      page for this syscall telling that there is no wrapper in glibc,
      since version 2.1 there actually is, so linking to the glibc
      works.
      
      Since modify_ldt() is not a POSIX interface, other libc
      implementations do not always provide a wrapper function.
      Even glibc headers do not provide a corresponding declaration.
      
      So go the recommended way to call this using syscall().
      Signed-off-by: NHans-Werner Hilse <hwhilse@gmail.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      37e81a01
    • R
      um: Fix out-of-tree build · 0b5aedfe
      Richard Weinberger 提交于
      Commit 30b11ee9 (um: Remove copy&paste code from init.h)
      uncovered an issue wrt. out-of-tree builds.
      For out-of-tree builds, we must not rely on relative paths.
      Before 30b11ee9 it worked by chance as no host code included
      generated header files.
      Acked-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      0b5aedfe
    • A
      drm/amdgpu: add missing dpm check for KV dpm late init · 677c884f
      Alex Deucher 提交于
      Skip dpm late init if dpm is disabled.
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      677c884f
    • A
      drm/amdgpu/dpm: don't add pwm attributes if DPM is disabled · 27100735
      Alex Deucher 提交于
      PWM fan control is only available with DPM.  There is no non-DPM
      support on amdgpu, so we should never get a crash here because
      the sysfs nodes would never be created in the first place. Add the
      check just in case to be on the safe side.
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      27100735