18 Sep, 2010

9 commits

  • queue_lock/unlock/me() and unqueue_me_pi() grab/release spinlocks
    but are missing proper annotations. Add them.

    Signed-off-by: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Darren Hart
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Namhyung Kim
     
  • @uaddr and @uaddr2 fields in restart_block.futex are user
    pointers. Add __user and remove unnecessary casts.

    Signed-off-by: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Darren Hart
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Namhyung Kim
     
  • Sparse complains:
    kernel/futex.c:2495:59: warning: incorrect type in argument 3 (different signedness)

    Make 3rd argument of fetch_robust_entry() 'unsigned int'.

    Signed-off-by: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Darren Hart
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Namhyung Kim
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ALSA: pcm - Fix race with proc files
    ALSA: pcm - Fix unbalanced pm_qos_request
    ALSA: HDA: Enable internal speaker on Dell M101z
    ALSA: patch_nvhdmi.c: Fix supported sample rate list.
    sound: Remove pr_ uses of KERN_
    ALSA: hda - Add quirk for Toshiba C650D using a Conexant CX20585
    ALSA: hda_intel: ALSA HD Audio patch for Intel Patsburg DeviceIDs

    Linus Torvalds
     
  • * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
    hwmon: (lm95241) Replace rate sysfs attribute with update_interval
    hwmon: (adm1031) Replace update_rate sysfs attribute with update_interval
    hwmon: (w83627ehf) Use proper exit sequence
    hwmon: (emc1403) Remove unnecessary hwmon_device_unregister
    hwmon: (f75375s) Do not overwrite values read from registers
    hwmon: (f75375s) Shift control mode to the correct bit position
    hwmon: New subsystem maintainers
    hwmon: (lis3lv02d) Prevent NULL pointer dereference

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
    GFS2: gfs2_logd should be using interruptible waits

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
    firewire: nosy: fix build when CONFIG_FIREWIRE=N
    firewire: ohci: activate cycle timer register quirk on Ricoh chips

    Linus Torvalds
     
  • * 'for-linus' of git://neil.brown.name/md:
    md: fix v1.x metadata update when a disk is missing.
    md: call md_update_sb even for 'external' metadata arrays.

    Linus Torvalds
     
  • If a signal hits us outside of a syscall and another gets delivered
    when we are in sigreturn (e.g. because it had been in sa_mask for
    the first one and got sent to us while we'd been in the first handler),
    we have a chance of returning from the second handler to location one
    insn prior to where we ought to return. If r0 happens to contain -513
    (-ERESTARTNOINTR), sigreturn will get confused into doing restart
    syscall song and dance.

    Incredible joy to debug, since it manifests as random, infrequent and
    very hard to reproduce double execution of instructions in userland
    code...

    The fix is simple - mark it "don't bother with restarts" in wrapper,
    i.e. set r8 to 0 in sys_sigreturn and sys_rt_sigreturn wrappers,
    suppressing the syscall restart handling on return from these guys.
    They can't legitimately return a restart-worthy error anyway.

    Testcase:
    #include
    #include
    #include
    #include
    #include

    void f(int n)
    {
    __asm__ __volatile__(
    "ldr r0, [%0]\n"
    "b 1f\n"
    "b 2f\n"
    "1:b .\n"
    "2:\n" : : "r"(&n));
    }

    void handler1(int sig) { }
    void handler2(int sig) { raise(1); }
    void handler3(int sig) { exit(0); }

    main()
    {
    struct sigaction s = {.sa_handler = handler2};
    struct itimerval t1 = { .it_value = {1} };
    struct itimerval t2 = { .it_value = {2} };

    signal(1, handler1);

    sigemptyset(&s.sa_mask);
    sigaddset(&s.sa_mask, 1);
    sigaction(SIGALRM, &s, NULL);

    signal(SIGVTALRM, handler3);

    setitimer(ITIMER_REAL, &t1, NULL);
    setitimer(ITIMER_VIRTUAL, &t2, NULL);

    f(-513); /* -ERESTARTNOINTR */

    write(1, "buggered\n", 9);
    return 1;
    }

    Signed-off-by: Al Viro
    Acked-by: Russell King
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Al Viro
     

17 Sep, 2010

26 commits


16 Sep, 2010

5 commits