cascardo/linux.git
11 years agoMerge tag 'tags/disintegrate-tile-20121009' into for-linus
Chris Metcalf [Fri, 12 Oct 2012 19:11:08 +0000 (15:11 -0400)]
Merge tag 'tags/disintegrate-tile-20121009' into for-linus

UAPI Disintegration 2012-10-09

11 years agoMerge tag 'stable/for-linus-3.7-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 12 Oct 2012 13:20:28 +0000 (22:20 +0900)]
Merge tag 'stable/for-linus-3.7-rc0-tag' of git://git./linux/kernel/git/konrad/xen

Pull Xen fixes from Konrad Rzeszutek Wilk:
 "This has four bug-fixes and one tiny feature that I forgot to put
  initially in my tree due to oversight.

  The feature is for kdump kernels to speed up the /proc/vmcore reading.
  There is a ram_is_pfn helper function that the different platforms can
  register for.  We are now doing that.

  The bug-fixes cover some embarrassing struct pv_cpu_ops variables
  being set to NULL on Xen (but not baremetal).  We had a similar issue
  in the past with {write|read}_msr_safe and this fills the three
  missing ones.  The other bug-fix is to make the console output (hvc)
  be capable of dealing with misbehaving backends and not fall flat on
  its face.  Lastly, a quirk for older XenBus implementations that came
  with an ancient v3.4 hypervisor (so RHEL5 based) - reading of certain
  non-existent attributes just hangs the guest during bootup - so we
  take precaution of not doing that on such older installations.

  Feature:
   - Register a pfn_is_ram helper to speed up reading of /proc/vmcore.
  Bug-fixes:
   - Three pvops call for Xen were undefined causing BUG_ONs.
   - Add a quirk so that the shutdown watches (used by kdump) are not
     used with older Xen (3.4).
   - Fix ungraceful state transition for the HVC console."

* tag 'stable/for-linus-3.7-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/pv-on-hvm kexec: add quirk for Xen 3.4 and shutdown watches.
  xen/bootup: allow {read|write}_cr8 pvops call.
  xen/bootup: allow read_tscp call for Xen PV guests.
  xen pv-on-hvm: add pfn_is_ram helper for kdump
  xen/hvc: handle backend CLOSED without CLOSING

11 years agoMerge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Fri, 12 Oct 2012 13:19:28 +0000 (22:19 +0900)]
Merge branch 'slab/urgent' of git://git./linux/kernel/git/penberg/linux

Pull SLAB fix from Pekka Enberg:
 "This contains a lockdep false positive fix from Jiri Kosina I missed
  from the previous pull request."

* 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
  mm, slab: release slab_mutex earlier in kmem_cache_destroy()

11 years agoMerge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 12 Oct 2012 13:17:48 +0000 (22:17 +0900)]
Merge branch 'timers-core-for-linus' of git://git./linux/kernel/git/tip/tip

Pull timer core update from Thomas Gleixner:
 - Bug fixes (one for a longstanding dead loop issue)
 - Rework of time related vsyscalls
 - Alarm timer updates
 - Jiffies updates to remove compile time dependencies

* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timekeeping: Cast raw_interval to u64 to avoid shift overflow
  timers: Fix endless looping between cascade() and internal_add_timer()
  time/jiffies: bring back unconditional LATCH definition
  time: Convert x86_64 to using new update_vsyscall
  time: Only do nanosecond rounding on GENERIC_TIME_VSYSCALL_OLD systems
  time: Introduce new GENERIC_TIME_VSYSCALL
  time: Convert CONFIG_GENERIC_TIME_VSYSCALL to CONFIG_GENERIC_TIME_VSYSCALL_OLD
  time: Move update_vsyscall definitions to timekeeper_internal.h
  time: Move timekeeper structure to timekeeper_internal.h for vsyscall changes
  jiffies: Remove compile time assumptions about CLOCK_TICK_RATE
  jiffies: Kill unused TICK_USEC_TO_NSEC
  alarmtimer: Rename alarmtimer_remove to alarmtimer_dequeue
  alarmtimer: Remove unused helpers & defines
  alarmtimer: Use hrtimer per-alarm instead of per-base
  alarmtimer: Implement minimum alarm interval for allowing suspend

11 years agoMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 12 Oct 2012 13:13:05 +0000 (22:13 +0900)]
Merge branch 'sched-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
 "A CPU hotplug related crash fix and a nohz accounting fixlet."

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched: Update sched_domains_numa_masks[][] when new cpus are onlined
  sched: Ensure 'sched_domains_numa_levels' is safe to use in other functions
  nohz: Fix one jiffy count too far in idle cputime

11 years agoMerge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 12 Oct 2012 13:12:07 +0000 (22:12 +0900)]
Merge branch 'core-rcu-for-linus' of git://git./linux/kernel/git/tip/tip

Pull RCU fixes from Ingo Molnar:
 "This tree includes a shutdown/cpu-hotplug deadlock fix and a
  documentation fix."

* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  rcu: Advise most users not to enable RCU user mode
  rcu: Grace-period initialization excludes only RCU notifier

11 years agoxen/pv-on-hvm kexec: add quirk for Xen 3.4 and shutdown watches.
Konrad Rzeszutek Wilk [Wed, 10 Oct 2012 17:23:36 +0000 (13:23 -0400)]
xen/pv-on-hvm kexec: add quirk for Xen 3.4 and shutdown watches.

The commit 254d1a3f02ebc10ccc6e4903394d8d3f484f715e, titled
"xen/pv-on-hvm kexec: shutdown watches from old kernel" assumes that the
XenBus backend can deal with reading of values from:
 "control/platform-feature-xs_reset_watches":

    ... a patch for xenstored is required so that it
    accepts the XS_RESET_WATCHES request from a client (see changeset
    23839:42a45baf037d in xen-unstable.hg). Without the patch for xenstored
    the registration of watches will fail and some features of a PVonHVM
    guest are not available. The guest is still able to boot, but repeated
    kexec boots will fail."

Sadly this is not true when using a Xen 3.4 hypervisor and booting a PVHVM
guest. We end up hanging at:

  err = xenbus_scanf(XBT_NIL, "control",
                        "platform-feature-xs_reset_watches", "%d", &supported);

This can easily be seen with guests hanging at xenbus_init:

NX (Execute Disable) protection: active
SMBIOS 2.4 present.
DMI: Xen HVM domU, BIOS 3.4.0 05/13/2011
Hypervisor detected: Xen HVM
Xen version 3.4.
Xen Platform PCI: I/O protocol version 1
... snip ..
calling  xenbus_init+0x0/0x27e @ 1

Reverting the commit or using the attached patch fixes the issue. This fix
checks whether the hypervisor is older than 4.0 and if so does not try to
perform the read.

Fixes-Oracle-Bug: 14708233
CC: stable@vger.kernel.org
Acked-by: Olaf Hering <olaf@aepfle.de>
[v2: Added a comment in the source code]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoxen/bootup: allow {read|write}_cr8 pvops call.
Konrad Rzeszutek Wilk [Wed, 10 Oct 2012 17:25:48 +0000 (13:25 -0400)]
xen/bootup: allow {read|write}_cr8 pvops call.

We actually do not do anything about it. Just return a default
value of zero and if the kernel tries to write anything but 0
we BUG_ON.

This fixes the case when an user tries to suspend the machine
and it blows up in save_processor_state b/c 'read_cr8' is set
to NULL and we get:

kernel BUG at /home/konrad/ssd/linux/arch/x86/include/asm/paravirt.h:100!
invalid opcode: 0000 [#1] SMP
Pid: 2687, comm: init.late Tainted: G           O 3.6.0upstream-00002-gac264ac-dirty #4 Bochs Bochs
RIP: e030:[<ffffffff814d5f42>]  [<ffffffff814d5f42>] save_processor_state+0x212/0x270

.. snip..
Call Trace:
 [<ffffffff810733bf>] do_suspend_lowlevel+0xf/0xac
 [<ffffffff8107330c>] ? x86_acpi_suspend_lowlevel+0x10c/0x150
 [<ffffffff81342ee2>] acpi_suspend_enter+0x57/0xd5

CC: stable@vger.kernel.org
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoxen/bootup: allow read_tscp call for Xen PV guests.
Konrad Rzeszutek Wilk [Wed, 10 Oct 2012 17:30:47 +0000 (13:30 -0400)]
xen/bootup: allow read_tscp call for Xen PV guests.

The hypervisor will trap it. However without this patch,
we would crash as the .read_tscp is set to NULL. This patch
fixes it and sets it to the native_read_tscp call.

CC: stable@vger.kernel.org
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoMerge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck...
Ingo Molnar [Fri, 12 Oct 2012 07:39:08 +0000 (09:39 +0200)]
Merge branch 'rcu/urgent' of git://git./linux/kernel/git/paulmck/linux-rcu into core/rcu

Pull RCU fixes from Paul E. McKenney.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
11 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Fri, 12 Oct 2012 03:39:17 +0000 (12:39 +0900)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-media

Pull second set of media updates from Mauro Carvalho Chehab:
 "Despite its size, most of the stuff here is trivial.  This series
  contains:

   - s5p-mfc: additions at the driver and at the core to support H.264
     hardware codec;
   - Some improvements at s5p and davinci embedded drivers;
   - Some V4L2 compliance fixes applied on a few drivers;
   - Several random trivial patches, including several fixes and a few
     new board support additions;

  Notes:

   1) Some Exynos media patches were dependent on some -arm fixes that
      got merged on changeset 782cd9e.  That's why this pull request is
      based that changeset.

   2) As promised, I reviewed the pending VB2 DMABUF series.

      While setting a test environment, it was noticed that the upstream
      support for Samsung Exynos 4 boards (smdk310 and Origen) are
      broken upstream, likely due to regressions: both defconfigs are
      wrong and regulator settings for both boards are broken.  That,
      allied with some bug at the dummy regulator driver, causes OOPSes
      during boot time.

      Long story short: even fixing the above, the proposed patches
      OOPSed when running the DMABUF test.  Not sure yet if the OOPSes
      are due to some other undetected regressions, or due to some bug
      on the patches.

      Due to the above, DMABUF patches for vb2 got NACKed for 3.7."

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (109 commits)
  [media] m5mols: Add missing #include <linux/sizes.h>
  [media] stk1160: Add support for S-Video input
  Revert "[media] omap3isp: Replace cpu_is_omap3630() with ISP revision check"
  [media]  dvb: LNA implementation changes
  [media] v4l2-ioctl: fix W=1 warnings
  [media] v4l2-ioctl: add blocks check for VIDIOC_SUBDEV_G/S_EDID
  [media] omap3isp: Fix compilation error in ispreg.h
  [media] rc-msi-digivox-ii: Add full scan keycodes
  [media] cx25821: testing the wrong variable
  [media] tda18271-common: hold the I2C adapter during write transfers
  [media] ds3000: add module parameter to force firmware upload
  [media] drivers/media: Remove unnecessary semicolon
  [media] winbond: remove space from driver name
  [media] iguanair: cannot send data from the stack
  [media] omap3isp: Replace cpu_is_omap3630() with ISP revision check
  [media] dvb-usb: print small buffers via %*ph
  [media] uvc: Add return code check at vb2_queue_init()
  [media] em28xx: Replace memcpy with struct assignment
  [media] bt8xx: Add video4linux control V4L2_CID_COLOR_KILLER
  [media] mem2mem_testdev: Use devm_kzalloc() in probe
  ...

