]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge branch 'quilt/device-mapper'
Stephen Rothwell [Thu, 3 Nov 2011 04:17:35 +0000 (15:17 +1100)]
Merge branch 'quilt/device-mapper'

Conflicts:
Documentation/device-mapper/thin-provisioning.txt

12 years agoMerge remote-tracking branch 'block/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 04:05:09 +0000 (15:05 +1100)]
Merge remote-tracking branch 'block/for-next'

Conflicts:
drivers/md/faulty.c
drivers/md/linear.c
drivers/md/md.c
drivers/md/md.h
drivers/md/multipath.c
drivers/md/raid0.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c
drivers/staging/zram/zram_drv.c

12 years agoMerge remote-tracking branch 'input/next'
Stephen Rothwell [Thu, 3 Nov 2011 04:02:20 +0000 (15:02 +1100)]
Merge remote-tracking branch 'input/next'

12 years agoMerge branch 'quilt/rr'
Stephen Rothwell [Thu, 3 Nov 2011 03:55:34 +0000 (14:55 +1100)]
Merge branch 'quilt/rr'

12 years agoMerge remote-tracking branch 'cpufreq/next'
Stephen Rothwell [Thu, 3 Nov 2011 03:54:12 +0000 (14:54 +1100)]
Merge remote-tracking branch 'cpufreq/next'

12 years agoMerge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 03:52:47 +0000 (14:52 +1100)]
Merge remote-tracking branch 'sound-asoc/for-next'

12 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 03:51:20 +0000 (14:51 +1100)]
Merge remote-tracking branch 'sound/for-next'

12 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Thu, 3 Nov 2011 03:49:55 +0000 (14:49 +1100)]
Merge remote-tracking branch 'l2-mtd/master'

Conflicts:
arch/arm/mach-at91/board-afeb-9260v1.c
arch/arm/mach-at91/board-neocore926.c
arch/arm/mach-at91/board-rm9200dk.c
arch/arm/mach-at91/board-sam9g20ek.c
arch/arm/mach-at91/board-sam9m10g45ek.c
arch/arm/mach-at91/board-usb-a9260.c
drivers/mtd/maps/lantiq-flash.c

12 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Thu, 3 Nov 2011 03:47:50 +0000 (14:47 +1100)]
Merge remote-tracking branch 'bluetooth/master'

Conflicts:
net/bluetooth/l2cap_sock.c

12 years agoMerge remote-tracking branch 'slave-dma/next'
Stephen Rothwell [Thu, 3 Nov 2011 03:46:15 +0000 (14:46 +1100)]
Merge remote-tracking branch 'slave-dma/next'

12 years agoMerge remote-tracking branch 'target-merge/for-next-merge'
Stephen Rothwell [Thu, 3 Nov 2011 03:44:53 +0000 (14:44 +1100)]
Merge remote-tracking branch 'target-merge/for-next-merge'

12 years agoMerge remote-tracking branch 'target-updates/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 03:43:30 +0000 (14:43 +1100)]
Merge remote-tracking branch 'target-updates/for-next'

12 years agoMerge remote-tracking branch 'scsi/master'
Stephen Rothwell [Thu, 3 Nov 2011 03:40:26 +0000 (14:40 +1100)]
Merge remote-tracking branch 'scsi/master'

12 years agoMerge remote-tracking branch 'ibft/master'
Stephen Rothwell [Thu, 3 Nov 2011 03:40:15 +0000 (14:40 +1100)]
Merge remote-tracking branch 'ibft/master'

12 years agoMerge remote-tracking branch 'swiotlb/master'
Stephen Rothwell [Thu, 3 Nov 2011 03:40:11 +0000 (14:40 +1100)]
Merge remote-tracking branch 'swiotlb/master'

Conflicts:
drivers/xen/swiotlb-xen.c

12 years agoMerge remote-tracking branch 'kconfig/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 03:36:42 +0000 (14:36 +1100)]
Merge remote-tracking branch 'kconfig/for-next'

12 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 03:29:57 +0000 (14:29 +1100)]
Merge remote-tracking branch 'kbuild/for-next'

Conflicts:
drivers/net/ethernet/stmicro/stmmac/Kconfig

12 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Thu, 3 Nov 2011 03:28:33 +0000 (14:28 +1100)]
Merge remote-tracking branch 'v4l-dvb/master'

Conflicts:
drivers/staging/Makefile

12 years agoMerge remote-tracking branch 'docs/docs-move'
Stephen Rothwell [Thu, 3 Nov 2011 03:23:48 +0000 (14:23 +1100)]
Merge remote-tracking branch 'docs/docs-move'

12 years agoMerge branch 'quilt/kernel-doc'
Stephen Rothwell [Thu, 3 Nov 2011 03:22:33 +0000 (14:22 +1100)]
Merge branch 'quilt/kernel-doc'

Conflicts:
Documentation/PCI/pci.txt

12 years agoMerge branch 'quilt/jdelvare-hwmon'
Stephen Rothwell [Thu, 3 Nov 2011 03:21:14 +0000 (14:21 +1100)]
Merge branch 'quilt/jdelvare-hwmon'

12 years agoMerge remote-tracking branch 'bjdooks-i2c/next-i2c'
Stephen Rothwell [Thu, 3 Nov 2011 03:20:00 +0000 (14:20 +1100)]
Merge remote-tracking branch 'bjdooks-i2c/next-i2c'

Conflicts:
drivers/i2c/busses/i2c-designware-platdrv.c

