1. 24 Apr, 2009 6 commits
    • Jonathan Corbet's avatar
      Delete slow-work timers properly · 418df63c
      Jonathan Corbet authored
      Slow-work appears to delete its timer as soon as the first user
      unregisters, even though other users could be active.  At the same time, it
      never seems to delete slow_work_oom_timer.  Arrange for both to happen in
      the shutdown path.
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      418df63c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 3e241ff0
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (94 commits)
        netfilter: ctnetlink: fix gcc warning during compilation
        net/netrom: Fix socket locking
        netlabel: Always remove the correct address selector
        ucc_geth.c: Fix upsmr setting in RMII mode
        8139too: fix HW initial flow
        af_iucv: Fix race when queuing incoming iucv messages
        af_iucv: Test additional sk states in iucv_sock_shutdown
        af_iucv: Reject incoming msgs if RECV_SHUTDOWN is set
        af_iucv: fix oops in iucv_sock_recvmsg() for MSG_PEEK flag
        af_iucv: consider state IUCV_CLOSING when closing a socket
        iwlwifi: DMA fixes
        iwlwifi: add debugging for TX path
        mwl8: fix build warning.
        mac80211: fix alignment calculation bug
        mac80211: do not print WARN if config interface
        iwl3945: use cancel_delayed_work_sync to cancel rfkill_poll
        iwlwifi: fix EEPROM validation mask to include OTP only devices
        atmel: fix netdev ops conversion
        pcnet_cs: add cis(firmware) of the Allied Telesis LA-PCM
        mlx4_en: Fix cleanup if workqueue create in mlx4_en_add() fails
        ...
      3e241ff0
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 · dc0046c7
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
        sparc: Fix bus type probing for ESP and LE devices.
        sparc32: Update defconfig.
        sparc64: Update defconfig.
      dc0046c7
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc · f8c3301e
      Linus Torvalds authored
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
        powerpc: Fix modular build of ide-pmac when mediabay is built in
        powerpc/pasemi: Fix build error on UP
        powerpc: Make macintosh/mediabay driver depend on CONFIG_BLOCK
        maintainers: Fix PS3 patterns
        powerpc/ps3: Fix CONFIG_PS3_FLASH=n build warning
        powerpc/32: Don't clobber personality flags on exec
        powerpc: Fix crash on CPU hotplug
        powerpc/85xx: Remove defconfigs that mpc85xx_{smp_}defconfig cover
        powerpc/85xx: Added SMP defconfig
        powerpc/85xx: Enabled a bunch of FSL specific drivers/options
        powerpc/85xx: Updated generic mpc85xx_defconfig
        powerpc: don't disable SATA interrupts on Freescale MPC8610 HPCD
        fsl_rio: Pass the proper device to dma mapping routines
        powerpc: Fix of_node_put() exit path in of_irq_map_one()
        powerpc/5200: defconfig updates
        powerpc/5200: Add FLASH nodes to lite5200 device tree
        powerpc/device-tree: Document MTD nodes with multiple "reg" tuples
        powerpc/of-device-tree: Factor MTD physmap bindings out of booting-without-of
        powerpc/5200: Bring the legacy fsl_spi_platform_data hooks back
      f8c3301e
    • Oleg Nesterov's avatar
      check_unsafe_exec: s/lock_task_sighand/rcu_read_lock/ · 437f7fdb
      Oleg Nesterov authored
      write_lock(&current->fs->lock) guarantees we can't wrongly miss
      LSM_UNSAFE_SHARE, this is what we care about. Use rcu_read_lock()
      instead of ->siglock to iterate over the sub-threads. We must see
      all CLONE_THREAD|CLONE_FS threads which didn't pass exit_fs(), it
      takes fs->lock too.
      
      With or without this patch we can miss the freshly cloned thread
      and set LSM_UNSAFE_SHARE, we don't care.
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Acked-by: default avatarRoland McGrath <roland@redhat.com>
      [ Fixed lock/unlock typo  - Hugh ]
      Acked-by: default avatarHugh Dickins <hugh@veritas.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      437f7fdb
    • Oleg Nesterov's avatar
      do_execve() must not clear fs->in_exec if it was set by another thread · 8c652f96
      Oleg Nesterov authored
      If do_execve() fails after check_unsafe_exec(), it clears fs->in_exec
      unconditionally. This is wrong if we race with our sub-thread which
      also does do_execve:
      
      	Two threads T1 and T2 and another process P, all share the same
      	->fs.
      
      	T1 starts do_execve(BAD_FILE). It calls check_unsafe_exec(), since
      	->fs is shared, we set LSM_UNSAFE but not ->in_exec.
      
      	P exits and decrements fs->users.
      
      	T2 starts do_execve(), calls check_unsafe_exec(), now ->fs is not
      	shared, we set fs->in_exec.
      
      	T1 continues, open_exec(BAD_FILE) fails, we clear ->in_exec and
      	return to the user-space.
      
      	T1 does clone(CLONE_FS /* without CLONE_THREAD */).
      
      	T2 continues without LSM_UNSAFE_SHARE while ->fs is shared with
      	another process.
      
      Change check_unsafe_exec() to return res = 1 if we set ->in_exec, and change
      do_execve() to clear ->in_exec depending on res.
      
      When do_execve() suceeds, it is safe to clear ->in_exec unconditionally.
      It can be set only if we don't share ->fs with another process, and since
      we already killed all sub-threads either ->in_exec == 0 or we are the
      only user of this ->fs.
      
      Also, we do not need fs->lock to clear fs->in_exec.
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Acked-by: default avatarRoland McGrath <roland@redhat.com>
      Acked-by: default avatarHugh Dickins <hugh@veritas.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8c652f96
  2. 22 Apr, 2009 24 commits
  3. 21 Apr, 2009 10 commits