Conflicts:
arch/arm/mach-davinci/include/mach/da8xx.h

11 years agoMerge tag 'pinctrl-for-3.7-late' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 12 Oct 2012 03:35:05 +0000 (12:35 +0900)]
Merge tag 'pinctrl-for-3.7-late' of git://git./linux/kernel/git/linusw/linux-pinctrl

Pull second set of pinctrl patches from Linus Walleij:
 "Here is a late pinctrl pull request with stuff that wasn't quite
  tested at the first pull request.

  The main reason to not hold off is that the modifications to
  irq_domain_add_simple() as reviewed by Rob Herring introduce new
  infrastructure for irqdomains that will be useful for the next cycle:
  instead of sprinkling irq descriptor allocation all over the kernel
  wherever a "legacy" domain is registered, which is necessary for any
  platform using sparse IRQs, and many irq chips are say GPIO
  controllers which may be used with several systems, some with sparse
  IRQs some not, we push this into the irq_domain_add_simple() so we can
  atleast do mistakes in one place.

  The irq_domain_add_simple() is currently unused in the kernel, so I
  need to provide a user.  The Nomadik stuff that goes with are changes
  to the driver I use day-to-day to make use of this facility (and a
  dependency), so see it as a way to eat my own dogfood: if this blows
  up the egg hits my face.

  A second round of pinctrl patches for v3.7:
   - Complement the Nomadik pinctrl driver with alternate Cx functions
     so it handles all oddities.
   - A patch to the IRQdomain to reform the simple irqdomain to handle
     IRQ descriptor allocation dynamically.
   - Use the above feature in the Nomadik pin controller."

* tag 'pinctrl-for-3.7-late' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl/nomadik: use simple or linear IRQ domain
  irqdomain: augment add_simple() to allocate descs
  pinctrl/nomadik: support other alternate-C functions

11 years agoMerge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm
Linus Torvalds [Fri, 12 Oct 2012 03:32:43 +0000 (12:32 +0900)]
Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm

Pull second set of ARM updates from Russell King:
 "This is the second set of ARM updates for this merge window.

  Contained within are changes to allow the kernel to boot in hypervisor
  mode on CPUs supporting virtualization, and cache flushing support to
  the point of inner sharable unification, which are used by the
  suspend/resume code to avoid having to do a full cache flush.

  Also included is one fix for VFP code identified by Michael Olbrich."

* 'for-linus' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: vfp: fix saving d16-d31 vfp registers on v6+ kernels
  ARM: 7549/1: HYP: fix boot on some ARM1136 cores
  ARM: 7542/1: mm: fix cache LoUIS API for xscale and feroceon
  ARM: mm: update __v7_setup() to the new LoUIS cache maintenance API
  ARM: kernel: update __cpu_disable to use cache LoUIS maintenance API
  ARM: kernel: update cpu_suspend code to use cache LoUIS operations
  ARM: mm: rename jump labels in v7_flush_dcache_all function
  ARM: mm: implement LoUIS API for cache maintenance ops
  ARM: virt: arch_timers: enable access to physical timers
  ARM: virt: Add CONFIG_ARM_VIRT_EXT option
  ARM: virt: Add boot-time diagnostics
  ARM: virt: Update documentation for hyp mode entry support
  ARM: zImage/virt: hyp mode entry support for the zImage loader
  ARM: virt: allow the kernel to be entered in HYP mode
  ARM: opcodes: add __ERET/__MSR_ELR_HYP instruction encoding

11 years agoMerge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 12 Oct 2012 03:31:28 +0000 (12:31 +0900)]
Merge tag 'sound-3.7' of git://git./linux/kernel/git/tiwai/sound

Pull sound updates #2 from Takashi Iwai:
 "This update contains a few cleanup works, regression/stable fixes
  gathered since the last pull request.

   - Clean up with generic hd-audio jack handling code by David
     Henningsson
   - A few regression fixes for standardized HD-audio auto-parser
   - Misc clean-up and small fixes"

* tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - do not detect jack on internal speakers for Realtek
  ALSA: hda - Fix missing beep on ASUS X43U notebook
  ALSA: hda - Remove AZX_DCAPS_POSFIX_COMBO
  ALSA: hda - Warn an allocation for an uninitialized array
  ALSA: hda/cirrus - Add missing init/free of hda_gen_spec
  ALSA: hda - Fix memory leaks at error path in patch_cirrus.c
  ALSA: hda - Add missing hda_gen_spec to struct via_spec
  ALSA: hda - remove "Mic Jack Mode" for headset jacks (Latitude Exx30)
  ALSA: hda - make Cirrus codec use generic unsol event handler
  ALSA: hda - make VIA codec use generic unsol event handler
  ALSA: hda - Remove dead GPIO code for VIA codec
  ALSA: usb-audio: Add TASCAM US122 MKII playback

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Fri, 12 Oct 2012 01:52:03 +0000 (10:52 +0900)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

Pull pile 2 of vfs updates from Al Viro:
 "Stuff in this one - assorted fixes, lglock tidy-up, death to
  lock_super().

  There'll be a VFS pile tomorrow (with patches from Jeff Layton,
  sanitizing getname() and related parts of audit and preparing for
  ESTALE fixes), but I'd rather push the stuff in this one ASAP - some
  of the bugs closed here are quite unpleasant."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  vfs: bogus warnings in fs/namei.c
  consitify do_mount() arguments
  lglock: add DEFINE_STATIC_LGLOCK()
  lglock: make the per_cpu locks static
  lglock: remove unused DEFINE_LGLOCK_LOCKDEP()
  MAX_LFS_FILESIZE definition for 64bit needs LL...
  tmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking
  vfs: drop lock/unlock super
  ufs: drop lock/unlock super
  sysv: drop lock/unlock super
  hpfs: drop lock/unlock super
  fat: drop lock/unlock super
  ext3: drop lock/unlock super
  exofs: drop lock/unlock super
  dup3: Return an error when oldfd == newfd.
  fs: handle failed audit_log_start properly
  fs: prevent use after free in auditing when symlink following was denied

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
Linus Torvalds [Fri, 12 Oct 2012 01:49:08 +0000 (10:49 +0900)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/signal

Pull pile 2 of execve and kernel_thread unification work from Al Viro:
 "Stuff in there: kernel_thread/kernel_execve/sys_execve conversions for
  several more architectures plus assorted signal fixes and cleanups.

  There'll be more (in particular, real fixes for the alpha
  do_notify_resume() irq mess)..."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (43 commits)
  alpha: don't open-code trace_report_syscall_{enter,exit}
  Uninclude linux/freezer.h
  m32r: trim masks
  avr32: trim masks
  tile: don't bother with SIGTRAP in setup_frame
  microblaze: don't bother with SIGTRAP in setup_rt_frame()
  mn10300: don't bother with SIGTRAP in setup_frame()
  frv: no need to raise SIGTRAP in setup_frame()
  x86: get rid of duplicate code in case of CONFIG_VM86
  unicore32: remove pointless test
  h8300: trim _TIF_WORK_MASK
  parisc: decide whether to go to slow path (tracesys) based on thread flags
  parisc: don't bother looping in do_signal()
  parisc: fix double restarts
  bury the rest of TIF_IRET
  sanitize tsk_is_polling()
  bury _TIF_RESTORE_SIGMASK
  unicore32: unobfuscate _TIF_WORK_MASK
  mips: NOTIFY_RESUME is not needed in TIF masks
  mips: merge the identical "return from syscall" per-ABI code
  ...

Conflicts:
arch/arm/include/asm/thread_info.h

11 years agoMerge branch 'writeback-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 12 Oct 2012 01:46:03 +0000 (10:46 +0900)]
Merge branch 'writeback-for-next' of git://git./linux/kernel/git/wfg/linux

Pull writeback fixes from Fengguang Wu:
 "Three trivial writeback fixes"

* 'writeback-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
  CPU hotplug, writeback: Don't call writeback_set_ratelimit() too often during hotplug
  writeback: correct comment for move_expired_inodes()
  backing-dev: use kstrto* in preference to simple_strtoul

11 years agoMerge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Fri, 12 Oct 2012 01:32:29 +0000 (10:32 +0900)]
Merge branch 'misc' of git://git./linux/kernel/git/mmarek/kbuild

Pull kbuild misc changes from Michal Marek:
 "In the non-critical part of kbuild, I have
   - Some make coccicheck improvements and two new tests
   - Support for a cleaner html output in scripts/kernel-doc, named
     html5 (no, it does not play videos, yet)

  BTW, Randy wants to route further kernel-doc patches through the
  kbuild tree."

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  Update SmPL/Coccinelle section of MAINTAINERS
  coccicheck: Add the rep+ctxt mode
  scripts/coccinelle/tests/odd_ptr_err.cocci: semantic patch for IS_ERR/PTR_ERR inconsistency
  scripts/tags.sh: Add magic for pci access functions
  scripts/coccinelle: ptr_ret: Add ternary operator version
  scripts/kernel-doc: drop maintainer
  scripts/kernel-doc: added support for html5

11 years agoMerge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Fri, 12 Oct 2012 01:28:52 +0000 (10:28 +0900)]
Merge branch 'kconfig' of git://git./linux/kernel/git/mmarek/kbuild

Pull kconfig changes from Michal Marek:
 "kconfig in v3.7 is going to
   - initialize ncurses only once in menuconfig
   - be able to jump to a search result in menuconfig
   - change the misnomer oldnoconfig to a more meaningful name
     olddefconfig, keeping the old name as alias"

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kconfig: replace 'oldnoconfig' with 'olddefconfig', and keep the old name as an alias
  menuconfig: Assign jump keys per-page instead of globally
  menuconfig: Do not open code textbox scroll up/down
  menuconfig: Add jump keys to search results
  menuconfig: Extend dialog_textbox so that it can return to a scrolled position
  menuconfig: Extend dialog_textbox so that it can exit on arbitrary keypresses
  menuconfig: Remove superfluous conditionnal
  kconfig: document oldnoconfig to what it really does in conf.c
  kconfig/mconf.c: revision of curses initialization.

11 years agoMerge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Fri, 12 Oct 2012 01:27:27 +0000 (10:27 +0900)]
Merge branch 'kbuild' of git://git./linux/kernel/git/mmarek/kbuild