12 years agoMerge remote-tracking branch 'ubifs/linux-next'
Stephen Rothwell [Thu, 3 Nov 2011 03:08:05 +0000 (14:08 +1100)]
Merge remote-tracking branch 'ubifs/linux-next'

12 years agoMerge remote-tracking branch 'squashfs/master'
Stephen Rothwell [Thu, 3 Nov 2011 03:06:46 +0000 (14:06 +1100)]
Merge remote-tracking branch 'squashfs/master'

12 years agoMerge remote-tracking branch 'ocfs2/linux-next'
Stephen Rothwell [Thu, 3 Nov 2011 03:05:24 +0000 (14:05 +1100)]
Merge remote-tracking branch 'ocfs2/linux-next'

Conflicts:
fs/ocfs2/xattr.c

12 years agoMerge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Thu, 3 Nov 2011 03:03:43 +0000 (14:03 +1100)]
Merge remote-tracking branch 'nfs/linux-next'

12 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Thu, 3 Nov 2011 03:02:28 +0000 (14:02 +1100)]
Merge remote-tracking branch 'logfs/master'

Conflicts:
fs/logfs/file.c

12 years agoMerge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Thu, 3 Nov 2011 03:02:16 +0000 (14:02 +1100)]
Merge remote-tracking branch 'gfs2/master'

Conflicts:
fs/gfs2/file.c

12 years agoMerge remote-tracking branch 'cifs/master'
Stephen Rothwell [Thu, 3 Nov 2011 03:00:51 +0000 (14:00 +1100)]
Merge remote-tracking branch 'cifs/master'

12 years agoMerge remote-tracking branch 'xtensa/master'
Stephen Rothwell [Thu, 3 Nov 2011 02:59:31 +0000 (13:59 +1100)]
Merge remote-tracking branch 'xtensa/master'

12 years agoMerge remote-tracking branch 'unicore32/unicore32'
Stephen Rothwell [Thu, 3 Nov 2011 02:58:12 +0000 (13:58 +1100)]
Merge remote-tracking branch 'unicore32/unicore32'

12 years agoMerge remote-tracking branch 'tile/master'
Stephen Rothwell [Thu, 3 Nov 2011 02:56:56 +0000 (13:56 +1100)]
Merge remote-tracking branch 'tile/master'

Conflicts:
arch/tile/kernel/intvec_32.S
arch/tile/lib/atomic_asm_32.S

12 years agoMerge remote-tracking branch 'rmobile/rmobile-latest'
Stephen Rothwell [Thu, 3 Nov 2011 02:47:22 +0000 (13:47 +1100)]
Merge remote-tracking branch 'rmobile/rmobile-latest'

12 years agoMerge remote-tracking branch 'sh/sh-latest'
Stephen Rothwell [Thu, 3 Nov 2011 02:46:03 +0000 (13:46 +1100)]
Merge remote-tracking branch 'sh/sh-latest'

12 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Thu, 3 Nov 2011 02:44:50 +0000 (13:44 +1100)]
Merge remote-tracking branch 's390/features'

12 years agoMerge remote-tracking branch 'galak/next'
Stephen Rothwell [Thu, 3 Nov 2011 02:43:30 +0000 (13:43 +1100)]
Merge remote-tracking branch 'galak/next'

12 years agoMerge remote-tracking branch '52xx-and-virtex/powerpc/next'
Stephen Rothwell [Thu, 3 Nov 2011 02:42:03 +0000 (13:42 +1100)]
Merge remote-tracking branch '52xx-and-virtex/powerpc/next'

12 years agoMerge remote-tracking branch 'powerpc/next'
Stephen Rothwell [Thu, 3 Nov 2011 02:35:33 +0000 (13:35 +1100)]
Merge remote-tracking branch 'powerpc/next'

Conflicts:
arch/powerpc/configs/40x/hcu4_defconfig
arch/powerpc/include/asm/udbg.h
arch/powerpc/kernel/udbg.c
drivers/tty/serial/8250.c

12 years agoMerge remote-tracking branch 'parisc/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 02:32:21 +0000 (13:32 +1100)]
Merge remote-tracking branch 'parisc/for-next'

12 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Thu, 3 Nov 2011 02:31:03 +0000 (13:31 +1100)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

Conflicts:
arch/mips/alchemy/devboards/db1x00/platform.c
drivers/ide/Kconfig
drivers/mmc/host/au1xmmc.c
drivers/video/Kconfig
sound/mips/Kconfig

12 years agoMerge remote-tracking branch 'm68knommu/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 02:30:56 +0000 (13:30 +1100)]
Merge remote-tracking branch 'm68knommu/for-next'

Conflicts:
arch/m68k/Kconfig.bus
arch/m68k/Kconfig.devices
arch/m68k/kernel/Makefile

12 years agoMerge remote-tracking branch 'ia64/next'
Stephen Rothwell [Thu, 3 Nov 2011 02:30:44 +0000 (13:30 +1100)]
Merge remote-tracking branch 'ia64/next'

12 years agoMerge branch 'quilt/hexagon'
Stephen Rothwell [Thu, 3 Nov 2011 02:30:42 +0000 (13:30 +1100)]
Merge branch 'quilt/hexagon'

Conflicts:
arch/hexagon/Makefile
arch/hexagon/include/asm/Kbuild
arch/hexagon/include/asm/timex.h
arch/hexagon/include/asm/vdso.h
arch/hexagon/kernel/Makefile
arch/hexagon/kernel/head.S
arch/hexagon/kernel/hexagon_ksyms.c
arch/hexagon/kernel/kgdb.c
arch/hexagon/kernel/vdso.c
arch/hexagon/kernel/vm_vectors.S
arch/hexagon/kernel/vmlinux.lds.S
arch/hexagon/lib/memset.S
arch/hexagon/mm/Makefile
arch/hexagon/mm/pgalloc.c
arch/hexagon/mm/strnlen_user.S

12 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 02:27:04 +0000 (13:27 +1100)]
Merge remote-tracking branch 'cris/for-next'

12 years agoMerge remote-tracking branch 'c6x/for-linux-next'
Stephen Rothwell [Thu, 3 Nov 2011 02:20:27 +0000 (13:20 +1100)]
Merge remote-tracking branch 'c6x/for-linux-next'

12 years agoMerge remote-tracking branch 'blackfin/for-linus'
Stephen Rothwell [Thu, 3 Nov 2011 02:19:14 +0000 (13:19 +1100)]
Merge remote-tracking branch 'blackfin/for-linus'

12 years agoMerge remote-tracking branch 'tegra/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 02:17:55 +0000 (13:17 +1100)]
Merge remote-tracking branch 'tegra/for-next'

12 years agoMerge remote-tracking branch 's5p/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 02:16:41 +0000 (13:16 +1100)]
Merge remote-tracking branch 's5p/for-next'

Conflicts:
arch/arm/mach-exynos4/Kconfig
drivers/gpio/Makefile

12 years agoMerge remote-tracking branch 'i.MX/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 02:05:33 +0000 (13:05 +1100)]
Merge remote-tracking branch 'i.MX/for-next'

Conflicts:
arch/arm/mach-mx5/clock-mx51-mx53.c
arch/arm/mach-mx5/devices-imx53.h
arch/arm/mach-mx5/mm.c
arch/arm/plat-mxc/include/mach/hardware.h

12 years agoMerge remote-tracking branch 'at91/at91-next'
Stephen Rothwell [Thu, 3 Nov 2011 02:04:05 +0000 (13:04 +1100)]
Merge remote-tracking branch 'at91/at91-next'

Conflicts:
arch/arm/mach-at91/at91sam9260.c
arch/arm/mach-at91/at91sam9g45.c
drivers/ata/pata_at91.c

12 years agoMerge remote-tracking branch 'arm-soc/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 02:00:33 +0000 (13:00 +1100)]
Merge remote-tracking branch 'arm-soc/for-next'

Conflicts:
arch/arm/mach-omap2/Makefile
arch/arm/plat-omap/devices.c

12 years agoMerge remote-tracking branch 'arm-lpae/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 01:56:09 +0000 (12:56 +1100)]
Merge remote-tracking branch 'arm-lpae/for-next'

Conflicts:
arch/arm/include/asm/page.h
arch/arm/include/asm/pgtable-hwdef.h
arch/arm/include/asm/pgtable.h
arch/arm/kernel/head.S
arch/arm/kernel/sleep.S
arch/arm/mm/dma-mapping.c
arch/arm/mm/mmu.c

12 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Thu, 3 Nov 2011 01:55:53 +0000 (12:55 +1100)]
Merge remote-tracking branch 'arm/for-next'

12 years agoMerge remote-tracking branch 'devicetree-current/devicetree/merge'
Stephen Rothwell [Thu, 3 Nov 2011 01:53:36 +0000 (12:53 +1100)]
Merge remote-tracking branch 'devicetree-current/devicetree/merge'

12 years agoMerge remote-tracking branch 'ide/master'
Stephen Rothwell [Thu, 3 Nov 2011 01:53:26 +0000 (12:53 +1100)]
Merge remote-tracking branch 'ide/master'

12 years agoMerge remote-tracking branch 'crypto-current/master'
Stephen Rothwell [Thu, 3 Nov 2011 01:53:20 +0000 (12:53 +1100)]
Merge remote-tracking branch 'crypto-current/master'

12 years agoMerge remote-tracking branch 'wireless/master'
Stephen Rothwell [Thu, 3 Nov 2011 01:53:13 +0000 (12:53 +1100)]
Merge remote-tracking branch 'wireless/master'

12 years agoMerge commit 'refs/next/20111102/pci-current'
Stephen Rothwell [Thu, 3 Nov 2011 01:50:40 +0000 (12:50 +1100)]
Merge commit 'refs/next/20111102/pci-current'

12 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Thu, 3 Nov 2011 01:42:19 +0000 (12:42 +1100)]
Merge remote-tracking branch 'net/master'

12 years agoMerge remote-tracking branch 'sparc/master'
Stephen Rothwell [Thu, 3 Nov 2011 01:42:17 +0000 (12:42 +1100)]
Merge remote-tracking branch 'sparc/master'

12 years agoMerge remote-tracking branch 'm68k-current/for-linus'
Stephen Rothwell [Thu, 3 Nov 2011 01:42:15 +0000 (12:42 +1100)]
Merge remote-tracking branch 'm68k-current/for-linus'

12 years agoRevert "hvc_console: display printk messages on console."
Stephen Rothwell [Thu, 3 Nov 2011 01:25:30 +0000 (12:25 +1100)]
Revert "hvc_console: display printk messages on console."