Pull kbuild changes from Michal Marek:
 "The main part of kbuild for v3.7 contains:
   - Fix for scripts/Makefile.modpost to not choke on a '.ko' substring
     in the build directory path
   - Two warning fixes (modpost and main Makefile)
   - __compiletime_error works also with gcc 4.3
   - make tar{gz,bz2,xz}-pkg uses default compression settings instead
     of saving as many bytes as possible (this should actually be in the
     misc branch, I don't know why I applied it here)."

* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  compiler-gcc4.h: correct verion check for __compiletime_error
  modpost: Permit .GCC.command.line sections
  Kbuild: use normal compression settings for tar*-pkg
  scripts/Makefile.modpost: error in finding modules from .mod files.
  kbuild: Remove useless warning while appending KCFLAGS

11 years agoMerge tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6
Linus Torvalds [Fri, 12 Oct 2012 01:21:02 +0000 (10:21 +0900)]
Merge tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6

Pull fbdev updates from Florian Tobias Schandinat:
 "This includes:
   - large updates for OMAP
     - basic OMAP5 DSS support for DPI and DSI outputs
     - large cleanups and restructuring
   - some update to Exynos and da8xx-fb
   - removal of the pnx4008 driver (arch removed)
   - various other small patches"

Fix up some trivial conflicts (mostly just include line changes, but
also some due to the renaming of the deferred work functions by Tejun).

* tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6: (193 commits)
  gbefb: fix compile error
  video: mark nuc900fb_map_video_memory as __devinit
  video/mx3fb: set .owner to prevent module unloading while being used
  video: exynos_dp: use clk_prepare_enable and clk_disable_unprepare
  drivers/video/exynos/exynos_mipi_dsi.c: fix error return code
  drivers/video/savage/savagefb_driver.c: fix error return code
  video: s3c-fb: use clk_prepare_enable and clk_disable_unprepare
  da8xx-fb: save and restore LCDC context across suspend/resume cycle
  da8xx-fb: add pm_runtime support
  video/udlfb: fix line counting in fb_write
  OMAPDSS: add missing include for string.h
  OMAPDSS: DISPC: Configure color conversion coefficients for writeback
  OMAPDSS: DISPC: Add manager like functions for writeback
  OMAPDSS: DISPC: Configure writeback FIFOs
  OMAPDSS: DISPC: Configure writeback specific parameters in dispc_wb_setup()
  OMAPDSS: DISPC: Configure overlay-like parameters in dispc_wb_setup
  OMAPDSS: DISPC: Add function to set channel in for writeback
  OMAPDSS: DISPC: Don't set chroma resampling bit for writeback
  OMAPDSS: DISPC: Downscale chroma if plane is writeback
  OMAPDSS: DISPC: Configure input and output sizes for writeback
  ...

11 years agoMerge tag 'for-linus-merge-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 12 Oct 2012 00:59:23 +0000 (09:59 +0900)]
Merge tag 'for-linus-merge-3.7' of git://git./linux/kernel/git/ericvh/v9fs

Pull v9fs update from Eric Van Hensbergen.

* tag 'for-linus-merge-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9P: Fix race between p9_write_work() and p9_fd_request()
  9P: Fix race in p9_write_work()
  9P: fix test at the end of p9_write_work()
  9P: Fix race in p9_read_work()
  9p: don't use __getname/__putname for uname/aname
  net/9p: Check errno validity
  fs/9p: avoid debug OOPS when reading a long symlink

11 years agovfs: bogus warnings in fs/namei.c
Arnd Bergmann [Thu, 11 Oct 2012 13:20:00 +0000 (13:20 +0000)]
vfs: bogus warnings in fs/namei.c

The follow_link() function always initializes its *p argument,
or returns an error, but when building with 'gcc -s', the compiler
gets confused by the __always_inline attribute to the function
and can no longer detect where the cookie was initialized.

The solution is to always initialize the pointer from follow_link,
even in the error path. When building with -O2, this has zero impact
on generated code and adds a single instruction in the error path
for a -Os build on ARM.

Without this patch, building with gcc-4.6 through gcc-4.8 and
CONFIG_CC_OPTIMIZE_FOR_SIZE results in:

fs/namei.c: In function 'link_path_walk':
fs/namei.c:649:24: warning: 'cookie' may be used uninitialized in this function [-Wuninitialized]
fs/namei.c:1544:9: note: 'cookie' was declared here
fs/namei.c: In function 'path_lookupat':
fs/namei.c:649:24: warning: 'cookie' may be used uninitialized in this function [-Wuninitialized]
fs/namei.c:1934:10: note: 'cookie' was declared here
fs/namei.c: In function 'path_openat':
fs/namei.c:649:24: warning: 'cookie' may be used uninitialized in this function [-Wuninitialized]
fs/namei.c:2899:9: note: 'cookie' was declared here

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agoconsitify do_mount() arguments
Al Viro [Thu, 11 Oct 2012 15:42:01 +0000 (11:42 -0400)]
consitify do_mount() arguments

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agocompiler-gcc4.h: correct verion check for __compiletime_error
Daniel Santos [Fri, 28 Sep 2012 23:20:02 +0000 (18:20 -0500)]
compiler-gcc4.h: correct verion check for __compiletime_error

__attribute__((error(msg))) was introduced in gcc 4.3 (not 4.4) and as I
was unable to find any gcc bugs pertaining to it, I'm presuming that it
has functioned as advertised since 4.3.0.

Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: David Rientjes <rientjes@google.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
11 years agomodpost: Permit .GCC.command.line sections
Jonathan Kliegman [Thu, 4 Oct 2012 20:32:19 +0000 (16:32 -0400)]
modpost: Permit .GCC.command.line sections

Allow .GCC.command.line sections in modules to prevent modpost warnings:
WARNING: sound/usb/snd-usbmidi-lib.o (.GCC.command.line): unexpected non-allocatable section.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example <linux/init.h> contains
section definitions for use in .S files.

Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
11 years agoMerge branch 'staging/for_v3.7' into v4l_for_linus
Mauro Carvalho Chehab [Thu, 11 Oct 2012 18:07:19 +0000 (15:07 -0300)]
Merge branch 'staging/for_v3.7' into v4l_for_linus

Applied on the top of changeset 782cd9e, as some of those patches
depend on some fixes that went via -arm tree.

* staging/for_v3.7: (109 commits)
  [media] m5mols: Add missing #include <linux/sizes.h>
  [media] stk1160: Add support for S-Video input
  Revert "[media] omap3isp: Replace cpu_is_omap3630() with ISP revision check"
  [media]  dvb: LNA implementation changes
  [media] v4l2-ioctl: fix W=1 warnings
  [media] v4l2-ioctl: add blocks check for VIDIOC_SUBDEV_G/S_EDID
  [media] omap3isp: Fix compilation error in ispreg.h
  [media] rc-msi-digivox-ii: Add full scan keycodes
  [media] cx25821: testing the wrong variable
  [media] tda18271-common: hold the I2C adapter during write transfers
  [media] ds3000: add module parameter to force firmware upload
  [media] drivers/media: Remove unnecessary semicolon
  [media] winbond: remove space from driver name
  [media] iguanair: cannot send data from the stack
  [media] omap3isp: Replace cpu_is_omap3630() with ISP revision check
  [media] dvb-usb: print small buffers via %*ph
  [media] uvc: Add return code check at vb2_queue_init()
  [media] em28xx: Replace memcpy with struct assignment
  [media] bt8xx: Add video4linux control V4L2_CID_COLOR_KILLER
  [media] mem2mem_testdev: Use devm_kzalloc() in probe
  ...

11 years ago9P: Fix race between p9_write_work() and p9_fd_request()
Simon Derr [Mon, 17 Sep 2012 13:16:31 +0000 (15:16 +0200)]
9P: Fix race between p9_write_work() and p9_fd_request()

Race scenario:

thread A thread B

p9_write_work()                p9_fd_request()

if (list_empty
  (&m->unsent_req_list))
  ...

                               spin_lock(&client->lock);
                               req->status = REQ_STATUS_UNSENT;
                               list_add_tail(..., &m->unsent_req_list);
                               spin_unlock(&client->lock);
                               ....
                               if (n & POLLOUT &&
                               !test_and_set_bit(Wworksched, &m->wsched)
                               schedule_work(&m->wq);
                               --> not done because Wworksched is set

  clear_bit(Wworksched, &m->wsched);
  return;

--> nobody will take care of sending the new request.

This is not very likely to happen though, because p9_write_work()
being called with an empty unsent_req_list is not frequent.
But this also means that taking the lock earlier will not be costly.

Signed-off-by: Simon Derr <simon.derr@bull.net>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
11 years agoUpdate SmPL/Coccinelle section of MAINTAINERS
Nicolas Palix [Thu, 20 Sep 2012 20:52:42 +0000 (22:52 +0200)]
Update SmPL/Coccinelle section of MAINTAINERS

This patch updates some email addresses and the new
mailing list address.

Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
11 years agococcicheck: Add the rep+ctxt mode
Nicolas Palix [Thu, 20 Sep 2012 20:30:46 +0000 (22:30 +0200)]
coccicheck: Add the rep+ctxt mode

This adds a 'rep+ctxt' mode which prints the warning
message followed by the context.

Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
11 years agoscripts/coccinelle/tests/odd_ptr_err.cocci: semantic patch for IS_ERR/PTR_ERR inconsi...
Julia Lawall [Sat, 25 Aug 2012 20:42:45 +0000 (22:42 +0200)]
scripts/coccinelle/tests/odd_ptr_err.cocci: semantic patch for IS_ERR/PTR_ERR inconsistency

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
11 years agoMerge branch 'fixes' into for-linus
Russell King [Thu, 11 Oct 2012 09:55:04 +0000 (10:55 +0100)]
Merge branch 'fixes' into for-linus

Conflicts:
arch/arm/kernel/smp.c

11 years agoMerge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux
Linus Torvalds [Thu, 11 Oct 2012 01:27:51 +0000 (10:27 +0900)]
Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux

Pull i2c-embedded changes from Wolfram Sang:
 "The changes for i2c-embedded include:

   - massive rework of the omap driver
   - massive rework of the at91 driver.  In fact, the old driver gets
     removed; I am okay with this approach since the old driver was
     depending on BROKEN and its limitations made it practically
     unusable, so people used bitbanging instead.  But even if there are
     users, there is no platform_data or module parameter which would
     need to be converted.  It is just another driver doing I2C
     transfers, just way better.  Modifications of arch/arm/at91 related
     files have proper acks from the maintainer.
   - new driver for R-Car I2C
   - devicetree and generic_clock conversions and fixes
   - usual driver fixes and changes.

  The rework patches have come a long way and lots of people have been
  involved in creating/testing them.  Most patches have been in
  linux-next at least since 3.6-rc5.  A few have been added in the last
  week, I have to admit.

  An unexpected (but welcome :)) peak in private life is the cause for
  that.  The "late" patches shouldn't cause any merge conflicts and I
  will have a special eye on them during the stabilization phase.  This
  is an exception and I want to have the patches in place properly in
  time again for the next kernels."

* 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux: (44 commits)
  MXS: Implement DMA support into mxs-i2c
  i2c: add Renesas R-Car I2C driver
  i2c: s3c2410: use clk_prepare_enable and clk_disable_unprepare
  ARM: OMAP: convert I2C driver to PM QoS for MPU latency constraints
  i2c: nomadik: Add Device Tree support to the Nomadik I2C driver
  i2c: algo: pca: Fix chip reset function for PCA9665
  i2c: mpc: Wait for STOP to hit the bus
  i2c: davinci: preparation for switch to common clock framework
  omap-i2c: fix incorrect log message when using a device tree
  i2c: omap: sanitize exit path
  i2c: omap: switch over to autosuspend API
  i2c: omap: remove unnecessary pm_runtime_suspended check
  i2c: omap: switch to threaded IRQ support
  i2c: omap: remove redundant status read
  i2c: omap: get rid of the "complete" label
  i2c: omap: resize fifos before each message
  i2c: omap: simplify IRQ exit path
  i2c: omap: always return IRQ_HANDLED
  i2c: omap: simplify errata check
  i2c: omap: bus: add a receiver flag
  ...

11 years agoMerge tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Linus Torvalds [Thu, 11 Oct 2012 01:21:48 +0000 (10:21 +0900)]
Merge tag 'fixes' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "A series of fixes (and in some cases, some cleanups):

  Via Tony Lindgren:
   - A collection of OMAP regression fixes, in particular because
     firmware no longer sets up all pin states before starting the
     kernel.
   - cpufreq fixes for OMAP (Rafael is on vacation and this was
     pre-agreed).
   - A longer series of misc regression fixes and cleanups, warning
     removals, etc for OMAP

  From Arnd Bergmann:
   - A series of warning fixes for various platforms (defconfig builds)

  Misc:
   - A couple of tegra fixes, one for i.MX, some vt8500 fixes, etc."

* tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (73 commits)
  ARM: pxa: armcore: fix PCI PIO warnings
  ARM: integrator: use __iomem pointers for MMIO, part 2
  ARM: assabet: fix bogus warning in get_assabet_scr (again)
  ARM: shmobile: mark shmobile_init_late as __init
  ARM: integrator_cp: fix build failure
  ARM: OMAP4/AM335x: hwmod: fix disable_module regression in hardreset handling
  ARM: OMAP3: fix workaround for EMU clockdomain
  arm/omap: Replace board_ref_clock with enum values
  ARM: OMAP2+: remove duplicated include from board-omap3stalker.c
  arch/arm/plat-omap/omap-pm-noop.c: Remove unecessary semicolon
  arch/arm/mach-omap2: Remove unecessary semicolon
  arch/arm/mach-omap1/devices.c: Remove unecessary semicolon
  ARM/dts: omap5-evm: pinmux configuration for audio
  ARM/dts: Add pinctrl driver entries for omap5
  ARM/dts: omap4-panda: pinmux configuration for audio
  ARM/dts: omap4-sdp: pinmux configuration for audio
  ARM/dts: omap5-evm: Disable unused McBSP3
  ARM/dts: omap4-sdp: Disable unused McBSP3
  ARM/dts: omap4-panda: Disable unused audio IPs
  ARM: OMAP: board-omap4panda: Pin mux configuration for audio needs
  ...

11 years agoautofs4 - fix reset pending flag on mount fail
Ian Kent [Thu, 11 Oct 2012 00:00:33 +0000 (08:00 +0800)]
autofs4 - fix reset pending flag on mount fail

In autofs4_d_automount(), if a mount fail occurs the AUTOFS_INF_PENDING
mount pending flag is not cleared.

One effect of this is when using the "browse" option, directory entry
attributes show up with all "?"s due to the incorrect callback and
subsequent failure return (when in fact no callback should be made).

Signed-off-by: Ian Kent <ikent@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'akpm' (Fixups from Andrew)
Linus Torvalds [Thu, 11 Oct 2012 01:14:16 +0000 (10:14 +0900)]
Merge branch 'akpm' (Fixups from Andrew)

Merge misc fixes from Andrew Morton:
 "Followups, fixes and some random stuff I found on the internet."

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (11 patches)
  perf: fix duplicate header inclusion
  memcg, kmem: fix build error when CONFIG_INET is disabled
  rtc: kconfig: fix RTC_INTF defaults connected to RTC_CLASS
  rapidio: fix comment
  lib/kasprintf.c: use kmalloc_track_caller() to get accurate traces for kvasprintf
  rapidio: update for destination ID allocation
  rapidio: update asynchronous discovery initialization
  rapidio: use msleep in discovery wait
  mm: compaction: fix bit ranges in {get,clear,set}_pageblock_skip()
  arch/powerpc/platforms/pseries/hotplug-memory.c: section removal cleanups
  arch/powerpc/platforms/pseries/hotplug-memory.c: fix section handling code

11 years agorcu: Advise most users not to enable RCU user mode
Frederic Weisbecker [Wed, 10 Oct 2012 23:48:28 +0000 (01:48 +0200)]
rcu: Advise most users not to enable RCU user mode

Discourage distros from enabling CONFIG_RCU_USER_QS
because it brings overhead for no benefits yet.

It's not a useful feature on its own until we can
fully run an adaptive tickless kernel.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agogbefb: fix compile error
Florian Tobias Schandinat [Thu, 11 Oct 2012 00:15:57 +0000 (00:15 +0000)]
gbefb: fix compile error

The patch "drivers/video/gbefb.c: use devm_ functions" caused a
compile error.

drivers/video/gbefb.c:1159:16: error: implicit declaration of function
'devm_ioremap' [-Werror=implicit-function-declaration]
drivers/video/gbefb.c:1179:3: error: implicit declaration of function
'devm_ioremap_nocache' [-Werror=implicit-function-declaration]

Fix it by including linux/io.h which defines those functions.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Damien Cassou <damien.cassou@lifl.fr>
11 years agoMerge branch 'for-3.7/core' of git://git.kernel.dk/linux-block
Linus Torvalds [Thu, 11 Oct 2012 00:04:23 +0000 (09:04 +0900)]
Merge branch 'for-3.7/core' of git://git.kernel.dk/linux-block

Pull block IO update from Jens Axboe:
 "Core block IO bits for 3.7.  Not a huge round this time, it contains:

   - First series from Kent cleaning up and generalizing bio allocation
     and freeing.

   - WRITE_SAME support from Martin.

   - Mikulas patches to prevent O_DIRECT crashes when someone changes
     the block size of a device.

   - Make bio_split() work on data-less bio's (like trim/discards).

   - A few other minor fixups."

Fixed up silent semantic mis-merge as per Mikulas Patocka and Andrew
Morton.  It is due to the VM no longer using a prio-tree (see commit
6b2dbba8b6ac: "mm: replace vma prio_tree with an interval tree").

So make set_blocksize() use mapping_mapped() instead of open-coding the
internal VM knowledge that has changed.

* 'for-3.7/core' of git://git.kernel.dk/linux-block: (26 commits)
  block: makes bio_split support bio without data
  scatterlist: refactor the sg_nents
  scatterlist: add sg_nents
  fs: fix include/percpu-rwsem.h export error
  percpu-rw-semaphore: fix documentation typos
  fs/block_dev.c:1644:5: sparse: symbol 'blkdev_mmap' was not declared
  blockdev: turn a rw semaphore into a percpu rw semaphore
  Fix a crash when block device is read and block size is changed at the same time
  block: fix request_queue->flags initialization
  block: lift the initial queue bypass mode on blk_register_queue() instead of blk_init_allocated_queue()
  block: ioctl to zero block ranges
  block: Make blkdev_issue_zeroout use WRITE SAME
  block: Implement support for WRITE SAME
  block: Consolidate command flag and queue limit checks for merges
  block: Clean up special command handling logic
  block/blk-tag.c: Remove useless kfree
  block: remove the duplicated setting for congestion_threshold
  block: reject invalid queue attribute values
  block: Add bio_clone_bioset(), bio_clone_kmalloc()
  block: Consolidate bio_alloc_bioset(), bio_kmalloc()
  ...

11 years agoMerge tag 'firewire-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Wed, 10 Oct 2012 23:52:04 +0000 (08:52 +0900)]
Merge tag 'firewire-fix' of git://git./linux/kernel/git/ieee1394/linux1394

Pull a firewire fix from Stefan Richter:
 "Fixes an old bug of the /dev/fw* ioctl ABI."

* tag 'firewire-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
  firewire: cdev: fix user memory corruption (i386 userland on amd64 kernel)

11 years agoMerge tag 'vfio-for-v3.7-rc1' of git://github.com/awilliam/linux-vfio
Linus Torvalds [Wed, 10 Oct 2012 23:50:56 +0000 (08:50 +0900)]
Merge tag 'vfio-for-v3.7-rc1' of git://github.com/awilliam/linux-vfio

Pull vfio fixes from Alex Williamson:
 "This includes a fix for PCI BAR mmaps after recent mm changes, fixing
  an interrupt race, and fixing a consistency bug in interrupt state
  when switching interrupt modes."

* tag 'vfio-for-v3.7-rc1' of git://github.com/awilliam/linux-vfio:
  vfio: Fix PCI INTx disable consistency
  vfio: Move PCI INTx eventfd setting earlier
  vfio: Fix PCI mmap after b3b9c293

11 years agoperf: fix duplicate header inclusion
Michel Lespinasse [Wed, 10 Oct 2012 22:54:11 +0000 (15:54 -0700)]
perf: fix duplicate header inclusion

#include <stdbool.h> somehow got duplicated on its way to linus's tree
(probably as a conflict resolution as things got sent through multiple
trees)

Signed-off-by: Michel Lespinasse <walken@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agomemcg, kmem: fix build error when CONFIG_INET is disabled
David Rientjes [Wed, 10 Oct 2012 22:54:08 +0000 (15:54 -0700)]
memcg, kmem: fix build error when CONFIG_INET is disabled

Commit e1aab161e013 ("socket: initial cgroup code.") causes a build
error when CONFIG_INET is disabled in Linus' tree:

  net/built-in.o: In function `sk_update_clone':
  net/core/sock.c:1336: undefined reference to `sock_update_memcg'

sock_update_memcg() is only defined when CONFIG_INET is enabled, so fix
it by defining the dummy function without this option.

Signed-off-by: David Rientjes <rientjes@google.com>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Glauber Costa <glommer@parallels.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agortc: kconfig: fix RTC_INTF defaults connected to RTC_CLASS
Kevin Hilman [Wed, 10 Oct 2012 22:54:06 +0000 (15:54 -0700)]
rtc: kconfig: fix RTC_INTF defaults connected to RTC_CLASS

Commit 6b8029fab641 ("rtc: kconfig: remove unnecessary dependencies")
removed various 'depends on RTC_CLASS' dependencies but also removed a
few 'default RTC_CLASS' statements, which actually changed default
behavior.

This resulted in the various RTC interfaces (sysfs, proc, dev) all being
disabled by default, even when RTC_CLASS is enabled:

   # CONFIG_RTC_INTF_SYSFS is not set
   # CONFIG_RTC_INTF_PROC is not set
   # CONFIG_RTC_INTF_DEV is not set

which is different from previous behavior (all of these where enabled.)

To fix, add back the 'default RTC_CLASS' statments to each of the
RTC_INTF_* options.

I noticed this because some RTC tests started failing on my TI OMAP
platforms because /dev/rtc0 was not present anymore, even though the
driver was present and RTC_CLASS was enabled.

Signed-off-by: Kevin Hilman <khilman@ti.com>
Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agorapidio: fix comment
Chad Reese [Wed, 10 Oct 2012 22:54:05 +0000 (15:54 -0700)]
rapidio: fix comment

The resource index for the mailboxes was incorrect.

Signed-off-by: Chad Reese <kreese@caviumnetworks.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>
11 years agolib/kasprintf.c: use kmalloc_track_caller() to get accurate traces for kvasprintf
Ezequiel Garcia [Wed, 10 Oct 2012 22:54:04 +0000 (15:54 -0700)]
lib/kasprintf.c: use kmalloc_track_caller() to get accurate traces for kvasprintf

Previously kvasprintf() allocation was being done through kmalloc(),
thus producing an inaccurate trace report.

This is a common problem: in order to get accurate callsite tracing, a
lib/utils function shouldn't allocate kmalloc but instead use
kmalloc_track_caller.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agorapidio: update for destination ID allocation
Alexandre Bounine [Wed, 10 Oct 2012 22:54:01 +0000 (15:54 -0700)]
rapidio: update for destination ID allocation

Address comments provided by Andrew Morton:
https://lkml.org/lkml/2012/10/3/550

 - Keeps consistent kerneldoc compatible comments style for new static
   functions.
 - Removes unnecessary complexity from destination ID allocation
   routine.
 - Uses kcalloc() for code clarity.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
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>
11 years agorapidio: update asynchronous discovery initialization
Alexandre Bounine [Wed, 10 Oct 2012 22:53:59 +0000 (15:53 -0700)]
rapidio: update asynchronous discovery initialization

Update discovery process initialization based on Andrew Morton's comments:
https://lkml.org/lkml/2012/10/3/552.

This update processes all enumerating mports first and schedules discovery
work after that. If the initialization routine fails to allocate resources
needed to execute discovery, it abandons discovery for all ports.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
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>
11 years agorapidio: use msleep in discovery wait
Alexandre Bounine [Wed, 10 Oct 2012 22:53:58 +0000 (15:53 -0700)]
rapidio: use msleep in discovery wait

Use msleep() for code clarity as suggested by Andrew Morton in his
comments for the original patch: https://lkml.org/lkml/2012/10/3/546.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
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>
11 years agomm: compaction: fix bit ranges in {get,clear,set}_pageblock_skip()
Bartlomiej Zolnierkiewicz [Wed, 10 Oct 2012 22:53:55 +0000 (15:53 -0700)]
mm: compaction: fix bit ranges in {get,clear,set}_pageblock_skip()

{get,clear,set}_pageblock_skip() use incorrect bit ranges (please compare
to bit ranges used by {get,set}_pageblock_flags() used for migration
types) and can overwrite pageblock migratetype of the next pageblock in
the bitmap.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoarch/powerpc/platforms/pseries/hotplug-memory.c: section removal cleanups
Yasuaki Ishimatsu [Wed, 10 Oct 2012 22:53:53 +0000 (15:53 -0700)]
arch/powerpc/platforms/pseries/hotplug-memory.c: section removal cleanups

Followups to d760afd4d257 ("memory-hotplug: suppress "Trying to free
nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning").

 - use unsigned long type, as overflows are conceivable

 - rename `i' to the less-misleading and more informative `section'

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoarch/powerpc/platforms/pseries/hotplug-memory.c: fix section handling code
Andrew Morton [Wed, 10 Oct 2012 22:53:52 +0000 (15:53 -0700)]
arch/powerpc/platforms/pseries/hotplug-memory.c: fix section handling code

Fix

  arch/powerpc/platforms/pseries/hotplug-memory.c: In function 'pseries_remove_memblock':
  arch/powerpc/platforms/pseries/hotplug-memory.c:103:17: error: unused variable 'pfn' [-Werror=unused-variable]

Caused by commit d760afd4d257 ("memory-hotplug: suppress "Trying to free
nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning").

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Wed, 10 Oct 2012 23:49:18 +0000 (08:49 +0900)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/jdelvare/staging

Pull hwmon updates from Jean Delvare:
 "Only trivial things this time"

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: Drop needless includes of <linux/delay.h>
  hwmon: Add missing inclusions of <linux/err.h>
  hwmon: Add missing inclusions of <linux/jiffies.h>
  hwmon: Fix spelling of Celsius
  hwmon: Update Alexey Fisher's name

11 years agoALSA: hda - do not detect jack on internal speakers for Realtek
David Henningsson [Wed, 10 Oct 2012 14:32:09 +0000 (16:32 +0200)]
ALSA: hda - do not detect jack on internal speakers for Realtek

This caused the internal speaker to mute itself because it was
present, which happened after powersave.
It was found on Dell XPS 15 (L502x), ALC665.

Reported-by: Da Fox <da.fox.mail@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agovfio: Fix PCI INTx disable consistency
Alex Williamson [Wed, 10 Oct 2012 15:10:32 +0000 (09:10 -0600)]
vfio: Fix PCI INTx disable consistency

The virq_disabled flag tracks the userspace view of INTx masking
across interrupt mode changes, but we're not consistently applying
this to the interrupt and masking handler notion of the device.
Currently if the user sets DisINTx while in MSI or MSIX mode, then
returns to INTx mode (ex. rebooting a qemu guest), the hardware has
DisINTx+, but the management of INTx thinks it's enabled, making it
impossible to actually clear DisINTx.  Fix this by updating the
handler state when INTx is re-enabled.

Cc: stable@vger.kernel.org
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agovfio: Move PCI INTx eventfd setting earlier
Alex Williamson [Wed, 10 Oct 2012 15:10:32 +0000 (09:10 -0600)]
vfio: Move PCI INTx eventfd setting earlier

We need to be ready to recieve an interrupt as soon as we call
request_irq, so our eventfd context setting needs to be moved
earlier.  Without this, an interrupt from our device or one
sharing the interrupt line can pass a NULL into eventfd_signal
and oops.

Cc: stable@vger.kernel.org
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agovfio: Fix PCI mmap after b3b9c293
Alex Williamson [Wed, 10 Oct 2012 15:10:31 +0000 (09:10 -0600)]
vfio: Fix PCI mmap after b3b9c293

Our mmap path mistakely relied on vma->vm_pgoff to get set in
remap_pfn_range.  After b3b9c293, that path only applies to
copy-on-write mappings.  Set it in our own code.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agoMerge tag 'nfs-for-3.7-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Wed, 10 Oct 2012 14:52:35 +0000 (23:52 +0900)]
Merge tag 'nfs-for-3.7-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client updates from Trond Myklebust:
 "Features include:

   - Remove CONFIG_EXPERIMENTAL dependency from NFSv4.1
     Aside from the issues discussed at the LKS, distros are shipping
     NFSv4.1 with all the trimmings.
   - Fix fdatasync()/fsync() for the corner case of a server reboot.
   - NFSv4 OPEN access fix: finally distinguish correctly between
     open-for-read and open-for-execute permissions in all situations.
   - Ensure that the TCP socket is closed when we're in CLOSE_WAIT
   - More idmapper bugfixes
   - Lots of pNFS bugfixes and cleanups to remove unnecessary state and
     make the code easier to read.
   - In cases where a pNFS read or write fails, allow the client to
     resume trying layoutgets after two minutes of read/write-
     through-mds.
   - More net namespace fixes to the NFSv4 callback code.
   - More net namespace fixes to the NFSv3 locking code.
   - More NFSv4 migration preparatory patches.
     Including patches to detect network trunking in both NFSv4 and
     NFSv4.1
   - pNFS block updates to optimise LAYOUTGET calls."

* tag 'nfs-for-3.7-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (113 commits)
  pnfsblock: cleanup nfs4_blkdev_get
  NFS41: send real read size in layoutget
  NFS41: send real write size in layoutget
  NFS: track direct IO left bytes
  NFSv4.1: Cleanup ugliness in pnfs_layoutgets_blocked()
  NFSv4.1: Ensure that the layout sequence id stays 'close' to the current
  NFSv4.1: Deal with seqid wraparound in the pNFS return-on-close code
  NFSv4 set open access operation call flag in nfs4_init_opendata_res
  NFSv4.1: Remove the dependency on CONFIG_EXPERIMENTAL
  NFSv4 reduce attribute requests for open reclaim
  NFSv4: nfs4_open_done first must check that GETATTR decoded a file type
  NFSv4.1: Deal with wraparound when updating the layout "barrier" seqid
  NFSv4.1: Deal with wraparound issues when updating the layout stateid
  NFSv4.1: Always set the layout stateid if this is the first layoutget
  NFSv4.1: Fix another refcount issue in pnfs_find_alloc_layout
  NFSv4: don't put ACCESS in OPEN compound if O_EXCL
  NFSv4: don't check MAY_WRITE access bit in OPEN
  NFS: Set key construction data for the legacy upcall
  NFSv4.1: don't do two EXCHANGE_IDs on mount
  NFS: nfs41_walk_client_list(): re-lock before iterating
  ...

11 years agohwmon: Drop needless includes of <linux/delay.h>
Jean Delvare [Wed, 10 Oct 2012 13:25:57 +0000 (15:25 +0200)]
hwmon: Drop needless includes of <linux/delay.h>

These drivers use no sleep or delay functions so they don't need to
include <linux/delay.h>.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Cc: Rudolf Marek <r.marek@assembler.cz>
11 years agohwmon: Add missing inclusions of <linux/err.h>
Jean Delvare [Wed, 10 Oct 2012 13:25:56 +0000 (15:25 +0200)]
hwmon: Add missing inclusions of <linux/err.h>

These drivers use IS_ERR so they should include <linux/err.h>.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Luca Tettamanti <kronos.it@gmail.com>
Cc: Henrik Rydberg <rydberg@euromail.se>
11 years agohwmon: Add missing inclusions of <linux/jiffies.h>
Jean Delvare [Wed, 10 Oct 2012 13:25:56 +0000 (15:25 +0200)]
hwmon: Add missing inclusions of <linux/jiffies.h>

Many hwmon drivers use jiffies but omit the inclusion of the header
file. Fix that, and also fix one driver which was including the header
file but didn't need it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Luca Tettamanti <kronos.it@gmail.com>
Cc: Marc Hulsman <m.hulsman@tudelft.nl>
Cc: Rudolf Marek <r.marek@assembler.cz>
11 years agohwmon: Fix spelling of Celsius
Peter Meerwald [Wed, 10 Oct 2012 13:25:56 +0000 (15:25 +0200)]
hwmon: Fix spelling of Celsius

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
11 years agohwmon: Update Alexey Fisher's name
Oleksij Rempel [Wed, 10 Oct 2012 13:25:56 +0000 (15:25 +0200)]
hwmon: Update Alexey Fisher's name

My name was change after migration.

Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
11 years agoALSA: hda - Fix missing beep on ASUS X43U notebook
Duncan Roe [Wed, 10 Oct 2012 12:19:50 +0000 (14:19 +0200)]
ALSA: hda - Fix missing beep on ASUS X43U notebook

Signed-off-by: Duncan Roe <duncan_roe@acslink.net.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years ago[media] m5mols: Add missing #include <linux/sizes.h>
Sylwester Nawrocki [Sat, 6 Oct 2012 18:04:40 +0000 (15:04 -0300)]
[media] m5mols: Add missing #include <linux/sizes.h>

Include <linux/sizes.h> header that is missing after commit ab7ef22419927
"[media] m5mols: Implement .get_frame_desc subdev callback".
It prevents possible build errors due to undefined SZ_1M.

This header is currently included only when m5mols is compiled
on arm; if build on other archs, the compilation will break.

Reported-by: Jan Hoogenraad <jan-conceptronic@hoogenraad.net>
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoMerge tag 'for-3.7-rc1' of git://gitorious.org/linux-pwm/linux-pwm
Linus Torvalds [Wed, 10 Oct 2012 11:15:24 +0000 (20:15 +0900)]
Merge tag 'for-3.7-rc1' of git://gitorious.org/linux-pwm/linux-pwm

Pull pwm changes from Thierry Reding:
 "All legacy PWM providers have now been moved to the PWM subsystem.
  The plan for 3.8 is to adapt all board files to provide a lookup table
  for PWM devices in order to get rid of the global namespace.
  Subsequently, users of the legacy pwm_request() and pwm_free()
  functions can be migrated to the new pwm_get() and pwm_put()
  functions.  Once this has been completed, the legacy API and the
  compatibility code in the core can be removed.

  In addition to the above, these changes also add support for
  configuring the polarity of a PWM signal (currently only supported on
  ECAP and EHRPWM) and include a much needed rework of the i.MX driver.
  Managed functions to obtain and release a PWM device (devm_pwm_get()
  and devm_pwm_put()) have been added and the pwm-backlight driver has
  been updated to use them.  If the PWM subsystem hasn't been enabled,
  dummy functions are provided that allow the subsystem to safely
  compile out.

  Some common checks on input parameters have been moved to the core and
  removed from the drivers.  Finally, a small fix corrects the
  description of the PWM specifier's second cell in the device tree
  representation."

* tag 'for-3.7-rc1' of git://gitorious.org/linux-pwm/linux-pwm: (23 commits)
  pwm: dt: Fix description of second PWM cell
  pwm: Check for negative duty-cycle and period
  pwm: Add Ingenic JZ4740 support
  MIPS: JZ4740: Export timer API
  pwm: Move PUV3 PWM driver to PWM framework
  unicore32: pwm: Use managed resource allocations
  unicore32: pwm: Remove unnecessary indirection
  unicore32: pwm: Use module_platform_driver()
  unicore32: pwm: Properly remap memory-mapped registers
  pwm-backlight: Use devm_pwm_get() instead of pwm_get()
  pwm: Move AB8500 PWM driver to PWM framework
  pwm: Fix compilation error when CONFIG_PWM is not defined
  pwm: i.MX: fix clock lookup
  pwm: i.MX: use per clock unconditionally
  pwm: i.MX: add devicetree support
  pwm: i.MX: Use module_platform_driver
  pwm: i.MX: add functions to enable/disable pwm.
  pwm: i.MX: remove unnecessary if in pwm_[en|dis]able
  pwm: i.MX: factor out SoC specific functions
  pwm: pwm-tiehrpwm: Add support for configuring polarity of PWM
  ...

11 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Wed, 10 Oct 2012 11:14:07 +0000 (20:14 +0900)]
Merge branch 'for-next' of git://git./linux/kernel/git/cooloney/linux-leds

Pull LED subsystem update from Bryan Wu.

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (24 commits)
  leds: add output driver configuration for pca9633 led driver
  leds: lm3642: Use regmap_update_bits() in lm3642_chip_init()
  leds: Add new LED driver for lm3642 chips
  leds-lp5523: Fix riskiness of the page fault
  leds-lp5523: turn off the LED engines on unloading the driver
  leds-lm3530: Fix smatch warnings
  leds-lm3530: Use devm_regulator_get function
  leds: leds-gpio: adopt pinctrl support
  leds: Add new LED driver for lm355x chips
  leds-lp5523: use the i2c device id rather than fixed name
  leds-lp5523: add new device id for LP55231
  leds-lp5523: support new LP55231 device
  leds: triggers: send uevent when changing triggers
  leds-lp5523: minor code style fixes
  leds-lp5523: change the return type of lp5523_set_mode()
  leds-lp5523: set the brightness to 0 forcely on removing the driver
  leds-lp5523: add channel name in the platform data
  leds: leds-gpio: Use of_get_child_count() helper
  leds: leds-gpio: Use platform_{get,set}_drvdata
  leds: leds-gpio: use of_match_ptr()
  ...

11 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
Linus Torvalds [Wed, 10 Oct 2012 10:52:19 +0000 (19:52 +0900)]
Merge branch 'for-next' of git://git./linux/kernel/git/nab/target-pending

Pull scsi target updates from Nicholas Bellinger:
 "Things have been calm for the most part with no new fabric drivers in
  flight for v3.7 (we're up to eight now !), so this update is primarily
  focused on addressing a few long-standing items within target-core and
  iscsi-target fabric code.

  The highlights include:

   - target: Simplify fabric sense data length handling (roland)
   - qla2xxx: Fix endianness of task management response code (roland)
   - target: fix truncation of mode data, support zero allocation length
     (paolo)
   - target: Properly support zero-length commands in normal processing
     path (paolo)
   - iscsi-target: Correctly set 0xffffffff field within ISCSI_OP_REJECT
     PDU (ronnie + nab)
   - iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG
     demo-mode (ronnie + nab)
   - target/file: Re-enable optional fd_buffered_io=1 operation (nab +
     hch)
   - iscsi-target: Add MaxXmitDataSegmenthLength forr target ->
     initiator MDRSL declaration (nab)
   - target: Add target_submit_cmd_map_sgls for SGL fabric memory
     passthrough (nab + hch)
   - tcm_loop: Convert I/O path to use target_submit_cmd_map_sgls (hch +
     nab)
   - tcm_vhost: Convert I/O path to use target_submit_cmd_map_sgls (nab
     + hch)

  The last series for adding a new target_submit_cmd_map_sgls() fabric
  caller (as requested by hch) that accepts pre-allocated SGL memory
  (using existing logic), along with converting tcm_loop + tcm_vhost has
  only been in -next for the last days, but has gotten enough review
  +testing and is clear enough a mechanical change that I think it's
  reasonable to merge for -rc1 code.

  Thanks again to everyone who contributed this round! Extra special
  thanks to Roland (PureStorage) for tracking down the qla2xxx target
  TMR response code endian issue, and to Paolo (Redhat) for resolving
  the long standing zero-length CDB issues within target-core between
  virtual and pSCSI backends."

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (44 commits)
  iscsi-target: Bump defaults for nopin_timeout + nopin_response_timeout values
  iscsit: proper endianess conversions
  iscsit: use the itt_t abstract type
  iscsit: add missing endianess conversion in iscsit_check_inaddr_any
  iscsit: remove incorrect unlock in iscsit_build_sendtargets_resp
  iscsit: mark various functions static
  target/iscsi: precedence bug in iscsit_set_dataout_sequence_values()
  target/usb-gadget: strlen() doesn't count the terminator
  target/usb-gadget: remove duplicate initialization
  tcm_vhost: Convert I/O path to use target_submit_cmd_map_sgls
  target: Add control CDB READ payload zero work-around
  tcm_loop: Convert I/O path to use target_submit_cmd_map_sgls
  target: Add target_submit_cmd_map_sgls for SGL fabric memory passthrough
  iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode
  iscsi-target: Change iscsi_target_seq_pdu_list.c to honor MaxXmitDataSegmentLength
  iscsi-target: Add MaxXmitDataSegmentLength connection recovery check
  iscsi-target: Convert incoming PDU payload checks to MaxXmitDataSegmentLength
  iscsi-target: Enable MaxXmitDataSegmentLength operation in login path
  iscsi-target: Add base MaxXmitDataSegmentLength code
  target/file: Re-enable optional fd_buffered_io=1 operation
  ...

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Wed, 10 Oct 2012 10:48:33 +0000 (19:48 +0900)]
Merge branch 'for-linus' of git://git./linux/kernel/git/s390/linux

Pull second s390 update from Martin Schwidefsky:
 "The big thing in this pull request is the UAPI patch from David, and
  worth mentioning is the page table dumper.  The rest are small
  improvements and bug fixes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/entry: fix svc number for TIF_SYSCALL system call restart
  s390/mm,vmem: fix vmem_add_mem()/vmem_remove_range()
  s390/vmalloc: have separate modules area
  s390/zcrypt: remove duplicated include from zcrypt_pcixcc.c
  s390/css_chars: remove superfluous ifdef
  s390/chsc: make headers usable
  s390/mm: let kernel text section always begin at 1MB
  s390/mm: fix mapping of read-only kernel text section
  s390/mm: add page table dumper
  s390: add support to start the kernel in 64 bit mode.
  s390/mm,pageattr: remove superfluous EXPORT_SYMBOLs
  s390/mm,pageattr: add more page table walk sanity checks
  s390/mm: fix pmd_huge() usage for kernel mapping
  s390/dcssblk: cleanup device attribute usage
  s390/mm: use pfmf instruction to initialize storage keys
  s390/facilities: cleanup PFMF and HPAGE machine facility detection
  UAPI: (Scripted) Disintegrate arch/s390/include/asm

11 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Wed, 10 Oct 2012 10:47:12 +0000 (19:47 +0900)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull nouveau drm fixes from Dave Airlie:
 "Just a bunch of nouveau fixes, Ben wants to get some alternate
  versions into stable."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/nouveau/timer: bump ptimer's alarm delay from u32 to u64
  drm/nouveau/fan: fix a typo in PWM's input clock calculation
  drm/nv50/clk: wire up pll_calc hook
  drm/nouveau: remove unused _nouveau_parent_ctor
  drm/nouveau/bios: fix shadowing of ACPI ROMs larger than 64KiB

11 years agoALSA: hda - Remove AZX_DCAPS_POSFIX_COMBO
Takashi Iwai [Wed, 10 Oct 2012 07:12:01 +0000 (09:12 +0200)]
ALSA: hda - Remove AZX_DCAPS_POSFIX_COMBO

It turned out that the COMBO position fix mode is rather more harmful,
and it got reverted (with the replacement of runtime->delay
calculation) recently.  Hence we can get rid of AZX_DCAPS_POSFIX_COMBO
as well.

It's still possible to pass this mode via position_fix module option,
in case where this really helps on weird machines (who knows).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Warn an allocation for an uninitialized array
Takashi Iwai [Wed, 10 Oct 2012 06:59:14 +0000 (08:59 +0200)]
ALSA: hda - Warn an allocation for an uninitialized array

Better to add a sanity check as I tend to forget something (especially
during crazy midsummer nights).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda/cirrus - Add missing init/free of hda_gen_spec
Takashi Iwai [Wed, 10 Oct 2012 06:53:06 +0000 (08:53 +0200)]
ALSA: hda/cirrus - Add missing init/free of hda_gen_spec

In the transition to the generic fixup code, the call of
snd_hda_gen_init() and snd_hda_gen_free() was missing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Fix memory leaks at error path in patch_cirrus.c
Takashi Iwai [Wed, 10 Oct 2012 06:50:35 +0000 (08:50 +0200)]
ALSA: hda - Fix memory leaks at error path in patch_cirrus.c

The proper destructor should be called at the error path.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Add missing hda_gen_spec to struct via_spec
Takashi Iwai [Wed, 10 Oct 2012 06:41:42 +0000 (08:41 +0200)]
ALSA: hda - Add missing hda_gen_spec to struct via_spec

The commit [4b527b65 ALSA: hda - limit internal mic boost for Asus
X202E] introduced the use of auto-parser code, but it forgot to add
struct hda_gen_spec at the head of codec->spec which the auto-parser
assumes silently.  Without this record, it may result in memory
corruption.

This patch adds the missing piece.

Cc: <stable@vger.kernel.org> [v3.5+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agopinctrl/nomadik: use simple or linear IRQ domain
Linus Walleij [Wed, 26 Sep 2012 17:03:51 +0000 (19:03 +0200)]
pinctrl/nomadik: use simple or linear IRQ domain

This alters the Nomadik pinctrl driver to:

- Call irqdomain_add_linear() for the DT case so we get
  all independent from IRQ numbers in this case.
- Call irqdomain_add_simple() for the legacy case, which
  allocates the IRQ descriptors for the Nomadik pin controller
  dynamically.

Cc: Lee Jones <lee.jones@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoirqdomain: augment add_simple() to allocate descs
Linus Walleij [Thu, 27 Sep 2012 12:59:39 +0000 (14:59 +0200)]
irqdomain: augment add_simple() to allocate descs

Currently we rely on all IRQ chip instances to dynamically
allocate their IRQ descriptors unless they use the linear
IRQ domain. So for irqdomain_add_legacy() and
irqdomain_add_simple() the caller need to make sure that
descriptors are allocated.

Let's slightly augment the yet unused irqdomain_add_simple()
to also allocate descriptors as a means to simplify usage
and avoid code duplication throughout the kernel.

We warn if descriptors cannot be allocated, e.g. if a
platform has the bad habit of hogging descriptors at boot
time.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl/nomadik: support other alternate-C functions
Jean-Nicolas Graux [Thu, 27 Sep 2012 13:38:50 +0000 (15:38 +0200)]
pinctrl/nomadik: support other alternate-C functions

Upgrade nomadik pinctrl driver to enable selection of other
alternate-C[1-4] functions on some specific ux500 SoC pins.
Handling of those functions is done thanks to PRCM GPIOCR
registers. This was previously managed in PRCMU driver and
it was not really convenient. Idea is to provide a common
way to control all alternate functions.

Note that this improvement does not support the old-fashioned way
used to control nomadik pins, namely the "nmk_config_pin()" function
and its derivatives.

Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@stericsson.com>
Reviewed-by: Philippe Langlais <philippe.langlais@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agomm, slab: release slab_mutex earlier in kmem_cache_destroy()
Jiri Kosina [Mon, 8 Oct 2012 07:26:01 +0000 (09:26 +0200)]
mm, slab: release slab_mutex earlier in kmem_cache_destroy()

Commit 1331e7a1bbe1 ("rcu: Remove _rcu_barrier() dependency on
__stop_machine()") introduced slab_mutex -> cpu_hotplug.lock dependency
through kmem_cache_destroy() -> rcu_barrier() -> _rcu_barrier() ->
get_online_cpus().

Lockdep thinks that this might actually result in ABBA deadlock,
and reports it as below:

=== [ cut here ] ===
 ======================================================
 [ INFO: possible circular locking dependency detected ]
 3.6.0-rc5-00004-g0d8ee37 #143 Not tainted
 -------------------------------------------------------
 kworker/u:2/40 is trying to acquire lock:
  (rcu_sched_state.barrier_mutex){+.+...}, at: [<ffffffff810f2126>] _rcu_barrier+0x26/0x1e0

 but task is already holding lock:
  (slab_mutex){+.+.+.}, at: [<ffffffff81176e15>] kmem_cache_destroy+0x45/0xe0

 which lock already depends on the new lock.

 the existing dependency chain (in reverse order) is:

 -> #2 (slab_mutex){+.+.+.}:
        [<ffffffff810ae1e2>] validate_chain+0x632/0x720
        [<ffffffff810ae5d9>] __lock_acquire+0x309/0x530
        [<ffffffff810ae921>] lock_acquire+0x121/0x190
        [<ffffffff8155d4cc>] __mutex_lock_common+0x5c/0x450
        [<ffffffff8155d9ee>] mutex_lock_nested+0x3e/0x50
        [<ffffffff81558cb5>] cpuup_callback+0x2f/0xbe
        [<ffffffff81564b83>] notifier_call_chain+0x93/0x140
        [<ffffffff81076f89>] __raw_notifier_call_chain+0x9/0x10
        [<ffffffff8155719d>] _cpu_up+0xba/0x14e
        [<ffffffff815572ed>] cpu_up+0xbc/0x117
        [<ffffffff81ae05e3>] smp_init+0x6b/0x9f
        [<ffffffff81ac47d6>] kernel_init+0x147/0x1dc
        [<ffffffff8156ab44>] kernel_thread_helper+0x4/0x10

 -> #1 (cpu_hotplug.lock){+.+.+.}:
        [<ffffffff810ae1e2>] validate_chain+0x632/0x720
        [<ffffffff810ae5d9>] __lock_acquire+0x309/0x530
        [<ffffffff810ae921>] lock_acquire+0x121/0x190
        [<ffffffff8155d4cc>] __mutex_lock_common+0x5c/0x450
        [<ffffffff8155d9ee>] mutex_lock_nested+0x3e/0x50
        [<ffffffff81049197>] get_online_cpus+0x37/0x50
        [<ffffffff810f21bb>] _rcu_barrier+0xbb/0x1e0
        [<ffffffff810f22f0>] rcu_barrier_sched+0x10/0x20
        [<ffffffff810f2309>] rcu_barrier+0x9/0x10
        [<ffffffff8118c129>] deactivate_locked_super+0x49/0x90
        [<ffffffff8118cc01>] deactivate_super+0x61/0x70
        [<ffffffff811aaaa7>] mntput_no_expire+0x127/0x180
        [<ffffffff811ab49e>] sys_umount+0x6e/0xd0
        [<ffffffff81569979>] system_call_fastpath+0x16/0x1b

 -> #0 (rcu_sched_state.barrier_mutex){+.+...}:
        [<ffffffff810adb4e>] check_prev_add+0x3de/0x440
        [<ffffffff810ae1e2>] validate_chain+0x632/0x720
        [<ffffffff810ae5d9>] __lock_acquire+0x309/0x530
        [<ffffffff810ae921>] lock_acquire+0x121/0x190
        [<ffffffff8155d4cc>] __mutex_lock_common+0x5c/0x450
        [<ffffffff8155d9ee>] mutex_lock_nested+0x3e/0x50
        [<ffffffff810f2126>] _rcu_barrier+0x26/0x1e0
        [<ffffffff810f22f0>] rcu_barrier_sched+0x10/0x20
        [<ffffffff810f2309>] rcu_barrier+0x9/0x10
        [<ffffffff81176ea1>] kmem_cache_destroy+0xd1/0xe0
        [<ffffffffa04c3154>] nf_conntrack_cleanup_net+0xe4/0x110 [nf_conntrack]
        [<ffffffffa04c31aa>] nf_conntrack_cleanup+0x2a/0x70 [nf_conntrack]
        [<ffffffffa04c42ce>] nf_conntrack_net_exit+0x5e/0x80 [nf_conntrack]
        [<ffffffff81454b79>] ops_exit_list+0x39/0x60
        [<ffffffff814551ab>] cleanup_net+0xfb/0x1b0
        [<ffffffff8106917b>] process_one_work+0x26b/0x4c0
        [<ffffffff81069f3e>] worker_thread+0x12e/0x320
        [<ffffffff8106f73e>] kthread+0x9e/0xb0
        [<ffffffff8156ab44>] kernel_thread_helper+0x4/0x10

 other info that might help us debug this:

 Chain exists of:
   rcu_sched_state.barrier_mutex --> cpu_hotplug.lock --> slab_mutex

  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(slab_mutex);
                                lock(cpu_hotplug.lock);
                                lock(slab_mutex);
   lock(rcu_sched_state.barrier_mutex);

  *** DEADLOCK ***
=== [ cut here ] ===

This is actually a false positive. Lockdep has no way of knowing the fact
that the ABBA can actually never happen, because of special semantics of
cpu_hotplug.refcount and its handling in cpu_hotplug_begin(); the mutual
exclusion there is not achieved through mutex, but through
cpu_hotplug.refcount.

The "neither cpu_up() nor cpu_down() will proceed past cpu_hotplug_begin()
until everyone who called get_online_cpus() will call put_online_cpus()"
semantics is totally invisible to lockdep.

This patch therefore moves the unlock of slab_mutex so that rcu_barrier()
is being called with it unlocked. It has two advantages:

- it slightly reduces hold time of slab_mutex; as it's used to protect
  the cachep list, it's not necessary to hold it over kmem_cache_free()
  call any more
- it silences the lockdep false positive warning, as it avoids lockdep ever
  learning about slab_mutex -> cpu_hotplug.lock dependency

Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
11 years agolglock: add DEFINE_STATIC_LGLOCK()
Lai Jiangshan [Tue, 9 Oct 2012 21:49:54 +0000 (14:49 -0700)]
lglock: add DEFINE_STATIC_LGLOCK()

When the lglock doesn't need to be exported we can use
DEFINE_STATIC_LGLOCK().

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agolglock: make the per_cpu locks static
Lai Jiangshan [Tue, 9 Oct 2012 21:49:51 +0000 (14:49 -0700)]
lglock: make the per_cpu locks static

The per_cpu locks are not used outside the file which contains the
DEFINE_LGLOCK(), so we can make these symbols static.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agolglock: remove unused DEFINE_LGLOCK_LOCKDEP()
Lai Jiangshan [Tue, 9 Oct 2012 21:49:47 +0000 (14:49 -0700)]
lglock: remove unused DEFINE_LGLOCK_LOCKDEP()

struct lglocks use their own lock_key/lock_dep_map which are defined in
struct lglock.  DEFINE_LGLOCK_LOCKDEP() is unused, so remove it and save a
small piece of memory.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agoMAX_LFS_FILESIZE definition for 64bit needs LL...
Al Viro [Wed, 10 Oct 2012 05:06:20 +0000 (01:06 -0400)]
MAX_LFS_FILESIZE definition for 64bit needs LL...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agotmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking
Hugh Dickins [Mon, 8 Oct 2012 03:32:51 +0000 (20:32 -0700)]
tmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking

Fuzzing with trinity oopsed on the 1st instruction of shmem_fh_to_dentry(),
u64 inum = fid->raw[2];
which is unhelpfully reported as at the end of shmem_alloc_inode():

BUG: unable to handle kernel paging request at ffff880061cd3000
IP: [<ffffffff812190d0>] shmem_alloc_inode+0x40/0x40
Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
Call Trace:
 [<ffffffff81488649>] ? exportfs_decode_fh+0x79/0x2d0
 [<ffffffff812d77c3>] do_handle_open+0x163/0x2c0
 [<ffffffff812d792c>] sys_open_by_handle_at+0xc/0x10
 [<ffffffff83a5f3f8>] tracesys+0xe1/0xe6

Right, tmpfs is being stupid to access fid->raw[2] before validating that
fh_len includes it: the buffer kmalloc'ed by do_sys_name_to_handle() may
fall at the end of a page, and the next page not be present.

But some other filesystems (ceph, gfs2, isofs, reiserfs, xfs) are being
careless about fh_len too, in fh_to_dentry() and/or fh_to_parent(), and
could oops in the same way: add the missing fh_len checks to those.

Reported-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Sage Weil <sage@inktank.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agovfs: drop lock/unlock super
Marco Stornelli [Sat, 6 Oct 2012 10:43:09 +0000 (12:43 +0200)]
vfs: drop lock/unlock super

Removed s_lock from super_block and removed lock/unlock super.

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agoufs: drop lock/unlock super
Marco Stornelli [Sat, 6 Oct 2012 10:42:28 +0000 (12:42 +0200)]
ufs: drop lock/unlock super

Removed lock/unlock super. Added a new private s_lock mutex.

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agosysv: drop lock/unlock super
Marco Stornelli [Sat, 6 Oct 2012 10:41:46 +0000 (12:41 +0200)]
sysv: drop lock/unlock super

Removed lock/unlock super. Added a new private s_lock mutex.

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agohpfs: drop lock/unlock super
Marco Stornelli [Sat, 6 Oct 2012 10:41:05 +0000 (12:41 +0200)]
hpfs: drop lock/unlock super

Removed lock/unlock super.

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Acked-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agofat: drop lock/unlock super
Marco Stornelli [Sat, 6 Oct 2012 10:40:03 +0000 (12:40 +0200)]
fat: drop lock/unlock super

Removed lock/unlock super. Added a new private s_lock mutex.

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agoext3: drop lock/unlock super
Marco Stornelli [Sat, 6 Oct 2012 10:39:20 +0000 (12:39 +0200)]
ext3: drop lock/unlock super

Removed lock/unlock super.

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agoexofs: drop lock/unlock super
Marco Stornelli [Sat, 6 Oct 2012 10:38:18 +0000 (12:38 +0200)]
exofs: drop lock/unlock super

Removed lock/unlock super.

Acked-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Acked-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agodup3: Return an error when oldfd == newfd.
Richard W.M. Jones [Tue, 9 Oct 2012 14:27:43 +0000 (15:27 +0100)]
dup3: Return an error when oldfd == newfd.

I have tested the attached patch to fix the dup3 regression.

Rich.

From 0944e30e12dec6544b3602626b60ff412375c78f Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 9 Oct 2012 14:42:45 +0100
Subject: [PATCH] dup3: Return an error when oldfd == newfd.

The following commit:

  commit fe17f22d7fd0e344ef6447238f799bb49f670c6f
  Author: Al Viro <viro@zeniv.linux.org.uk>
  Date:   Tue Aug 21 11:48:11 2012 -0400

    take purely descriptor-related stuff from fcntl.c to file.c

was supposed to be just code motion, but it dropped the following two
lines:

  if (unlikely(oldfd == newfd))
          return -EINVAL;

from the dup3 system call.  dup3 is not specified by POSIX, so Linux
can do what it likes.  However the POSIX proposal for dup3 [1] states
that it should return an error if oldfd == newfd.

[1] http://austingroupbugs.net/view.php?id=411

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Tested-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agofs: handle failed audit_log_start properly
Sasha Levin [Thu, 4 Oct 2012 23:57:31 +0000 (19:57 -0400)]
fs: handle failed audit_log_start properly

audit_log_start() may return NULL, this is unchecked by the caller in
audit_log_link_denied() and could cause a NULL ptr deref.

Introduced by commit a51d9eaa ("fs: add link restriction audit reporting").

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agofs: prevent use after free in auditing when symlink following was denied
Sasha Levin [Thu, 4 Oct 2012 23:56:40 +0000 (19:56 -0400)]
fs: prevent use after free in auditing when symlink following was denied

Commit "fs: add link restriction audit reporting" has added auditing of failed
attempts to follow symlinks. Unfortunately, the auditing was being done after
the struct path structure was released earlier.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
Linus Torvalds [Wed, 10 Oct 2012 03:02:25 +0000 (12:02 +0900)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/signal

Pull generic execve() changes from Al Viro:
 "This introduces the generic kernel_thread() and kernel_execve()
  functions, and switches x86, arm, alpha, um and s390 over to them."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (26 commits)
  s390: convert to generic kernel_execve()
  s390: switch to generic kernel_thread()
  s390: fold kernel_thread_helper() into ret_from_fork()
  s390: fold execve_tail() into start_thread(), convert to generic sys_execve()
  um: switch to generic kernel_thread()
  x86, um/x86: switch to generic sys_execve and kernel_execve
  x86: split ret_from_fork
  alpha: introduce ret_from_kernel_execve(), switch to generic kernel_execve()
  alpha: switch to generic kernel_thread()
  alpha: switch to generic sys_execve()
  arm: get rid of execve wrapper, switch to generic execve() implementation
  arm: optimized current_pt_regs()
  arm: introduce ret_from_kernel_execve(), switch to generic kernel_execve()
  arm: split ret_from_fork, simplify kernel_thread() [based on patch by rmk]
  generic sys_execve()
  generic kernel_execve()
  new helper: current_pt_regs()
  preparation for generic kernel_thread()
  um: kill thread->forking
  um: let signal_delivered() do SIGTRAP on singlestepping into handler
  ...

11 years agoMerge tag 'omapdss-for-3.7' of git://gitorious.org/linux-omap-dss2/linux into fbdev...
Florian Tobias Schandinat [Wed, 10 Oct 2012 02:16:30 +0000 (02:16 +0000)]
Merge tag 'omapdss-for-3.7' of git://gitorious.org/linux-omap-dss2/linux into fbdev-next

Omapdss driver changes for the 3.7 merge window.

Notable changes:

* Basic writeback support for DISPC level. Writeback is not yet usable, though,
  as we need higher level code to actually expose the writeback feature to
  userspace.
* Rewriting the omapdss output drivers. We're trying to remove the hard links
  between the omapdss and the panels, and this rewrite work moves us closer to
  that goal.
* Cleanup and restructuring patches that have been made while working on device
  tree support for omapdss. Device tree support is still some way ahead, but
  these patches are good cleanups in themselves.
* Basic OMAP5 DSS support for DPI and DSI outputs.
* Workaround for the problem that GFX overlay's fifo is too small for high
  resolution scenarios, causing underflows.
* Cleanups that remove dependencies to omap platform code.

11 years agoMerge branch 'for-linus-37rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Linus Torvalds [Wed, 10 Oct 2012 02:15:20 +0000 (11:15 +0900)]
Merge branch 'for-linus-37rc1' of git://git./linux/kernel/git/rw/uml

Pull UML changes from Richard Weinberger:
 "UML receives this time only cleanups.

  The most outstanding change is the 'include "foo.h"' do 'include
  <foo.h>' conversion done by Al Viro.

  It touches many files, that's why the diffstat is rather big."

* 'for-linus-37rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  typo in UserModeLinux-HOWTO
  hppfs: fix the return value of get_inode()
  hostfs: drop vmtruncate
  um: get rid of pointless include "..." where include <...> will do
  um: move sysrq.h out of include/shared
  um/x86: merge 32 and 64 bit variants of ptrace.h
  um/x86: merge 32 and 64bit variants of checksum.h

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Wed, 10 Oct 2012 02:12:54 +0000 (11:12 +0900)]
Merge git://git./linux/kernel/git/davem/net

Pull networking updates from David Miller:

 1) UAPI changes for networking from David Howells

 2) A netlink dump is an operation we can sleep within, and therefore we
    need to make sure the dump provider module doesn't disappear on us
    meanwhile.  Fix from Gao Feng.

 3) Now that tunnels support GRO, we have to be more careful in
    skb_gro_reset_offset() otherwise we OOPS, from Eric Dumazet.

 4) We can end up processing packets for VLANs we aren't actually
    configured to be on, fix from Florian Zumbiehl.

 5) Fix routing cache removal regression in redirects and IPVS.  The
    core issue on the IPVS side is that it wants to rewrite who the
    nexthop is and we have to explicitly accomodate that case.  From
    Julian Anastasov.

 6) Error code return fixes all over the networking drivers from Peter
    Senna Tschudin.

 7) Fix routing cache removal regressions in IPSEC, from Steffen
    Klassert.

 8) Fix deadlock in RDS during pings, from Jeff Liu.

 9) Neighbour packet queue can trigger skb_under_panic() because we do
    not reset the network header of the SKB in the right spot.  From
    Ramesh Nagappa.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (61 commits)
  RDS: fix rds-ping spinlock recursion
  netdev/phy: Prototype of_mdio_find_bus()
  farsync: fix support for over 30 cards
  be2net: Remove code that stops further access to BE NIC based on UE bits
  pch_gbe: Fix build error by selecting all the possible dependencies.
  e1000e: add device IDs for i218
  ixgbe/ixgbevf: Limit maximum jumbo frame size to 9.5K to avoid Tx hangs
  ixgbevf: Set the netdev number of Tx queues
  UAPI: (Scripted) Disintegrate include/linux/tc_ematch
  UAPI: (Scripted) Disintegrate include/linux/tc_act
  UAPI: (Scripted) Disintegrate include/linux/netfilter_ipv6
  UAPI: (Scripted) Disintegrate include/linux/netfilter_ipv4
  UAPI: (Scripted) Disintegrate include/linux/netfilter_bridge
  UAPI: (Scripted) Disintegrate include/linux/netfilter_arp
  UAPI: (Scripted) Disintegrate include/linux/netfilter/ipset
  UAPI: (Scripted) Disintegrate include/linux/netfilter
  UAPI: (Scripted) Disintegrate include/linux/isdn
  UAPI: (Scripted) Disintegrate include/linux/caif
  net: fix typo in freescale/ucc_geth.c
  vxlan: fix more sparse warnings
  ...

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Wed, 10 Oct 2012 02:12:03 +0000 (11:12 +0900)]
Merge git://git./linux/kernel/git/davem/sparc