This reverts commit 361162459f62dc0826b82c9690a741a940f457f0.

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/linux-dm
Linus Torvalds [Thu, 3 Nov 2011 00:02:37 +0000 (17:02 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/linux-dm

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/linux-dm:
  dm: raid fix device status indicator when array initializing
  dm log userspace: add log device dependency
  dm log userspace: fix comment hyphens
  dm: add thin provisioning target
  dm: add persistent data library
  dm: add bufio
  dm: export dm get md
  dm table: add immutable feature
  dm table: add always writeable feature
  dm table: add singleton feature
  dm kcopyd: add dm_kcopyd_zero to zero an area
  dm: remove superfluous smp_mb
  dm: use local printk ratelimit
  dm table: propagate non rotational flag

12 years agoMerge branch 'for-linus' of git://git.selinuxproject.org/~jmorris/linux-security
Linus Torvalds [Thu, 3 Nov 2011 00:01:01 +0000 (17:01 -0700)]
Merge branch 'for-linus' of git://git.selinuxproject.org/~jmorris/linux-security

* 'for-linus' of git://git.selinuxproject.org/~jmorris/linux-security:
  TOMOYO: Fix interactive judgment functionality.

12 years agoMerge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Wed, 2 Nov 2011 23:55:15 +0000 (16:55 -0700)]
Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac

* 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac: (21 commits)
  MAINTAINERS: add an entry for Edac Sandy Bridge driver
  edac: tag sb_edac as EXPERIMENTAL, as it requires more testing
  EDAC: Fix incorrect edac mode reporting in sb_edac
  edac: sb_edac: Add it to the building system
  edac: Add an experimental new driver to support Sandy Bridge CPU's
  i7300_edac: Fix error cleanup logic
  i7core_edac: Initialize memory name with cpu, channel, bank
  i7core_edac: Fix compilation on 32 bits arch
  i7core_edac: scrubbing fixups
  EDAC: Correct Kconfig dependencies
  i7core_edac: return -ENODEV if no MC is found
  i7core_edac: use edac's own way to print errors
  MAINTAINERS: remove dropped edac_mce.* from the file
  i7core_edac: Drop the edac_mce facility
  x86, MCE: Use notifier chain only for MCE decoding
  EDAC i7core: Use mce socketid for better compatibility
  i7core_edac: Don't enable memory scrubbing for Xeon 35xx
  i7core_edac: Add scrubbing support
  edac: Move edac main structs to include/linux/edac.h
  i7core_edac: Fix oops when trying to inject errors
  ...

12 years agoMerge branch 'for-3.2' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Wed, 2 Nov 2011 23:54:36 +0000 (16:54 -0700)]
Merge branch 'for-3.2' of git://linux-nfs.org/~bfields/linux

* 'for-3.2' of git://linux-nfs.org/~bfields/linux:
  nfsd4: typo logical vs bitwise negate in nfsd4_decode_share_access

12 years agoMerge branch 'misc-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux
Linus Torvalds [Wed, 2 Nov 2011 23:52:17 +0000 (16:52 -0700)]
Merge branch 'misc-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux

* 'misc-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
  MAINTAINERS: Update entry for IA64
  [IA64] gpio: GENERIC_GPIO default must be n
  [IA64[ add CONFIG_NET_VENDOR_INTEL=y to default config files where needed
  [IA64] agp/hp-agp: Allow binding user memory to the AGP GART
  [IA64] sn2: add missing put_cpu()

12 years agoMerge branch 'akpm' (Andrew's incoming - part two)
Linus Torvalds [Wed, 2 Nov 2011 23:07:27 +0000 (16:07 -0700)]
Merge branch 'akpm' (Andrew's incoming - part two)

Says Andrew:

 "60 patches.  That's good enough for -rc1 I guess.  I have quite a lot
  of detritus to be rechecked, work through maintainers, etc.

 - most of the remains of MM
 - rtc
 - various misc
 - cgroups
 - memcg
 - cpusets
 - procfs
 - ipc
 - rapidio
 - sysctl
 - pps
 - w1
 - drivers/misc
 - aio"

* akpm: (60 commits)
  memcg: replace ss->id_lock with a rwlock
  aio: allocate kiocbs in batches
  drivers/misc/vmw_balloon.c: fix typo in code comment
  drivers/misc/vmw_balloon.c: determine page allocation flag can_sleep outside loop
  w1: disable irqs in critical section
  drivers/w1/w1_int.c: multiple masters used same init_name
  drivers/power/ds2780_battery.c: fix deadlock upon insertion and removal
  drivers/power/ds2780_battery.c: add a nolock function to w1 interface
  drivers/power/ds2780_battery.c: create central point for calling w1 interface
  w1: ds2760 and ds2780, use ida for id and ida_simple_get() to get it
  pps gpio client: add missing dependency
  pps: new client driver using GPIO
  pps: default echo function
  include/linux/dma-mapping.h: add dma_zalloc_coherent()
  sysctl: make CONFIG_SYSCTL_SYSCALL default to n
  sysctl: add support for poll()
  RapidIO: documentation update
  drivers/net/rionet.c: fix ethernet address macros for LE platforms
  RapidIO: fix potential null deref in rio_setup_device()
  RapidIO: add mport driver for Tsi721 bridge
  ...

12 years agomemcg: replace ss->id_lock with a rwlock
Andrew Bresticker [Wed, 2 Nov 2011 20:40:29 +0000 (13:40 -0700)]
memcg: replace ss->id_lock with a rwlock

While back-porting Johannes Weiner's patch "mm: memcg-aware global
reclaim" for an internal effort, we noticed a significant performance
regression during page-reclaim heavy workloads due to high contention of
the ss->id_lock.  This lock protects idr map, and serializes calls to
idr_get_next() in css_get_next() (which is used during the memcg hierarchy
walk).

Since idr_get_next() is just doing a look up, we need only serialize it
with respect to idr_remove()/idr_get_new().  By making the ss->id_lock a
rwlock, contention is greatly reduced and performance improves.

Tested: cat a 256m file from a ramdisk in a 128m container 50 times on
each core (one file + container per core) in parallel on a NUMA machine.
Result is the time for the test to complete in 1 of the containers.
Both kernels included Johannes' memcg-aware global reclaim patches.

Before rwlock patch: 1710.778s
After rwlock patch: 152.227s

Signed-off-by: Andrew Bresticker <abrestic@google.com>
Cc: Paul Menage <menage@gmail.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Ying Han <yinghan@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoaio: allocate kiocbs in batches
Jeff Moyer [Wed, 2 Nov 2011 20:40:10 +0000 (13:40 -0700)]
aio: allocate kiocbs in batches

In testing aio on a fast storage device, I found that the context lock
takes up a fair amount of cpu time in the I/O submission path.  The reason
is that we take it for every I/O submitted (see __aio_get_req).  Since we
know how many I/Os are passed to io_submit, we can preallocate the kiocbs
in batches, reducing the number of times we take and release the lock.

In my testing, I was able to reduce the amount of time spent in
_raw_spin_lock_irq by .56% (average of 3 runs).  The command I used to
test this was:

   aio-stress -O -o 2 -o 3 -r 8 -d 128 -b 32 -i 32 -s 16384 <dev>

I also tested the patch with various numbers of events passed to
io_submit, and I ran the xfstests aio group of tests to ensure I didn't
break anything.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Cc: Daniel Ehrenberg <dehrenberg@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/misc/vmw_balloon.c: fix typo in code comment
Rakib Mullick [Wed, 2 Nov 2011 20:40:07 +0000 (13:40 -0700)]
drivers/misc/vmw_balloon.c: fix typo in code comment

Fix typo in code comment.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Acked-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/misc/vmw_balloon.c: determine page allocation flag can_sleep outside loop
Rakib Mullick [Wed, 2 Nov 2011 20:40:04 +0000 (13:40 -0700)]
drivers/misc/vmw_balloon.c: determine page allocation flag can_sleep outside loop

In vmballoon_reserve_page(), flags has been passed from the callee
function (vmballoon_inflate here).  So, we can determine can_sleep outside
the loop.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Acked-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agow1: disable irqs in critical section
Jan Weitzel [Wed, 2 Nov 2011 20:40:02 +0000 (13:40 -0700)]
w1: disable irqs in critical section

Interrupting w1_delay() in w1_read_bit() results in missing the low level
on the w1 line and receiving "1" instead of "0".

Add local_irq_save()/local_irq_restore() around the critical section

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/w1/w1_int.c: multiple masters used same init_name
Florian Faber [Wed, 2 Nov 2011 20:39:59 +0000 (13:39 -0700)]
drivers/w1/w1_int.c: multiple masters used same init_name

When using multiple masters, w1_int.c would use the .init_name from w1.c
for all entities, which will fail when creating a corresponding sysfs
entry.  This patch uses the unique name previously generated.

  WARNING: at fs/sysfs/dir.c:451 sysfs_add_one+0x48/0x64()
  sysfs: cannot create duplicate filename '/devices/w1 bus master'
  Modules linked in:
  Call trace:
   [<9001a604>] warn_slowpath_common+0x34/0x44
   [<9001a64c>] warn_slowpath_fmt+0x14/0x18
   [<90078020>] sysfs_add_one+0x48/0x64
   [<900784ec>] create_dir+0x40/0x68
   [<9007857a>] sysfs_create_dir+0x66/0x78
   [<900c1a8a>] kobject_add_internal+0x6e/0x104
   [<900c1bc0>] kobject_add_varg+0x20/0x2c
   [<900c1c1c>] kobject_add+0x30/0x3c
   [<900dbd66>] device_add+0x6a/0x378
   [<900dbb4a>] device_initialize+0x12/0x48
   [<900dc080>] device_register+0xc/0x10
   [<900f99be>] w1_add_master_device+0x162/0x274
   [<90008e7a>] w1_gpio_probe+0x66/0xb4
   [<9000030c>] kernel_init+0x0/0xe8
   [<900dde54>] platform_drv_probe+0xc/0xe
   [<9000030c>] kernel_init+0x0/0xe8
   [<900dd4f8>] driver_probe_device+0x6c/0xdc
   [<900dd5fc>] __driver_attach+0x34/0x48
   [<900dcce8>] bus_for_each_dev+0x2c/0x48
   [<900dd5c8>] __driver_attach+0x0/0x48
   [<900dd38c>] driver_attach+0x10/0x14
   [<900dd16a>] bus_add_driver+0x6a/0x18c
   [<900dd768>] driver_register+0x60/0xb8
   [<90011594>] __initcall_w1_therm_init6+0x0/0x4
   [<90008e00>] w1_gpio_init+0x0/0x14
   [<9000030c>] kernel_init+0x0/0xe8
   [<900ddf48>] platform_driver_register+0x30/0x38
   [<90011594>] __initcall_w1_therm_init6+0x0/0x4
   [<90008e00>] w1_gpio_init+0x0/0x14
   [<9000030c>] kernel_init+0x0/0xe8
   [<900ddf5e>] platform_driver_probe+0xe/0x3c
   [<90008e0c>] w1_gpio_init+0xc/0x14
   [<90011594>] __initcall_w1_therm_init6+0x0/0x4
   [<90008e00>] w1_gpio_init+0x0/0x14
   [<900126d4>] do_one_initcall+0x34/0x130
   [<90000372>] kernel_init+0x66/0xe8
   [<90011594>] __initcall_w1_therm_init6+0x0/0x4
   [<9001ca3e>] do_exit+0x0/0x3a6
   [<9000030c>] kernel_init+0x0/0xe8
   [<9001ca3e>] do_exit+0x0/0x3a6

  ---[ end trace 5a9233884fead918 ]---
  kobject_add_internal failed for w1 bus master with -EEXIST, don't try to register things with the same name in the same directory.

Signed-off-by: Florian Faber <faber@faberman.de>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/power/ds2780_battery.c: fix deadlock upon insertion and removal
Clifton Barnes [Wed, 2 Nov 2011 20:39:55 +0000 (13:39 -0700)]
drivers/power/ds2780_battery.c: fix deadlock upon insertion and removal

Fixes the deadlock when inserting and removing the ds2780.

Signed-off-by: Clifton Barnes <cabarnes@indesign-llc.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: <stable@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/power/ds2780_battery.c: add a nolock function to w1 interface
Clifton Barnes [Wed, 2 Nov 2011 20:39:52 +0000 (13:39 -0700)]
drivers/power/ds2780_battery.c: add a nolock function to w1 interface

Adds a nolock function to the w1 interface to avoid locking the
mutex if needed.

Signed-off-by: Clifton Barnes <cabarnes@indesign-llc.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: <stable@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/power/ds2780_battery.c: create central point for calling w1 interface
Clifton Barnes [Wed, 2 Nov 2011 20:39:50 +0000 (13:39 -0700)]
drivers/power/ds2780_battery.c: create central point for calling w1 interface

Simply creates one point to call the w1 interface.

Signed-off-by: Clifton Barnes <cabarnes@indesign-llc.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: <stable@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agow1: ds2760 and ds2780, use ida for id and ida_simple_get() to get it
Jonathan Cameron [Wed, 2 Nov 2011 20:39:43 +0000 (13:39 -0700)]
w1: ds2760 and ds2780, use ida for id and ida_simple_get() to get it

Straightforward.  As an aside, the ida_init calls are not needed as far as
I can see needed.  (DEFINE_IDA does the same already).

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Acked-by: Clifton Barnes <cabarnes@indesign-llc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agopps gpio client: add missing dependency
Heiko Carstens [Wed, 2 Nov 2011 20:39:41 +0000 (13:39 -0700)]
pps gpio client: add missing dependency

Add "depends on GENERIC_HARDIRQS" to avoid compile breakage on s390:

drivers/built-in.o: In function `pps_gpio_remove':
linux-next/drivers/pps/clients/pps-gpio.c:189: undefined reference to `free_irq'

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: James Nuss <jamesnuss@nanometrics.ca>
Cc: Rodolfo Giometti <giometti@enneenne.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agopps: new client driver using GPIO
James Nuss [Wed, 2 Nov 2011 20:39:38 +0000 (13:39 -0700)]
pps: new client driver using GPIO

This client driver allows you to use a GPIO pin as a source for PPS
signals.  Platform data [1] are used to specify the GPIO pin number,
label, assert event edge type, and whether clear events are captured.

This driver is based on the work by Ricardo Martins who submitted an
initial implementation [2] of a PPS IRQ client driver to the linuxpps
mailing-list on Dec 3 2010.

[1] include/linux/pps-gpio.h
[2] http://ml.enneenne.com/pipermail/linuxpps/2010-December/004155.html

[akpm@linux-foundation.org: remove unneeded cast of void*]
Signed-off-by: James Nuss <jamesnuss@nanometrics.ca>
Cc: Ricardo Martins <rasm@fe.up.pt>
Acked-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Ricardo Martins <rasm@fe.up.pt>
Cc: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Cc: Igor Plyatov <plyatov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agopps: default echo function
James Nuss [Wed, 2 Nov 2011 20:39:34 +0000 (13:39 -0700)]
pps: default echo function

A default echo function has been provided so it is no longer an error when
you specify PPS_ECHOASSERT or PPS_ECHOCLEAR without an explicit echo
function.  This allows some code re-use and also makes it easier to write
client drivers since the default echo function does not normally need to
change.

Signed-off-by: James Nuss <jamesnuss@nanometrics.ca>
Reviewed-by: Ben Gardiner <bengardiner@nanometrics.ca>
Acked-by: Rodolfo Giometti <giometti@linux.it>
Cc: Ricardo Martins <rasm@fe.up.pt>
Cc: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Cc: Igor Plyatov <plyatov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoinclude/linux/dma-mapping.h: add dma_zalloc_coherent()
Andrew Morton [Wed, 2 Nov 2011 20:39:33 +0000 (13:39 -0700)]
include/linux/dma-mapping.h: add dma_zalloc_coherent()

Lots of driver code does a dma_alloc_coherent() and then zeroes out the
memory with a memset.  Make it easy for them.

Cc: Alexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agosysctl: make CONFIG_SYSCTL_SYSCALL default to n
WANG Cong [Wed, 2 Nov 2011 20:39:25 +0000 (13:39 -0700)]
sysctl: make CONFIG_SYSCTL_SYSCALL default to n

When I tried to send a patch to remove it, Andi told me we still need to
keep compabitlies for old libc, so we can't remove this completely.  Then
just make it default to n and remove the doc from
feature-removal-schedule.txt.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agosysctl: add support for poll()
Lucas De Marchi [Wed, 2 Nov 2011 20:39:22 +0000 (13:39 -0700)]
sysctl: add support for poll()

Adding support for poll() in sysctl fs allows userspace to receive
notifications of changes in sysctl entries.  This adds a infrastructure to
allow files in sysctl fs to be pollable and implements it for hostname and
domainname.

[akpm@linux-foundation.org: s/declare/define/ for definitions]
Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Greg KH <gregkh@suse.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoRapidIO: documentation update
Alexandre Bounine [Wed, 2 Nov 2011 20:39:19 +0000 (13:39 -0700)]
RapidIO: documentation update

Update rapidio.txt to reflect changes from recent patch.
See http://marc.info/?l=linux-kernel&m=131285620113589&w=2 for details.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Liu Gang <Gang.Liu@freescale.com>
Cc: Micha Nelissen <micha@neli.hopto.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/net/rionet.c: fix ethernet address macros for LE platforms
Alexandre Bounine [Wed, 2 Nov 2011 20:39:15 +0000 (13:39 -0700)]
drivers/net/rionet.c: fix ethernet address macros for LE platforms

Modify Ethernet addess macros to be compatible with BE/LE platforms

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Chul Kim <chul.kim@idt.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: <stable@kernel.org> [2.6.39+]
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoRapidIO: fix potential null deref in rio_setup_device()
Alexandre Bounine [Wed, 2 Nov 2011 20:39:11 +0000 (13:39 -0700)]
RapidIO: fix potential null deref in rio_setup_device()

The "goto cleanup" path can deference "rswitch" when it is NULL.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Chul Kim <chul.kim@idt.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoRapidIO: add mport driver for Tsi721 bridge
Alexandre Bounine [Wed, 2 Nov 2011 20:39:09 +0000 (13:39 -0700)]
RapidIO: add mport driver for Tsi721 bridge

Add RapidIO mport driver for IDT TSI721 PCI Express-to-SRIO bridge device.
 The driver provides full set of callback functions defined for mport
devices in RapidIO subsystem.  It also is compatible with current version
of RIONET driver (Ethernet over RapidIO messaging services).

This patch is applicable to kernel versions starting from 2.6.39.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: Chul Kim <chul.kim@idt.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoarch/powerpc/sysdev/fsl_rio.c: release rapidio port I/O region resource if port faile...
Liu Gang [Wed, 2 Nov 2011 20:39:07 +0000 (13:39 -0700)]
arch/powerpc/sysdev/fsl_rio.c: release rapidio port I/O region resource if port failed to initialize

The "struct rio_mport" contains a member of master port I/O memory
resource structure "struct resource iores".  This resource will be read
from device tree and be used for rapidio R/W transaction memory space.
Rapidio requests the port I/O memory resource under the root resource
"iomem_resource".

struct rio_mport *port;
port = kzalloc(sizeof(struct rio_mport), GFP_KERNEL);

request_resource(&iomem_resource, &port->iores);

When port failed to initialize, allocated "rio_mport" structure memory
will be freed, and the port I/O memory resource structure pointer
"&port->iores" will be invalid.  If other requests resource under
"iomem_resource", "&port->iores" node may be operated in the child
resources list and this will cause the system to crash.

So the requested port I/O memory resource should be released before
freeing allocated "rio_mport" structure.

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
Acked-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/rapidio/rio-scan.c: use discovered bit to test if enumeration is complete
Liu Gang [Wed, 2 Nov 2011 20:39:05 +0000 (13:39 -0700)]
drivers/rapidio/rio-scan.c: use discovered bit to test if enumeration is complete

The discovered bit in PGCCSR register indicates if the device has been
discovered by system host.  In Rapidio systems, some agent devices can also
be master devices.  They can issue requests into the system.

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
Acked-by: Alexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoinit: add root=PARTUUID=UUID/PARTNROFF=%d support
Will Drewry [Wed, 2 Nov 2011 20:38:59 +0000 (13:38 -0700)]
init: add root=PARTUUID=UUID/PARTNROFF=%d support

Expand root=PARTUUID=UUID syntax to support selecting a root partition by
integer offset from a known, unique partition.  This approach provides
similar properties to specifying a device and partition number, but using
the UUID as the unique path prior to evaluating the offset.

For example,
  root=PARTUUID=99DE9194-FC15-4223-9192-FC243948F88B/PARTNROFF=1
selects the partition with UUID 99DE.. then select the next
partition.

This change is motivated by a particular usecase in Chromium OS where the
bootloader can easily determine what partition it is on (by UUID) but
doesn't perform general partition table walking.

That said, support for this model provides a direct mechanism for the user
to modify the root partition to boot without specifically needing to
extract each UUID or update the bootloader explicitly when the root
partition UUID is changed (if it is recreated to be larger, for instance).
 Pinning to a /boot-style partition UUID allows the arbitrary root
partition reconfiguration/modifications with slightly less ambiguity than
just [dev][partition] and less stringency than the specific root partition
UUID.

[sfr@canb.auug.org.au: fix init sections warning]
Signed-off-by: Will Drewry <wad@chromium.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoinclude/linux/sem.h: make sysv_sem empty if SYSVIPC is disabled
Manfred Spraul [Wed, 2 Nov 2011 20:38:56 +0000 (13:38 -0700)]
include/linux/sem.h: make sysv_sem empty if SYSVIPC is disabled

For the sysvsem undo, each task struct contains a sysv_sem structure with
a pointer to the undo information.

This pointer is only necessary if sysvipc is enabled - thus the pointer
can be made conditional on CONFIG_SYSVIPC.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoipc/sem.c: remove private structures from public header file
Manfred Spraul [Wed, 2 Nov 2011 20:38:54 +0000 (13:38 -0700)]
ipc/sem.c: remove private structures from public header file

include/linux/sem.h contains several structures that are only used within
ipc/sem.c.

The patch moves them into ipc/sem.c - there is no need to expose the
structures to the whole kernel.

No functional changes, only whitespace cleanups and 80-char per line
fixes.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoipc/sem.c: handle spurious wakeups
Manfred Spraul [Wed, 2 Nov 2011 20:38:52 +0000 (13:38 -0700)]
ipc/sem.c: handle spurious wakeups

semtimedop() does not handle spurious wakeups, it returns -EINTR to user
space.  Most other schedule() users would just loop and not return to user
space.  The patch adds such a loop to semtimedop()

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Reported-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoipc/sem.c: fix return code race with semop vs. semop +semctl(IPC_RMID)
Manfred Spraul [Wed, 2 Nov 2011 20:38:50 +0000 (13:38 -0700)]
ipc/sem.c: fix return code race with semop vs. semop +semctl(IPC_RMID)

sys_semtimedop() may return -EIDRM although the semaphore operation
completed successfully:

thread 1: thread 2:
semtimedop(), sleeps
semop():
* acquires sem_lock()
semtimedop() woken up due to timeout
sem_lock() loops
* notices that thread 2 could be completed.
* performs the operations that thread 2 is sleeping on.
* marks the semaphore operation as IN_WAKEUP
* drops sem_lock(), does wakeup, sets return code to 0
* thread delayed due to interrupt, whatever
* returns to user space
* thread still delayed
semctl(IPC_RMID)
* acquires sem_lock()
* ipc_rmid(), ipcp->deleted=1
* drops sem_lock()
* thread finally continues - but seem_lock()
  now fails due to ipcp->deleted == 1
* returns -EIDRM instead of 0

The fix is trivial: Always use the return code in queue.status.

In real world, the race probably doesn't matter:
If the semaphore array is destroyed, the app is probably not interested
if the last operation succeeded or was already cancelled.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Galbraith <efault@gmx.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoida: make ida_simple_get/put() IRQ safe
Tejun Heo [Wed, 2 Nov 2011 20:38:46 +0000 (13:38 -0700)]
ida: make ida_simple_get/put() IRQ safe

It's often convenient to be able to release resource from IRQ context.
Make ida_simple_*() use irqsave/restore spin ops so that they are IRQ
safe.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoproc: fix races against execve() of /proc/PID/fd**
Vasiliy Kulikov [Wed, 2 Nov 2011 20:38:44 +0000 (13:38 -0700)]
proc: fix races against execve() of /proc/PID/fd**

fd* files are restricted to the task's owner, and other users may not get
direct access to them.  But one may open any of these files and run any
setuid program, keeping opened file descriptors.  As there are permission
checks on open(), but not on readdir() and read(), operations on the kept
file descriptors will not be checked.  It makes it possible to violate
procfs permission model.

Reading fdinfo/* may disclosure current fds' position and flags, reading
directory contents of fdinfo/ and fd/ may disclosure the number of opened
files by the target task.  This information is not sensible per se, but it
can reveal some private information (like length of a password stored in a
file) under certain conditions.

Used existing (un)lock_trace functions to check for ptrace_may_access(),
but instead of using EPERM return code from it use EACCES to be consistent
with existing proc_pid_follow_link()/proc_pid_readlink() return code.  If
they differ, attacker can guess what fds exist by analyzing stat() return
code.  Patched handlers: stat() for fd/*, stat() and read() for fdindo/*,
readdir() and lookup() for fd/ and fdinfo/.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: <stable@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoprocfs: report EISDIR when reading sysctl dirs in proc
Pavel Emelyanov [Wed, 2 Nov 2011 20:38:42 +0000 (13:38 -0700)]
procfs: report EISDIR when reading sysctl dirs in proc

On reading sysctl dirs we should return -EISDIR instead of -EINVAL.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agocpusets: avoid looping when storing to mems_allowed if one node remains set
David Rientjes [Wed, 2 Nov 2011 20:38:39 +0000 (13:38 -0700)]
cpusets: avoid looping when storing to mems_allowed if one node remains set

{get,put}_mems_allowed() exist so that general kernel code may locklessly
access a task's set of allowable nodes without having the chance that a
concurrent write will cause the nodemask to be empty on configurations
where MAX_NUMNODES > BITS_PER_LONG.

This could incur a significant delay, however, especially in low memory
conditions because the page allocator is blocking and reclaim requires
get_mems_allowed() itself.  It is not atypical to see writes to
cpuset.mems take over 2 seconds to complete, for example.  In low memory
conditions, this is problematic because it's one of the most imporant
times to change cpuset.mems in the first place!

The only way a task's set of allowable nodes may change is through cpusets
by writing to cpuset.mems and when attaching a task to a generic code is
not reading the nodemask with get_mems_allowed() at the same time, and
then clearing all the old nodes.  This prevents the possibility that a
reader will see an empty nodemask at the same time the writer is storing a
new nodemask.

If at least one node remains unchanged, though, it's possible to simply
set all new nodes and then clear all the old nodes.  Changing a task's
nodemask is protected by cgroup_mutex so it's guaranteed that two threads
are not changing the same task's nodemask at the same time, so the
nodemask is guaranteed to be stored before another thread changes it and
determines whether a node remains set or not.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Miao Xie <miaox@cn.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Paul Menage <paul@paulmenage.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm/page_cgroup.c: quiet sparse noise
H Hartley Sweeten [Wed, 2 Nov 2011 20:38:36 +0000 (13:38 -0700)]
mm/page_cgroup.c: quiet sparse noise

warning: symbol 'swap_cgroup_ctrl' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Paul Menage <paul@paulmenage.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Balbir Singh <bsingharora@gmail.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>