Pull sparc update from David Miller:
 "This is just the UAPI commits for sparc via David Howells."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  UAPI: (Scripted) Disintegrate arch/sparc/include/asm

11 years agoMerge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Wed, 10 Oct 2012 02:10:41 +0000 (11:10 +0900)]
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma

Pull slave-dmaengine updates from Vinod Koul:
 "This time we have Andy updates on dw_dmac which is attempting to make
  this IP block available as PCI and platform device though not fully
  complete this time.

  We also have TI EDMA moving the dma driver to use dmaengine APIs, also
  have a new driver for mmp-tdma, along with bunch of small updates.

  Now for your excitement the merge is little unusual here, while
  merging the auto merge on linux-next picks wrong choice for pl330
  (drivers/dma/pl330.c) and this causes build failure.  The correct
  resolution is in linux-next.  (DMA: PL330: Fix build error) I didn't
  back merge your tree this time as you are better than me so no point
  in doing that for me :)"

Fixed the pl330 conflict as in linux-next, along with trivial header
file conflicts due to changed includes.

* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (29 commits)
  dma: tegra: fix interrupt name issue with apb dma.
  dw_dmac: fix a regression in dwc_prep_dma_memcpy
  dw_dmac: introduce software emulation of LLP transfers
  dw_dmac: autoconfigure data_width or get it via platform data
  dw_dmac: autoconfigure block_size or use platform data
  dw_dmac: get number of channels from hardware if possible
  dw_dmac: fill optional encoded parameters in register structure
  dw_dmac: mark dwc_dump_chan_regs as inline
  DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources
  DMA: PL330: Remove redundant runtime_suspend/resume functions
  DMA: PL330: Remove controller clock enable/disable
  dmaengine: use kmem_cache_zalloc instead of kmem_cache_alloc/memset
  DMA: PL330: Set the capability of pdm0 and pdm1 as DMA_PRIVATE
  ARM: EXYNOS: Set the capability of pdm0 and pdm1 as DMA_PRIVATE
  dma: tegra: use list_move_tail instead of list_del/list_add_tail
  mxs/dma: Enlarge the CCW descriptor area to 4 pages
  dw_dmac: utilize slave_id to pass request line
  dmaengine: mmp_tdma: add dt support
  dmaengine: mmp-pdma support
  spi: davici - make davinci select edma
  ...