aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-04-17Merge tag 'ext4_for_linus' of ↵HEADmasterLinus Torvalds3-40/+15
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 regression fixes from Ted Ts'o: "This fixes a scalability problem reported by Andi Kleen and Tim Chen; they were quite secretive about the precise nature of their workload, but they later admitted that it only showed up when they were using a large sparse file, so the amount of data I/O that was needed was close to zero. I'm not sure how realistic this is and it's only a regression if you consider changes made since 2.6.39 to be a "regression" vis-a-vis the policy regarding post-merge window bug fixes, but Linus agreed it was worth fixing, so I'm including it in this pull request. This also fixes the journalled quota mount options, which I accidentally broke while I was cleaning up the mount option handling." * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix handling of journalled quota options ext4: address scalability issue by removing extent cache statistics
2012-04-17Merge branch 'for-linus' of ↵Linus Torvalds11-46/+36
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "A bunch of endianness fixes and a couple of nfsd error value fixes. Speaking of endianness stuff, I'm rather tempted to slap ccflags-y += -D__CHECK_ENDIAN__ in fs/Makefile, if not making it default for the entire tree; nfsd regressions I've caught make one hell of a pile and we'd obviously benefit from having that kind of stuff caught earlier..." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: lockd: fix the endianness bug ocfs2: ->e_leaf_clusters endianness breakage ocfs2: ->rl_count endianness breakage ocfs: ->rl_used breakage on big-endian ocfs2: ->l_next_free_req breakage on big-endian btrfs: btrfs_root_readonly() broken on big-endian ext4: fix endianness breakage in ext4_split_extent_at() nfsd: fix compose_entry_fh() failure exits nfsd: fix error value on allocation failure in nfsd4_decode_test_stateid() nfsd: fix endianness breakage in TEST_STATEID handling nfsd: fix error values returned by nfsd4_lockt() when nfsd_open() fails nfsd: fix b0rken error value for setattr on read-only mount
2012-04-17Merge git://git.samba.org/sfrench/cifs-2.6Linus Torvalds1-62/+20
Pull CIFS fixes from Steve French. * git://git.samba.org/sfrench/cifs-2.6: Fix number parsing in cifs_parse_mount_options Cleanup handling of NULL value passed for a mount option
2012-04-16Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds5-32/+51
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar. * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Handle failures of parsing immediate operands in the instruction decoder perf archive: Correct cutting of symbolic link perf tools: Ignore auto-generated bison/flex files perf tools: Fix parsers' rules to dependencies perf tools: fix NO_GTK2 Makefile config error perf session: Skip event correctly for unknown id/machine
2012-04-16Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds3-25/+76
Pull virtio fixes from Michael S. Tsirkin: "Here are some virtio fixes for 3.4: a test build fix, a patch by Ren fixing naming for systems with a massive number of virtio blk devices, and balloon fixes for powerpc by David Gibson. There was some discussion about Ren's patch for virtio disc naming: some people wanted to move the legacy name mangling function to the block core. But there's no concensus on that yet, and we can always deduplicate later. Added comments in the hope that this will stop people from copying this legacy naming scheme into future drivers." * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_balloon: fix handling of PAGE_SIZE != 4k virtio_balloon: Fix endian bug virtio_blk: helper function to format disk names tools/virtio: fix up vhost/test module build
2012-04-16PCI: Retry BARs restoration for Type 0 headers onlyRafael J. Wysocki1-9/+15
Some shortcomings introduced into pci_restore_state() by commit 26f41062f28d ("PCI: check for pci bar restore completion and retry") have been fixed by recent commit ebfc5b802fa76 ("PCI: Fix regression in pci_restore_state(), v3"), but that commit treats all PCI devices as those with Type 0 configuration headers. That is not entirely correct, because Type 1 and Type 2 headers have different layouts. In particular, the area occupied by BARs in Type 0 config headers contains the secondary status register in Type 1 ones and it doesn't make sense to retry the restoration of that register even if the value read back from it after a write is not the same as the written one (it very well may be different). For this reason, make pci_restore_state() only retry the restoration of BARs for Type 0 config headers. This effectively makes it behave as before commit 26f41062f28d for all header types except for Type 0. Tested-by: Mikko Vinni <mmvinni@yahoo.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-16Documentation: maintainer changeRandy Dunlap1-2/+2
I'm dropping off as Documentation/ maintainer. Rob Landley has agreed to take it over. Thanks, Rob. I'll still be around reviewing patches and testing. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Rob Landley <rob@landley.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-16ia64: fix futex_atomic_cmpxchg_inatomic()Luck, Tony1-4/+5
Michel Lespinasse cleaned up the futex calling conventions in commit 37a9d912b24f ("futex: Sanitize cmpxchg_futex_value_locked API"). But the ia64 implementation was subtly broken. Gcc does not know that register "r8" will be updated by the fault handler if the cmpxchg instruction takes an exception. So it feels safe in letting the initialization of r8 slide to after the cmpxchg. Result: we always return 0 whether the user address faulted or not. Fix by moving the initialization of r8 into the __asm__ code so gcc won't move it. Reported-by: <emeric.maschino@gmail.com> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42757 Tested-by: <emeric.maschino@gmail.com> Acked-by: Michel Lespinasse <walken@google.com> Cc: stable@vger.kernel.org # v2.6.39+ Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-16ext4: fix handling of journalled quota optionsTheodore Ts'o1-17/+15
Commit 26092bf5 broke handling of journalled quota mount options by trying to parse argument of every mount option as a number. Fix this by dealing with the quota options before we call match_int(). Thanks to Jan Kara for discovering this regression. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
2012-04-16checkpatch: revert --strict test for net/ and drivers/net block comment styleJoe Perches1-6/+0
Revert the --strict test for the old preferred block comment style in drivers/net and net/ Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-16ext4: address scalability issue by removing extent cache statisticsTheodore Ts'o3-23/+0
Andi Kleen and Tim Chen have reported that under certain circumstances the extent cache statistics are causing scalability problems due to cache line bounces. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@vger.kernel.org
2012-04-16x86: Handle failures of parsing immediate operands in the instruction decoderMasami Hiramatsu1-17/+36
This can happen if the instruction is much longer than the maximum length, or if insn->opnd_bytes is manually changed. This patch also fixes warnings from -Wswitch-default flag. Reported-by: Prashanth Nageshappa <prashanth@linux.vnet.ibm.com> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Jim Keniston <jkenisto@linux.vnet.ibm.com> Cc: Linux-mm <linux-mm@kvack.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Christoph Hellwig <hch@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Arnaldo Carvalho de Melo <acme@infradead.org> Cc: Anton Arapov <anton@redhat.com> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: yrl.pp-manager.tt@hitachi.com Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20120413032427.32577.42602.stgit@localhost.localdomain Signed-off-by: Ingo Molnar <mingo@kernel.org>
2012-04-15Linux 3.4-rc3Linus Torvalds1-1/+1
2012-04-15Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-armLinus Torvalds14-61/+46
Pull ARM fixes from Russell King: "Nothing too disasterous, the biggest thing being the removal of the regulator support for vcore in the AMBA driver; only one SoC was using this and it got broken during the last merge window, which then started causing problems for other people. Mutual agreement was reached for it to be removed." * 'fixes' of git://git.linaro.org/people/rmk/linux-arm: ARM: 7386/1: jump_label: fixup for rename to static_key ARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEE ARM: 7382/1: mm: truncate memory banks to fit in 4GB space for classic MMU ARM: 7359/2: smp_twd: Only wait for reprogramming on active cpus ARM: 7383/1: nommu: populate vectors page from paging_init ARM: 7381/1: nommu: fix typo in mm/Kconfig ARM: 7380/1: DT: do not add a zero-sized memory property ARM: 7379/1: DT: fix atags_to_fdt() second call site ARM: 7366/3: amba: Remove AMBA level regulator support ARM: 7377/1: vic: re-read status register before dispatching each IRQ handler ARM: 7368/1: fault.c: correct how the tsk->[maj|min]_flt gets incremented
2012-04-15x86-32: fix up strncpy_from_user() sign errorLinus Torvalds1-2/+2
The 'max' range needs to be unsigned, since the size of the user address space is bigger than 2GB. We know that 'count' is positive in 'long' (that is checked in the caller), so we will truncate 'max' down to something that fits in a signed long, but before we actually do that, that comparison needs to be done in unsigned. Bug introduced in commit 92ae03f2ef99 ("x86: merge 32/64-bit versions of 'strncpy_from_user()' and speed it up"). On x86-64 you can't trigger this, since the user address space is much smaller than 63 bits, and on x86-32 it works in practice, since you would seldom hit the strncpy limits anyway. I had actually tested the corner-cases, I had only tested them on x86-64. Besides, I had only worried about the case of a pointer *close* to the end of the address space, rather than really far away from it ;) This also changes the "we hit the user-specified maximum" to return 'res', for the trivial reason that gcc seems to generate better code that way. 'res' and 'count' are the same in that case, so it really doesn't matter which one we return. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-15ARM: 7386/1: jump_label: fixup for rename to static_keyRabin Vincent1-1/+1
c5905afb0 ("static keys: Introduce 'struct static_key'...") renamed struct jump_label_key to struct static_key. Fixup ARM for this to eliminate these build warnings: include/linux/jump_label.h:113:2: warning: passing argument 1 of 'arch_static_branch' from incompatible pointer type include/asm/jump_label.h:17:82: note: expected 'struct jump_label_key *' but argument is of type 'struct static_key *' Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-04-15ARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEEJonathan Austin1-0/+12
Currently when ThumbEE is not enabled (!CONFIG_ARM_THUMBEE) the ThumbEE register states are not saved/restored at context switch. The default state of the ThumbEE Ctrl register (TEECR) allows userspace accesses to the ThumbEE Base Handler register (TEEHBR). This can cause unexpected behaviour when people use ThumbEE on !CONFIG_ARM_THUMBEE kernels, as well as allowing covert communication - eg between userspace tasks running inside chroot jails. This patch sets up TEECR in order to prevent user-space access to TEEHBR when !CONFIG_ARM_THUMBEE. In this case, tasks are sent SIGILL if they try to access TEEHBR. Cc: stable@vger.kernel.org Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Jonathan Austin <jonathan.austin@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-04-15ARM: 7382/1: mm: truncate memory banks to fit in 4GB space for classic MMUWill Deacon1-1/+15
If a bank of memory spanning the 4GB boundary is added on a !CONFIG_LPAE kernel then we will hang early during boot since the memory bank will have wrapped around to zero. This patch truncates memory banks for !LPAE configurations when the end address is not representable in 32 bits. Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-04-15ARM: 7359/2: smp_twd: Only wait for reprogramming on active cpusLinus Walleij1-1/+5
During booting of cpu1, there is a short window where cpu1 is online, but not active where cpu1 is occupied by waiting to become active. If cpu0 then decides to schedule something on cpu1 and wait for it to complete, before cpu0 has set cpu1 active, we have a deadlock. Typically it's this CPU frequency transition that happens at this time, so let's just not wait for it to happen, it will happen whenever the CPU eventually comes online instead. Cc: Peter Zijlstra <peterz@infradead.org> Cc: stable@kernel.org Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Reviewed-by: Rickard Andersson <rickard.andersson@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-04-15PCI: Fix regression in pci_restore_state(), v3Rafael J. Wysocki1-18/+39
Commit 26f41062f28d ("PCI: check for pci bar restore completion and retry") attempted to address problems with PCI BAR restoration on systems where FLR had not been completed before pci_restore_state() was called, but it did that in an utterly wrong way. First off, instead of retrying the writes for the BAR registers only, it did that for all of the PCI config space of the device, including the status register (whose value after the write quite obviously need not be the same as the written one). Second, it added arbitrary delay to pci_restore_state() even for systems where the PCI config space restoration was successful at first attempt. Finally, the mdelay(10) it added to every iteration of the writing loop was way too much of a delay for any reasonable device. All of this actually caused resume failures for some devices on Mikko's system. To fix the regression, make pci_restore_state() only retry the writes for BAR registers and only wait if the first read from the register doesn't return the written value. Additionaly, make it wait for 1 ms, instead of 10 ms, after every failing attempt to write into config space. Reported-by: Mikko Vinni <mmvinni@yahoo.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-15Merge tag 'fixes-for-linus' of ↵Linus Torvalds26-193/+31
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull "ARM: a few more SoC fixes for 3.4-rc" from Olof Johansson: - A handful of warning and build fixes for Qualcomm MSM - Build/warning and bug fixes for Samsung Exynos - A fix from Rob Herring that removes misplaced interrupt-parent properties from a few device trees - A fix to OMAP dealing with cpufreq build errors, removing some of the offending code since it was redundant anyway * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: OMAP: clock: cleanup CPUfreq leftovers, fix build errors ARM: dts: remove blank interrupt-parent properties ARM: EXYNOS: Fix Kconfig dependencies for device tree enabled machine files ARM: EXYNOS: Remove broken config values for touchscren for NURI board ARM: EXYNOS: set fix xusbxti clock for NURI and Universal210 boards ARM: EXYNOS: fix regulator name for NURI board ARM: SAMSUNG: make SAMSUNG_PM_DEBUG select DEBUG_LL ARM: msm: Fix section mismatches in proc_comm.c video: msm: Fix section mismatches in mddi.c arm: msm: trout: fix compile failure arm: msm: halibut: remove unneeded fixup ARM: EXYNOS: Add PDMA and MDMA physical base address defines ARM: S5PV210: Fix compiler warning in dma.c file ARM: EXYNOS: Fix compile error in exynos5250-cpufreq.c ARM: EXYNOS: Add missing definition for IRQ_I2S0 ARM: S5PV210: fix unused LDO supply field from wm8994_pdata
2012-04-15Merge tag 'sound-3.4' of ↵Linus Torvalds2-11/+29
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull another round of sound fixes from Takashi Iwai: "A few regression fixes for Realtek HD-audio codecs, mainly specific to some laptop models." * tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Fix mem leak (and rid us of trailing whitespace). ALSA: hda/realtek - Add quirk for Mac Pro 5,1 machines ALSA: hda/realtek - Add a fixup entry for Acer Aspire 8940G ALSA: hda/realtek - Fix GPIO1 setup for Acer Aspire 4930 & co ALSA: hda/realtek - Add a few ALC882 model strings back
2012-04-15SCSI: Fix error handling when no ULD is attachedMartin K. Petersen2-1/+4
Commit 18a4d0a22ed6 ("[SCSI] Handle disk devices which can not process medium access commands") introduced a bug in which we would attempt to dereference the scsi driver even when the device had no ULD attached. Ensure that a driver is registered and make the driver accessor function more resilient to errors during device discovery. Reported-by: Elric Fu <elricfu1@gmail.com> Reported-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-15virtio_balloon: fix handling of PAGE_SIZE != 4kMichael S. Tsirkin1-10/+41
As reported by David Gibson, current code handles PAGE_SIZE != 4k completely wrong which can lead to guest memory corruption errors: - page_to_balloon_pfn is wrong: e.g. on system with 64K page size it gives the same pfn value for 16 different pages. - we also need to convert back to linux pfns when we free. - for each linux page we need to tell host about multiple balloon pages, but code only adds one pfn to the array. This patch fixes all that, tested with a 64k ppc64 kernel. Reported-by: David Gibson <david@gibson.dropbear.id.au> Tested-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2012-04-15virtio_balloon: Fix endian bugDavid Gibson1-2/+5
Although virtio config space fields are usually in guest-native endian, the spec for the virtio balloon device explicitly states that both fields in its config space are little-endian. However, the current virtio_balloon driver does not have a suitable endian swap for the 'num_pages' field, although it does have one for the 'actual' field. This patch corrects the bug, adding sparse annotation while we're at it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2012-04-15Merge tag 'perf-urgent-for-mingo' of ↵Ingo Molnar4-15/+15
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf tooling fixes from Arnaldo Carvalho de Melo: . Properly handle ~/.debug, the build id cache, when it is a symlink, fix from Chanho Park . Fixes for the parser generation process, from Jiri Olsa and Namhyung Kim . Fix build when NO_GTK2 is specified, From Stephane Eranian . When a machine is not found, bump the relevant error stat but return 0, so that we correctly move to the next perf event. Fix from Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
2012-04-14Merge branch 'v3.4-samsung-fixes-2' of ↵Olof Johansson11-51/+24
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes * 'v3.4-samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: ARM: EXYNOS: Fix Kconfig dependencies for device tree enabled machine files ARM: EXYNOS: Remove broken config values for touchscren for NURI board ARM: EXYNOS: set fix xusbxti clock for NURI and Universal210 boards ARM: EXYNOS: fix regulator name for NURI board ARM: SAMSUNG: make SAMSUNG_PM_DEBUG select DEBUG_LL ARM: EXYNOS: Add PDMA and MDMA physical base address defines ARM: S5PV210: Fix compiler warning in dma.c file ARM: EXYNOS: Fix compile error in exynos5250-cpufreq.c ARM: EXYNOS: Add missing definition for IRQ_I2S0 ARM: S5PV210: fix unused LDO supply field from wm8994_pdata
2012-04-14ARM: OMAP: clock: cleanup CPUfreq leftovers, fix build errorsKevin Hilman5-129/+0
Now that we have OPP layer, and OMAP CPUfreq driver is using it, we no longer need/use the clock framework code for filling up CPUfreq tables. Remove it. Removing this code also eliminates build errors when CPU_FREQ_TABLE support is not enabled. Thanks to Russell King for pointing out the parts I missed under plat-omap in the original version and also pointing out the build errors when CPUFREQ_TABLE support was not enabled. Cc: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Kevin Hilman <khilman@ti.com> Acked-by: Paul Walmsley <paul@pwsan.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2012-04-14ARM: dts: remove blank interrupt-parent propertiesRob Herring5-5/+0
These were incorrectly introduced and can cause problems for of_irq_init. The correct way to define a root controller is no interrupt-parent set at all or the interrupt-parent is set to the root controller itself when inherited from a parent node. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Tested-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Olof Johansson <olof@lixom.net>
2012-04-14Merge branch 'msm-fix' of ↵Olof Johansson5-8/+7
git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm into fixes From David Brown: "Here are some fixes for msm that fix problems caused by the latest ARM code. The ones from Daniel remove unneeded fixups that now cause compilation failures. Mine fix section mismatches, that were incompletely fixed earlier." * 'msm-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm: ARM: msm: Fix section mismatches in proc_comm.c video: msm: Fix section mismatches in mddi.c arm: msm: trout: fix compile failure arm: msm: halibut: remove unneeded fixup
2012-04-14perf archive: Correct cutting of symbolic linkChanho Park1-1/+2
If a '$PERF_BUILDID_DIR'(typically $HOME/.debug) is a symbolic link directory, cutting of the path will fail. Here is an example where a buildid directory is a symbolic link. / # ls -al /root lrwxrwxrwx 1 root root 13 Mar 26 2012 /root -> opt/home/root / # cd ~ /opt/home/root # perf record -a -g sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.322 MB perf.data (~14057 samples) ] /opt/home/root # perf archive tar: Removing leading `/' from member names Now please run: $ tar xvf perf.data.tar.bz2 -C ~/.debug wherever you need to run 'perf report' on. /opt/home/root # mkdir temp /opt/home/root # tar xf perf.data.tar.bz2 -C ./temp /opt/home/root # find ./temp -name "*kernel*" ./temp/opt/home/root/.debug/[kernel.kallsyms] -> If successfully cut off the path, [kernel.kallsyms] is located in top of the archived file. This patch enables to cut correctly even if the buildid directory is a symbolic link. Signed-off-by: Chanho Park <chanho61.park@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1333348109-12598-1-git-send-email-chanho61.park@samsung.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-14perf tools: Ignore auto-generated bison/flex filesNamhyung Kim1-0/+2
The commit 65f3e56e0c81 ("perf tools: Remove auto-generated bison/flex files") removed those files from git, so they'll be listed on untracked files after building perf. Fix it. Signed-off-by: Namhyung Kim <namhyung.kim@lge.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1333948274-20043-1-git-send-email-namhyung.kim@lge.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-14perf tools: Fix parsers' rules to dependenciesJiri Olsa1-11/+8
Currently the parsers objects (bison/flex related) are each time perf is built. No matter the generated files are already in place, the parser generation is executed every time. Changing the rules to have proper flex/bison objects generation dependencies. The parsers code is not rebuilt until the flex/bison source files are touched. Also when flex/bison source is changed, only dependent objects are rebuilt. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1334140791-3024-1-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-14ARM: EXYNOS: Fix Kconfig dependencies for device tree enabled machine filesSachin Kamat1-0/+2
Add config dependency for Exynos4 and Exynos5 device tree enabled machine files on config options ARCH_EXYNOS4 and ARCH_EXYNOS5 respectively. Enabling machine support without proper ARCH support enabled is incorrect. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-04-14Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds7-13/+68
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tool fixes from Ingo Molnar. * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf kvm: Finding struct machine fails for PERF_RECORD_MMAP perf annotate: Validate addr in symbol__inc_addr_samples perf hists browser: Fix NULL deref in hists browsing code perf hists: Catch and handle out-of-date hist entry maps. perf annotate: Fix hist decay perf top: Add intel_idle to the skip list
2012-04-14do not export kernel's NULL #define to userspaceLubos Lunak1-6/+2
GCC's NULL is actually __null, which allows detecting some questionable NULL usage and warn about it. Moreover each platform/compiler should have its own stddef.h anyway (which is different from linux/stddef.h). So there's no good reason to leak kernel's NULL to userspace and override what the compiler provides. Signed-off-by: Luboš Luňák <l.lunak@suse.cz> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-14ARM: EXYNOS: Remove broken config values for touchscren for NURI boardMarek Szyprowski1-42/+0
The atmel_mxt_ts driver has been extended to support more 'configuration objects' in commit 81c88a711 ("Input: atmel_mxt_ts - update object list"), what broke the configuration values for NURI board. These values are optional anyway, so remove them to get the driver working correctly. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-04-14ARM: EXYNOS: set fix xusbxti clock for NURI and Universal210 boardsMarek Szyprowski2-1/+3
On some versions of NURI and UniversalC210 boards, camera clocks are routed directly to xusbxti clock source. This patch sets the correct value for this clock to let usb and camera sensors to work correctly and avoid division by zero on driver's probe. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-04-14ARM: EXYNOS: fix regulator name for NURI boardMarek Szyprowski1-1/+1
Regulator names should not contain slash to avoid issues with debugfs. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-04-14ARM: SAMSUNG: make SAMSUNG_PM_DEBUG select DEBUG_LLMaurus Cuelenaere1-0/+1
When selecting SAMSUNG_PM_DEBUG, it complains about a missing printascii() function if you do not select DEBUG_LL, so make the former select the latter. Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com> Acked-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-04-13Merge branch 'systemh-fixes' of ↵Linus Torvalds6-183/+223
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux Pull system.h fixups for less common arch's from Paul Gortmaker: "Here is what is hopefully the last of the system.h related fixups. The fixes for Alpha and ia64 are code relocations consistent with what was done for the more mainstream architectures. Note that the diffstat lines removed vs lines added are not the same since I've fixed some of the whitespace issues in the relocated code blocks. However they are functionally the same. Compile tested locally, plus these two have been in linux-next for a while. There is also a trivial one line system.h related fix for the Tilera arch from Chris Metcalf to fix an implict include.." * 'systemh-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: irq_work: fix compile failure on tile from missing include ia64: populate the cmpxchg header with appropriate code alpha: fix build failures from system.h dismemberment
2012-04-13Merge tag 'fbdev-fixes-for-3.4-1' of git://github.com/schandinat/linux-2.6Linus Torvalds4-193/+201
Pull fbdev fixes from Florian Tobias Schandinat: - a compile fix for au1*fb - a fix to make kyrofb usable on x86_64 - a fix for uvesafb to prevent an oops due to NX-protection "The fix for kyrofb is a bit large but it's just replacing "unsigned long" by "u32" for 64 bit compatibility." * tag 'fbdev-fixes-for-3.4-1' of git://github.com/schandinat/linux-2.6: video:uvesafb: Fix oops that uvesafb try to execute NX-protected page fbdev: fix au1*fb builds kyrofb: fix on x86_64
2012-04-13Merge branch 'for-linus-min' of ↵Linus Torvalds7-21/+40
git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull the minimal btrfs branch from Chris Mason: "We have a use-after-free in there, along with errors when mount -o discard is enabled, and a BUG_ON(we should compile with UP more often)." * 'for-linus-min' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: use commit root when loading free space cache Btrfs: fix use-after-free in __btrfs_end_transaction Btrfs: check return value of bio_alloc() properly Btrfs: remove lock assert from get_restripe_target() Btrfs: fix eof while discarding extents Btrfs: fix uninit variable in repair_eb_io_failure Revert "Btrfs: increase the global block reserve estimates"
2012-04-13Merge branch 'for-3.4/drivers' of git://git.kernel.dk/linux-blockLinus Torvalds10-332/+796
Pull block driver bits from Jens Axboe: - A series of fixes for mtip32xx. Most from Asai at Micron, but also one from Greg, getting rid of the dependency on PCIE_HOTPLUG. - A few bug fixes for xen-blkfront, and blkback. - A virtio-blk fix for Vivek, making resize actually work. - Two fixes from Stephen, making larger transfers possible on cciss. This is needed for tape drive support. * 'for-3.4/drivers' of git://git.kernel.dk/linux-block: block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy mtip32xx: dump tagmap on failure mtip32xx: fix handling of commands in various scenarios mtip32xx: Shorten macro names mtip32xx: misc changes mtip32xx: Add new sysfs entry 'status' mtip32xx: make setting comp_time as common mtip32xx: Add new bitwise flag 'dd_flag' mtip32xx: fix error handling in mtip_init() virtio-blk: Call revalidate_disk() upon online disk resize xen/blkback: Make optional features be really optional. xen/blkback: Squash the discard support for 'file' and 'phy' type. mtip32xx: fix incorrect value set for drv_cleanup_done, and re-initialize and start port in mtip_restart_port() cciss: Fix scsi tape io with more than 255 scatter gather elements cciss: Initialize scsi host max_sectors for tape drive support xen-blkfront: make blkif_io_lock spinlock per-device xen/blkfront: don't put bdev right after getting it xen-blkfront: use bitmap_set() and bitmap_clear() xen/blkback: Enable blkback on HVM guests xen/blkback: use grant-table.c hypercall wrappers
2012-04-13Merge branch 'for-3.4/core' of git://git.kernel.dk/linux-blockLinus Torvalds5-16/+27
Pull block core bits from Jens Axboe: "It's a nice and quiet round this time, since most of the tricky stuff has been pushed to 3.5 to give it more time to mature. After a few hectic block IO core changes for 3.3 and 3.2, I'm quite happy with a slow round. Really minor stuff in here, the only real functional change is making the auto-unplug threshold a per-queue entity. The threshold is set so that it's low enough that we don't hold off IO for too long, but still big enough to get a nice benefit from the batched insert (and hence queue lock cost reduction). For raid configurations, this currently breaks down." * 'for-3.4/core' of git://git.kernel.dk/linux-block: block: make auto block plug flush threshold per-disk based Documentation: Add sysfs ABI change for cfq's target latency. block: Make cfq_target_latency tunable through sysfs. block: use lockdep_assert_held for queue locking block: blk_alloc_queue_node(): use caller's GFP flags instead of GFP_KERNEL
2012-04-13cpufreq: OMAP: fix build errors: depends on ARCH_OMAP2PLUSKevin Hilman1-0/+1
The OMAP driver needs a 'depends on ARCH_OMAP2PLUS' since it only builds for OMAP2+ platforms. This 'depends on' was in the original patch from Russell King, but was erroneously removed by me when making this option user-selectable in commit b09db45c (cpufreq: OMAP driver depends CPUfreq tables.) This patch remedies that. Apologies to Russell King for breaking his originally working patch. Also, thanks to Grazvydas Ignotas for reporting the same problem. Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-13Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparcLinus Torvalds2-8/+1
Pull sparc fixes from David Miller. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Eliminate obsolete __handle_softirq() function sparc64: Fix bootup crash on sun4v.
2012-04-13Merge tag 'hwmon-for-linus' of ↵Linus Torvalds4-24/+27
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon patches from Guenter Roeck: "Fix build warnings in four drivers" * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (pmbus_core) Fix compiler warning hwmon: (smsc47m1) Fix compiler warning hwmon: (acpi_power_meter) Fix compiler warning seen in some configurations hwmon: (smsc47b397) Fix compiler warning
2012-04-13Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds5-24/+21
Pull GPIO bug fixes from Grant Likely: "Miscellaneous bug fixes to GPIO drivers and for a corner case in the gpio device tree parsing code." * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6: gpio/exynos: Fix compiler warning in gpio-samsung.c file gpio: Fix range check in of_gpio_simple_xlate() gpio: Fix uninitialized variable bit in adp5588_irq_handler gpio/sodaville: Convert sodaville driver to new irqdomain API
2012-04-13Merge tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds4-8/+16
Pull SPI bug fixes from Grant Likely: "Miscellaneous driver bug fixes. No major changes in this branch." * tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6: spi/imx: prevent NULL pointer dereference in spi_imx_probe() spi/imx: mark base member in spi_imx_data as __iomem spi/mpc83xx: fix NULL pdata dereference bug spi/davinci: Fix DMA API usage in davinci spi/pL022: include types.h to remove compilation warnings
2012-04-13sparc64: Eliminate obsolete __handle_softirq() functionPaul E. McKenney1-7/+0
The invocation of softirq is now handled by irq_exit(), so there is no need for sparc64 to invoke it on the trap-return path. In fact, doing so is a bug because if the trap occurred in the idle loop, this invocation can result in lockdep-RCU failures. The problem is that RCU ignores idle CPUs, and the sparc64 trap-return path to the softirq handlers fails to tell RCU that the CPU must be considered non-idle while those handlers are executing. This means that RCU is ignoring any RCU read-side critical sections in those handlers, which in turn means that RCU-protected data can be yanked out from under those read-side critical sections. The shiny new lockdep-RCU ability to detect RCU read-side critical sections that RCU is ignoring located this problem. The fix is straightforward: Make sparc64 stop manually invoking the softirq handlers. Reported-by: Meelis Roos <mroos@linux.ee> Suggested-by: David Miller <davem@davemloft.net> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Tested-by: Meelis Roos <mroos@linux.ee> Cc: stable@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-13sparc64: Fix bootup crash on sun4v.David S. Miller1-1/+1
The DS driver registers as a subsys_initcall() but this can be too early, in particular this risks registering before we've had a chance to allocate and setup module_kset in kernel/params.c which is performed also as a subsyts_initcall(). Register DS using device_initcall() insteal. Signed-off-by: David S. Miller <davem@davemloft.net> Cc: stable@vger.kernel.org
2012-04-13lockd: fix the endianness bugAl Viro2-2/+2
comparing be32 values for < is not doing the right thing... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-13ARM: msm: Fix section mismatches in proc_comm.cDavid Brown1-1/+1
The change commit 4416e9eb0b4859b3d28016c5fd0a609bdcbc8a2a Author: Gregory Bean <gbean@codeaurora.org> Date: Wed Jul 28 10:22:12 2010 -0700 arm: msm: Fix section mismatch in smd.c. fixes a section mismatch between the board file and the smd driver's probe function, however, it misses the additional mismatches between the probe function and some routines it calls. Fix these up as well. Signed-off-by: David Brown <davidb@codeaurora.org>
2012-04-13video: msm: Fix section mismatches in mddi.cDavid Brown1-4/+4
The change commit 461cbe77d0a4f887c33a3a95ea68a7daf23b4302 Author: Gregory Bean <gbean@codeaurora.org> Date: Wed Jul 28 10:22:13 2010 -0700 video: msm: Fix section mismatch in mddi.c. fixes a section mismatch between the board file and the driver's probe function, however, it misses the additional mismatches between the probe function and some routines it calls. Fix these up as well. Signed-off-by: David Brown <davidb@codeaurora.org>
2012-04-13arm: msm: trout: fix compile failureDaniel Walker2-0/+2
Fixes the following warnings, arch/arm/mach-msm/board-trout.c: In function 'trout_init': arch/arm/mach-msm/board-trout.c:71: error: 'system_rev' undeclared (first use in this function) arch/arm/mach-msm/board-trout.c:71: error: (Each undeclared identifier is reported only once arch/arm/mach-msm/board-trout.c:71: error: for each function it appears in.) and arch/arm/mach-msm/board-trout-panel.c: In function 'trout_init_panel': arch/arm/mach-msm/board-trout-panel.c:267: error: 'system_rev' undeclared (first use in this function) arch/arm/mach-msm/board-trout-panel.c:267: error: (Each undeclared identifier is reported only once arch/arm/mach-msm/board-trout-panel.c:267: error: for each function it appears in.) This came in with the following commit 9f97da78bf018206fb623cd351d454af2f105fe0 which removes asm/system.h Signed-off-by: Daniel Walker <dwalker@fifo99.com> cc: David Howells <dhowells@redhat.com> cc: Bryan Huntsman <bryanh@codeaurora.org> cc: linux-arm-msm@vger.kernel.org cc: linux-arm-kernel@lists.infradead.org Signed-off-by: David Brown <davidb@codeaurora.org>
2012-04-13arm: msm: halibut: remove unneeded fixupDaniel Walker1-3/+0
This old fixup causes a build failure, so I remove it just like in trout. Signed-off-by: Daniel Walker <dwalker@fifo99.com> Signed-off-by: David Brown <davidb@codeaurora.org>
2012-04-13irq_work: fix compile failure on tile from missing includeChris Metcalf1-0/+1
Building with IRQ_WORK configured results in kernel/irq_work.c: In function ‘irq_work_run’: kernel/irq_work.c:110: error: implicit declaration of function ‘irqs_disabled’ The appropriate header just needs to be included. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-04-13ia64: populate the cmpxchg header with appropriate codePaul Gortmaker2-114/+148
commit 93f378883cecb9dcb2cf5b51d9d24175906659da "Fix ia64 build errors (fallout from system.h disintegration)" introduced arch/ia64/include/asm/cmpxchg.h as a temporary build fix and stated: "... leave the migration of xchg() and cmpxchg() to this new header file for a future patch." Migrate the appropriate chunks from asm/intrinsics.h and fix the whitespace issues in the migrated chunk. Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: David Howells <dhowells@redhat.com> Acked-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-04-13alpha: fix build failures from system.h dismembermentPaul Gortmaker3-69/+74
commit ec2212088c42ff7d1362629ec26dda4f3e8bdad3 "Disintegrate asm/system.h for Alpha" combined with commit b4816afa3986704d1404fc48e931da5135820472 "Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h" introduced the concept of asm/cmpxchg.h but the alpha arch never got one. Fork the cmpxchg content out of the asm/atomic.h file to create one. Some minor whitespace fixups were done on the block of code that created the new file. Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Cc: David Howells <dhowells@redhat.com> Acked-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-04-13ocfs2: ->e_leaf_clusters endianness breakageAl Viro1-2/+2
le16, not le32... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-13ocfs2: ->rl_count endianness breakageAl Viro1-1/+1
le16, not le32... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-13ocfs: ->rl_used breakage on big-endianAl Viro1-4/+4
it's le16, not le32 or le64... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-13ocfs2: ->l_next_free_req breakage on big-endianAl Viro2-3/+3
It's le16, not le32... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-13btrfs: btrfs_root_readonly() broken on big-endianAl Viro1-1/+1
->root_flags is __le64 and all accesses to it go through the helpers that do proper conversions. Except for btrfs_root_readonly(), which checks bit 0 as in host-endian... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-13Fix number parsing in cifs_parse_mount_optionsSachin Prabhu1-1/+1
The function kstrtoul() used to parse number strings in the mount option parser is set to expect a base 10 number . This treats the octal numbers passed for mount options such as file_mode as base10 numbers leading to incorrect behavior. Change the 'base' argument passed to kstrtoul from 10 to 0 to allow it to auto-detect the base of the number passed. Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Acked-by: Jeff Layton <jlayton@samba.org> Reported-by: Chris Clayton <chris2553@googlemail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2012-04-13ext4: fix endianness breakage in ext4_split_extent_at()Al Viro1-1/+1
->ee_len is __le16, so assigning cpu_to_le32() to it is going to do Bad Things(tm) on big-endian hosts... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-13nfsd: fix compose_entry_fh() failure exitsAl Viro1-14/+8
Restore the original logics ("fail on mountpoints, negatives and in case of fh_compose() failures"). Since commit 8177e (nfsd: clean up readdirplus encoding) that got broken - rv = fh_compose(fhp, exp, dchild, &cd->fh); if (rv) goto out; if (!dchild->d_inode) goto out; rv = 0; out: is equivalent to rv = fh_compose(fhp, exp, dchild, &cd->fh); out: and the second check has no effect whatsoever... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-13nfsd: fix error value on allocation failure in nfsd4_decode_test_stateid()Al Viro1-1/+1
PTR_ERR(NULL) is going to be 0... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-13nfsd: fix endianness breakage in TEST_STATEID handlingAl Viro1-1/+1
->ts_id_status gets nfs errno, i.e. it's already big-endian; no need to apply htonl() to it. Broken by commit 174568 (NFSD: Added TEST_STATEID operation) last year... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-13nfsd: fix error values returned by nfsd4_lockt() when nfsd_open() failsAl Viro1-14/+9
nfsd_open() already returns an NFS error value; only vfs_test_lock() result needs to be fed through nfserrno(). Broken by commit 55ef12 (nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT) three years ago... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-13nfsd: fix b0rken error value for setattr on read-only mountAl Viro1-3/+4
..._want_write() returns -EROFS on failure, _not_ an NFS error value. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-13ARM: 7383/1: nommu: populate vectors page from paging_initWill Deacon1-0/+2
Commit 94e5a85b ("ARM: earlier initialization of vectors page") made it the responsibility of paging_init to initialise the vectors page. This patch adds a call to early_trap_init for the !CONFIG_MMU case, placing the vectors at CONFIG_VECTORS_BASE. Cc: Jonathan Austin <jonathan.austin@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-04-13ARM: 7381/1: nommu: fix typo in mm/KconfigWill Deacon1-1/+1
The description for the CPU_HIGH_VECTOR Kconfig option for nommu builds doesn't make any sense. This patch fixes up the trivial grammatical error. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-04-13ARM: 7380/1: DT: do not add a zero-sized memory propertyMarc Zyngier1-0/+2
Some bootloaders are broken enough to expose an ATAG_MEM with a null size. Converting such tag to a memory node leads to an unbootable system. Skip over zero sized ATAG_MEM to avoid this situation. Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-04-13ARM: 7379/1: DT: fix atags_to_fdt() second call siteMarc Zyngier1-1/+1
atags_to_fdt() returns 1 when it fails to find a valid FDT signature. The CONFIG_ARM_ATAG_DTB_COMPAT code is supposed to retry with another location, but only does so when the initial call doesn't fail. Fix this by using the correct condition in the assembly code. Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Cc: stable@vger.kernel.org Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-04-13ARM: 7366/3: amba: Remove AMBA level regulator supportMark Brown4-50/+2
The AMBA bus regulator support is being used to model on/off switches for power domains which isn't terribly idiomatic for modern kernels with the generic power domain code and creates integration problems on platforms which don't use regulators for their power domains as it's hard to tell the difference between a regulator that is needed but failed to be provided and one that isn't supposed to be there (though DT does make that easier). Platforms that wish to use the regulator API to manage their power domains can indirect via the power domain interface. This feature is only used with the vape supply of the db8500 PRCMU driver which supplies the UARTs and MMC controllers, none of which have support for managing vcore at runtime in mainline (only pl022 SPI controller does). Update that supply to have an always_on constraint until the power domain support for the system is updated so that it is enabled for these users, this is likely to have no impact on practical systems as probably at least one of these devices will be active and cause AMBA to hold the supply on anyway. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-04-13Merge tag 'perf-urgent-for-mingo' of ↵Ingo Molnar7-13/+68
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull various perf tooling fixes from Arnaldo Carvalho de Melo.
2012-04-13ALSA: hda/realtek - Fix mem leak (and rid us of trailing whitespace).Jesper Juhl1-7/+9
In sound/pci/hda/patch_realtek.c::alc_auto_fill_dac_nids(), in the 'for (;;)' loop, if the 'badness' value returned from fill_and_eval_dacs() is negative, then we'll return from the function without freeing the memory we allocated for 'best_cfg', thus leaking. Fix the leak by kfree()'ing the memory when badness is negative. While I was there I also noticed some trailing whitespace in the function that I removed (along with all other trailing whitespace in the file) - it didn't seem worth-while to do that as two patches, so I hope it's OK that I just did it all as one patch. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-12Merge tag 'srpt-srq-type' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband Pull infiniband fix from Roland Dreier: "Add a fix for a bug hit by Alexey Shvetsov in ib_srtp that hits on non-mlx4 hardware." * tag 'srpt-srq-type' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/srpt: Set srq_type to IB_SRQT_BASIC
2012-04-12kconfig: delete last traces of __enabled_ from autoconf.hPaul Gortmaker1-11/+0
We've now fixed IS_ENABLED() and friends to not require any special "__enabled_" prefixed versions of the normal Kconfig options, so delete the last traces of them being generated. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12Revert "kconfig: fix __enabled_ macros definition for invisible and ↵Paul Gortmaker1-36/+13
un-selected symbols" This reverts commit 953742c8fe8ac45be453fee959d7be40cd89f920. Dumping two lines into autoconf.h for all existing Kconfig options results in a giant file (~16k lines) we have to process each time we compile something. We've weaned IS_ENABLED() and similar off of requiring the __enabled_ definitions so now we can revert the change which caused all the extra lines. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12kconfig: fix IS_ENABLED to not require all options to be definedPaul Gortmaker1-4/+18
Using IS_ENABLED() within C (vs. within CPP #if statements) in its current form requires us to actually define every possible bool/tristate Kconfig option twice (__enabled_* and __enabled_*_MODULE variants). This results in a huge autoconf.h file, on the order of 16k lines for a x86_64 defconfig. Fixing IS_ENABLED to be able to work on the smaller subset of just things that we really have defined is step one to fixing this. Which means it has to not choke when fed non-enabled options, such as: include/linux/netdevice.h:964:1: warning: "__enabled_CONFIG_FCOE_MODULE" is not defined [-Wundef] The original prototype of how to implement a C and preprocessor compatible way of doing this came from the Google+ user "comex ." in response to Linus' crowdsourcing challenge for a possible improvement on his earlier C specific solution: #define config_enabled(x) (__stringify(x)[0] == '1') In this implementation, I've chosen variable names that hopefully make how it works more understandable. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12Btrfs: use commit root when loading free space cacheJosef Bacik2-10/+3
A user reported that booting his box up with btrfs root on 3.4 was way slower than on 3.3 because I removed the ideal caching code. It turns out that we don't load the free space cache if we're in a commit for deadlock reasons, but since we're reading the cache and it hasn't changed yet we are safe reading the inode and free space item from the commit root, so do that and remove all of the deadlock checks so we don't unnecessarily skip loading the free space cache. The user reported this fixed the slowness. Thanks, Tested-by: Calvin Walton <calvin.walton@kepstin.ca> Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2012-04-12Merge tag 'usb-3.4-rc2' of ↵Linus Torvalds32-118/+216
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a number of fixes for the USB core and drivers for 3.4-rc2 Lots of tiny xhci fixes here, a few usb-serial driver fixes and new device ids, and a smattering of other minor fixes in different USB drivers. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'usb-3.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (30 commits) USB: update usbtmc api documentation xHCI: Correct the #define XHCI_LEGACY_DISABLE_SMI xHCI: use gfp flags from caller instead of GFP_ATOMIC xHCI: add XHCI_RESET_ON_RESUME quirk for VIA xHCI host USB: fix bug of device descriptor got from superspeed device xhci: Fix register save/restore order. xhci: Restore event ring dequeue pointer on resume. xhci: Don't write zeroed pointers to xHC registers. xhci: Warn when hosts don't halt. xhci: don't re-enable IE constantly usb: xhci: fix section mismatch in linux-next xHCI: correct to print the true HSEE of USBCMD USB: serial: fix race between probe and open UHCI: hub_status_data should indicate if ports are resuming EHCI: keep track of ports being resumed and indicate in hub_status_data USB: fix race between root-hub suspend and remote wakeup USB: sierra: add support for Sierra Wireless MC7710 USB: ftdi_sio: fix race condition in TIOCMIWAIT, and abort of TIOCMIWAIT when the device is removed USB: ftdi_sio: fix status line change handling for TIOCMIWAIT and TIOCGICOUNT USB: don't ignore suspend errors for root hubs ...
2012-04-12Merge tag 'tty-3.4-rc2' of ↵Linus Torvalds13-57/+52
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty and serial fixes from Greg KH: "Here are some tty and serial fixes for 3.4-rc2. Most important here is the pl011 fix, which has been reported by about 100 different people, which means more people use it than I expected :) There are also some 8250 driver reverts due to some problems reported by them. And other minor fixes as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'tty-3.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: pch_uart: Add Kontron COMe-mTT10 uart clock quirk pch_uart: Fix MSI setting issue serial/8250_pci: add a "force background timer" flag and use it for the "kt" serial port Revert "serial/8250_pci: setup-quirk workaround for the kt serial controller" Revert "serial/8250_pci: init-quirk msi support for kt serial controller" tty/serial/omap: console can only be built-in serial: samsung: fix omission initialize ulcon in reset port fn() printk(): add KERN_CONT where needed in hpet and vt code tty/serial: atmel_serial: fix RS485 half-duplex problem tty: serial: altera_uart: Check for NULL platform_data in probe. isdn/gigaset: use gig_dbg() for debugging output omap-serial: Fix the error handling in the omap_serial probe serial: PL011: move interrupt clearing
2012-04-12Merge tag 'staging-3.4-rc2' of ↵Linus Torvalds23-57/+105
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging tree fixes from Greg KH: "Here are a number of bugfixes for the drivers/staging/ portion of the kernel that have been reported recently. Nothing major here, with maybe the exception of the ramster code can now be built so it is enabled in the build again, and lots of memory leaks that people like to have fixed on their systems. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'staging-3.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: android: fix mem leaks in __persistent_ram_init() staging: vt6656: Don't leak memory in drivers/staging/vt6656/ioctl.c::private_ioctl() staging: iio: hmc5843: Fix crash in probe function. staging/xgifb: fix display on XGI Volari Z11m cards Staging: android: timed_gpio: Fix resource leak in timed_gpio_probe error paths android: make persistent_ram based drivers depend on HAVE_MEMBLOCK staging: iio: ak8975: Remove i2c client data corruption staging: drm/omap: move where DMM driver is registered staging: zsmalloc: fix memory leak Staging: rts_pstor: off by one in for loop staging: ozwpan: Added new maintainer for ozwpan staging:rts_pstor:Avoid "Bad target number" message when probing driver staging:rts_pstor:Fix possible panic by NULL pointer dereference Staging: vt6655-6: check keysize before memcpy() staging/media/as102: Don't call release_firmware() on uninitialized variable staging:iio:core add missing increment of loop index in iio_map_array_unregister() staging: ramster: unbreak my heart staging/vme: Fix module parameters staging: sep: Fix sign of error
2012-04-12Merge tag 'driver-core-3.4-rc2' of ↵Linus Torvalds4-12/+17
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core and kobject fixes from Greg KH: "Here are some minor fixes for the driver core and kobjects that people have reported recently. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'driver-core-3.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: kobject: provide more diagnostic info for kobject_add_internal() failures sysfs: handle 'parent deleted before child added' sysfs: Prevent crash on unset sysfs group attributes sysfs: Update the name hash for an entry after changing the namespace drivers/base: fix compiler warning in SoC export driver - idr should be ida drivers/base: Remove unneeded spin_lock_init call for soc_lock
2012-04-12Merge tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds1-1/+2
Pull a fix for the recent irqdomain bug fixes from Grant Likely: "I flubbed one patch in the last pull request which broke a format string on 64 bit platforms. Here's the fix." * tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6: irq_domain: fix type mismatch in debugfs output format
2012-04-12irq_domain: fix type mismatch in debugfs output formatGrant Likely1-1/+2
sizeof(void*) returns an unsigned long, but it was being used as a width parameter to a "%-*s" format string which requires an int. On 64 bit platforms this causes a type mismatch: linux/kernel/irq/irqdomain.c:575: warning: field width should have type 'int', but argument 6 has type 'long unsigned int' This change casts the size to an int so printf gets the right data type. Reported-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: David Daney <david.daney@cavium.com>
2012-04-12Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull trivial perf build failure fix from Thomas Gleixner. * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf tools: Fix getrusage() related build failure on glibc trunk
2012-04-12Merge branch 'timers-urgent-for-linus' of ↵Linus Torvalds7-27/+59
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "The itimer removal one is not strictly a fix, but I really wanted to avoid a rebase of the urgent ones." * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "clocksource: Load the ACPI PM clocksource asynchronously" clockevents: tTack broadcast device mode change in tick_broadcast_switch_to_oneshot() itimer: Use printk_once instead of WARN_ONCE nohz: Fix stale jiffies update in tick_nohz_restart() tick: Document TICK_ONESHOT config option proc: stats: Use arch_idle_time for idle and iowait times if available itimer: Schedule silent NULL pointer fixup in setitimer() for removal
2012-04-12Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds2-5/+5
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner. * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Use correct byte-sized register constraint in __add() x86: Use correct byte-sized register constraint in __xchg_op() x86: vsyscall: Use NULL instead 0 for a pointer argument
2012-04-12staging: android: fix mem leaks in __persistent_ram_init()Jesper Juhl1-4/+7
If, in __persistent_ram_init(), the call to persistent_ram_buffer_init() fails or the call to persistent_ram_init_ecc() fails then we fail to free the memory we allocated to 'prz' with kzalloc() - thus leaking it. To prevent the leaks I consolidated all error exits from the function at a 'err:' label at the end and made all error cases jump to that label where we can then make sure we always free 'prz'. This is safe since all the situations where the code bails out happen before 'prz' has been stored anywhere and although we'll do a redundant kfree(NULL) call in the case of kzalloc() itself failing that's OK since kfree() deals gracefully with NULL pointers and I felt it was more important to keep all error exits at a single location than to avoid that one harmless/redundant kfree() on a error path. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Colin Cross <ccross@android.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-12staging: vt6656: Don't leak memory in ↵Jesper Juhl1-1/+2
drivers/staging/vt6656/ioctl.c::private_ioctl() If copy_to_user() fails in the WLAN_CMD_GET_NODE_LIST case of the switch in drivers/staging/vt6656/ioctl.c::private_ioctl() we'll leak the memory allocated to 'pNodeList'. Fix that by kfree'ing the memory in the failure case. Also remove a pointless cast (to type 'PSNodeList') of a kmalloc() return value - kmalloc() returns a void pointer that is implicitly converted, so there is no need for an explicit cast. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-12staging: iio: hmc5843: Fix crash in probe function.Marek Belisko1-1/+3
Fix crash after issuing: echo hmc5843 0x1e > /sys/class/i2c-dev/i2c-2/device/new_device [ 37.180999] device: '2-001e': device_add [ 37.188293] bus: 'i2c': add device 2-001e [ 37.194549] PM: Adding info for i2c:2-001e [ 37.200958] bus: 'i2c': driver_probe_device: matched device 2-001e with driver hmc5843 [ 37.210815] bus: 'i2c': really_probe: probing driver hmc5843 with device 2-001e [ 37.224884] HMC5843 initialized [ 37.228759] ------------[ cut here ]------------ [ 37.233612] kernel BUG at mm/slab.c:505! [ 37.237701] Internal error: Oops - BUG: 0 [#1] PREEMPT [ 37.243103] Modules linked in: [ 37.246337] CPU: 0 Not tainted (3.3.1-gta04+ #28) [ 37.251647] PC is at kfree+0x84/0x144 [ 37.255493] LR is at kfree+0x20/0x144 [ 37.259338] pc : [<c00b408c>] lr : [<c00b4028>] psr: 40000093 [ 37.259368] sp : de249cd8 ip : 0000000c fp : 00000090 [ 37.271362] r10: 0000000a r9 : de229eac r8 : c0236274 [ 37.276855] r7 : c09d6490 r6 : a0000013 r5 : de229c00 r4 : de229c10 [ 37.283691] r3 : c0f00218 r2 : 00000400 r1 : c0eea000 r0 : c00b4028 [ 37.290527] Flags: nZcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user [ 37.298095] Control: 10c5387d Table: 9e1d0019 DAC: 00000015 [ 37.304107] Process sh (pid: 91, stack limit = 0xde2482f0) [ 37.309844] Stack: (0xde249cd8 to 0xde24a000) [ 37.314422] 9cc0: de229c10 de229c00 [ 37.322998] 9ce0: de229c10 ffffffea 00000005 c0236274 de140a80 c00b4798 dec00080 de140a80 [ 37.331573] 9d00: c032f37c dec00080 000080d0 00000001 de229c00 de229c10 c048d578 00000005 [ 37.340148] 9d20: de229eac 0000000a 00000090 c032fa40 00000001 00000000 00000001 de229c10 [ 37.348724] 9d40: de229eac 00000029 c075b558 00000001 00000003 00000004 de229c10 c048d594 [ 37.357299] 9d60: 00000000 60000013 00000018 205b0007 37332020 3432322e 5d343838 c0060020 [ 37.365905] 9d80: de251600 00000001 00000000 de251600 00000001 c0065a84 de229c00 de229c48 [ 37.374481] 9da0: 00000006 0048d62c de229c38 de229c00 de229c00 de1f6c00 de1f6c20 00000001 [ 37.383056] 9dc0: 00000000 c048d62c 00000000 de229c00 de229c00 de1f6c00 de1f6c20 00000001 [ 37.391632] 9de0: 00000000 c048d62c 00000000 c0330164 00000000 de1f6c20 c048d62c de1f6c00 [ 37.400207] 9e00: c0330078 de1f6c04 c078d714 de189b58 00000000 c02ccfd8 de1f6c20 c0795f40 [ 37.408782] 9e20: c0238330 00000000 00000000 c02381a8 de1b9fc0 de1f6c20 de1f6c20 de249e48 [ 37.417358] 9e40: c0238330 c0236bb0 decdbed8 de7d0f14 de1f6c20 de1f6c20 de1f6c54 de1f6c20 [ 37.425933] 9e60: 00000000 c0238030 de1f6c20 c078d7bc de1f6c20 c02377ec de1f6c20 de1f6c28 [ 37.434509] 9e80: dee64cb0 c0236138 c047c554 de189b58 00000000 c004b45c de1f6c20 de1f6cd8 [ 37.443084] 9ea0: c0edfa6c de1f6c00 dee64c68 de1f6c04 de1f6c20 dee64cb8 c047c554 de189b58 [ 37.451690] 9ec0: 00000000 c02cd634 dee64c68 de249ef4 de23b008 dee64cb0 0000000d de23b000 [ 37.460266] 9ee0: de23b007 c02cd78c 00000002 00000000 00000000 35636d68 00333438 00000000 [ 37.468841] 9f00: 00000000 00000000 001e0000 00000000 00000000 00000000 00000000 0a10cec0 [ 37.477416] 9f20: 00000002 de249f80 0000000d dee62990 de189b40 c0234d88 0000000d c010c354 [ 37.485992] 9f40: 0000000d de210f28 000acc88 de249f80 0000000d de248000 00000000 c00b7bf8 [ 37.494567] 9f60: de210f28 000acc88 de210f28 000acc88 00000000 00000000 0000000d c00b7ed8 [ 37.503143] 9f80: 00000000 00000000 0000000d 00000000 0007fa28 0000000d 000acc88 00000004 [ 37.511718] 9fa0: c000e544 c000e380 0007fa28 0000000d 00000001 000acc88 0000000d 00000000 [ 37.520294] 9fc0: 0007fa28 0000000d 000acc88 00000004 00000001 00000020 00000002 00000000 [ 37.528869] 9fe0: 00000000 beab8624 0000ea05 b6eaebac 600d0010 00000001 00000000 00000000 [ 37.537475] [<c00b408c>] (kfree+0x84/0x144) from [<c0236274>] (device_add+0x530/0x57c) [ 37.545806] [<c0236274>] (device_add+0x530/0x57c) from [<c032fa40>] (iio_device_register+0x8c8/0x990) [ 37.555480] [<c032fa40>] (iio_device_register+0x8c8/0x990) from [<c0330164>] (hmc5843_probe+0xec/0x114) [ 37.565338] [<c0330164>] (hmc5843_probe+0xec/0x114) from [<c02ccfd8>] (i2c_device_probe+0xc4/0xf8) [ 37.574737] [<c02ccfd8>] (i2c_device_probe+0xc4/0xf8) from [<c02381a8>] (driver_probe_device+0x118/0x218) [ 37.584777] [<c02381a8>] (driver_probe_device+0x118/0x218) from [<c0236bb0>] (bus_for_each_drv+0x4c/0x84) [ 37.594818] [<c0236bb0>] (bus_for_each_drv+0x4c/0x84) from [<c0238030>] (device_attach+0x78/0xa4) [ 37.604125] [<c0238030>] (device_attach+0x78/0xa4) from [<c02377ec>] (bus_probe_device+0x28/0x9c) [ 37.613433] [<c02377ec>] (bus_probe_device+0x28/0x9c) from [<c0236138>] (device_add+0x3f4/0x57c) [ 37.622650] [<c0236138>] (device_add+0x3f4/0x57c) from [<c02cd634>] (i2c_new_device+0xf8/0x19c) [ 37.631805] [<c02cd634>] (i2c_new_device+0xf8/0x19c) from [<c02cd78c>] (i2c_sysfs_new_device+0xb4/0x130) [ 37.641754] [<c02cd78c>] (i2c_sysfs_new_device+0xb4/0x130) from [<c0234d88>] (dev_attr_store+0x18/0x24) [ 37.651611] [<c0234d88>] (dev_attr_store+0x18/0x24) from [<c010c354>] (sysfs_write_file+0x10c/0x140) [ 37.661193] [<c010c354>] (sysfs_write_file+0x10c/0x140) from [<c00b7bf8>] (vfs_write+0xb0/0x178) [ 37.670410] [<c00b7bf8>] (vfs_write+0xb0/0x178) from [<c00b7ed8>] (sys_write+0x3c/0x68) [ 37.678833] [<c00b7ed8>] (sys_write+0x3c/0x68) from [<c000e380>] (ret_fast_syscall+0x0/0x3c) [ 37.687683] Code: 1593301c e5932000 e3120080 1a000000 (e7f001f2) [ 37.700775] ---[ end trace aaf805debdb69390 ]--- Client data was assigned to iio_dev structure in probe but in hmc5843_init_client function casted to private driver data structure which is wrong. Possibly calling mutex_init(&data->lock); corrupt data which the lead to above crash. Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Cc: stable <stable@vger.kernel.org> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-12Merge branch 'akpm' (Andrew's patch-bomb)Linus Torvalds12-33/+105
Merge fixes from Andrew Morton. * emailed from Andrew Morton <akpm@linux-foundation.org>: (14 patches) panic: fix stack dump print on direct call to panic() drivers/rtc/rtc-pl031.c: enable clock on all ST variants Revert "mm: vmscan: fix misused nr_reclaimed in shrink_mem_cgroup_zone()" hugetlb: fix race condition in hugetlb_fault() drivers/rtc/rtc-twl.c: use static register while reading time drivers/rtc/rtc-s3c.c: add placeholder for driver private data drivers/rtc/rtc-s3c.c: fix compilation error MAINTAINERS: add PCDP console maintainer memcg: do not open code accesses to res_counter members drivers/rtc/rtc-efi.c: fix section mismatch warning drivers/rtc/rtc-r9701.c: reset registers if invalid values are detected drivers/char/random.c: fix boot id uniqueness race memcg: fix broken boolen expression memcg: fix up documentation on global LRU
2012-04-12Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds37-194/+160
Pull networking fixes from David Miller: 1) Fix bluetooth userland regression reported by Keith Packard, from Gustavo Padovan. 2) Revert ath9k PS idle change, from Sujith Manoharan. 3) Correct default TCP memory limits (again), from Eric Dumazet. 4) Fix tcp_rcv_rtt_update() accidental use of unscaled RTT, from Neal Cardwell. 5) We made a facility for layers like wireless to say how much tailroom they need in the SKB for link layer stuff such as wireless encryption etc., but TCP works hard to fill every SKB out to the end defeating this specification. This leads to every TCP packet getting reallocated by the wireless code in order to have the right amount of tailroom available. Fix TCP to only fill SKBs out to the real amount of data area it asked for during the allocation, this way it won't eat into the slack added for the device's tailroom needs. Reported by Marc Merlin and fixed by Eric Dumazet. 6) Leaks, endian bugs, and new device IDs in bluetooth from Santosh Nayak, João Paulo Rechi Vita, Cho, Yu-Chen, Andrei Emeltchenko, AceLan Kao, and Andrei Emeltchenko. 7) OOPS on tty_close fix in bluetooth's hci_ldisc from Johan Hovold. 8) netfilter erroneously scales TCP window twice, fix from Changli Gao. 9) Memleak fix in wext-core from Julia Lawall. 10) Consistently handle invalid TCP packets in ipv4 vs. ipv6 conntrack, from Jozsef Kadlecsik. 11) Validate IP header length properly in netfilter conntrack's ipv4_get_l4proto(). * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (39 commits) NFC: Fix the LLCP Tx fragmentation loop rtlwifi: Add missing DMA buffer unmapping for PCI drivers rtlwifi: Preallocate USB read buffers and eliminate kalloc in read routine tcp: avoid order-1 allocations on wifi and tx path net: allow pskb_expand_head() to get maximum tailroom bridge: Do not send queries on multicast group leaves MAINTAINERS: Mark NATSEMI driver as orphan'd. tcp: fix tcp_rcv_rtt_update() use of an unscaled RTT sample tcp: restore correct limit Revert "ath9k: fix going to full-sleep on PS idle" rt2x00: Fix rfkill_polling register function. bcma: fix build error on MIPS; implicit pcibios_enable_device netfilter: nf_conntrack: fix incorrect logic in nf_conntrack_init_net netfilter: nf_ct_ipv4: packets with wrong ihl are invalid netfilter: nf_ct_ipv4: handle invalid IPv4 and IPv6 packets consistently net/wireless/wext-core.c: add missing kfree rtlwifi: Fix oops on rate-control failure mac80211: Convert WARN_ON to WARN_ON_ONCE rtlwifi: rtl8192de: Fix firmware initialization nl80211: ensure interface is up in various APIs ...
2012-04-12Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds31-254/+325
Pull drm fixes from Dave Airlie: "Mostly exynos and intel. Intel has 3 regression fixers (more info in intel merge commit), along with some other make hw work fixes, exynos has some cleanups and an ioctl fix. A couple of radeon fixes, couple of build fixes, and a savage userspace interface possible overflow fix." * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (23 commits) drm/exynos: fixed exynos broken ioctl drm/i915: clear fencing tracking state when retiring requests drm/exynos: fix to pointer manager member of struct exynos_drm_subdrv drm/exynos: fix struct for operation callback functions to driver name drm/exynos: use define instead of default_win member in struct mixer_context drm/exynos: rename s/HDMI_OVERLAY_NUMBER/MIXER_WIN_NR drm/exynos: remove unused codes in hdmi and mixer drm/exynos: remove unnecessary type conversion of hdmi and mixer drm/i915: make rc6 module parameter read-only drm/i915: implement ColorBlt w/a drm/i915/ringbuffer: Exclude last 2 cachlines of ring on 845g Revert "drm/i915: reenable gmbus on gen3+ again" drm/radeon: only add the mm i2c bus if the hw_i2c module param is set vgaarb.h: fix build warnings drm/i915: properly compute dp dithering for user-created modes drm/radeon/kms: fix DVO setup on some r4xx chips drm/savage: fix integer overflows in savage_bci_cmdbuf() drm/radeon: replace udelay with mdelay for long timeouts drm/i915: Finish any pending operations on the framebuffer before disabling drm/i915: Removed IVB forced enable of sprite dest key. ...
2012-04-12Merge tag 'md-3.4-fixes' of git://neil.brown.name/mdLinus Torvalds3-6/+6
Pull a few more fixes for md from NeilBrown: "Two are tagged for -stable. They can cause an oops, but very rarely." * tag 'md-3.4-fixes' of git://neil.brown.name/md: md/bitmap: prevent bitmap_daemon_work running while initialising bitmap md/raid1,raid10: Fix calculation of 'vcnt' when processing error recovery. MD: Bitmap version cleanup.
2012-04-12panic: fix stack dump print on direct call to panic()Jason Wessel1-1/+1
Commit 6e6f0a1f0fa6 ("panic: don't print redundant backtraces on oops") causes a regression where no stack trace will be printed at all for the case where kernel code calls panic() directly while not processing an oops, and of course there are 100's of instances of this type of call. The original commit executed the check (!oops_in_progress), but this will always be false because just before the dump_stack() there is a call to bust_spinlocks(1), which does the following: void __attribute__((weak)) bust_spinlocks(int yes) { if (yes) { ++oops_in_progress; The proper way to resolve the problem that original commit tried to solve is to avoid printing a stack dump from panic() when the either of the following conditions is true: 1) TAINT_DIE has been set (this is done by oops_end()) This indicates and oops has already been printed. 2) oops_in_progress > 1 This guards against the rare case where panic() is invoked a second time, or in between oops_begin() and oops_end() Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: <stable@vger.kernel.org> [3.3+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12drivers/rtc/rtc-pl031.c: enable clock on all ST variantsLinus Walleij1-2/+1
The ST variants of the PL031 all require bit 26 in the control register to be set before they work properly. Discovered this when testing on the Nomadik board where it would suprisingly just stand still. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Cc: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Cc: Alessandro Rubini <rubini@unipv.it> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12Revert "mm: vmscan: fix misused nr_reclaimed in shrink_mem_cgroup_zone()"Ying Han1-6/+1
This reverts commit c38446cc65e1f2b3eb8630c53943b94c4f65f670. Before the commit, the code makes senses to me but not after the commit. The "nr_reclaimed" is the number of pages reclaimed by scanning through the memcg's lru lists. The "nr_to_reclaim" is the target value for the whole function. For example, we like to early break the reclaim if reclaimed 32 pages under direct reclaim (not DEF_PRIORITY). After the reverted commit, the target "nr_to_reclaim" is decremented each time by "nr_reclaimed" but we still use it to compare the "nr_reclaimed". It just doesn't make sense to me... Signed-off-by: Ying Han <yinghan@google.com> Acked-by: Hugh Dickins <hughd@google.com> Cc: Rik van Riel <riel@redhat.com> Cc: Hillf Danton <dhillf@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12hugetlb: fix race condition in hugetlb_fault()Chris Metcalf1-0/+2
The race is as follows: Suppose a multi-threaded task forks a new process (on cpu A), thus bumping up the ref count on all the pages. While the fork is occurring (and thus we have marked all the PTEs as read-only), another thread in the original process (on cpu B) tries to write to a huge page, taking an access violation from the write-protect and calling hugetlb_cow(). Now, suppose the fork() fails. It will undo the COW and decrement the ref count on the pages, so the ref count on the huge page drops back to 1. Meanwhile hugetlb_cow() also decrements the ref count by one on the original page, since the original address space doesn't need it any more, having copied a new page to replace the original page. This leaves the ref count at zero, and when we call unlock_page(), we panic. fork on CPU A fault on CPU B ============= ============== ... down_write(&parent->mmap_sem); down_write_nested(&child->mmap_sem); ... while duplicating vmas if error break; ... up_write(&child->mmap_sem); up_write(&parent->mmap_sem); ... down_read(&parent->mmap_sem); ... lock_page(page); handle COW page_mapcount(old_page) == 2 alloc and prepare new_page ... handle error page_remove_rmap(page); put_page(page); ... fold new_page into pte page_remove_rmap(page); put_page(page); ... oops ==> unlock_page(page); up_read(&parent->mmap_sem); The solution is to take an extra reference to the page while we are holding the lock on it. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Cc: Hillf Danton <dhillf@gmail.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Hugh Dickins <hughd@google.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12drivers/rtc/rtc-twl.c: use static register while reading timeKonstantin Shlyakhovoy1-5/+38
RTC stores time and date in several registers. Due to the fact that these registers can't be read instantaneously, there is a chance that reading from counting registers gives an error of one minute, one hour, one day, etc. To address this issue, the RTC has hardware support to copy the RTC counting registers to static shadowed registers. The current implementation does not use this feature, and in a stress test, we can reproduce this error at a rate of around two times per 300000 readings. Fix the implementation to ensure that the right snapshot of time is captured. Signed-off-by: Konstantin Shlyakhovoy <x0155534@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Benoit Cousson <b-cousson@ti.com> Cc: linux-omap <linux-omap@vger.kernel.org> Acked-by: Mykola Oleksiienko <x0174904@ti.com> Acked-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com> Acked-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12drivers/rtc/rtc-s3c.c: add placeholder for driver private dataTushar Behera1-5/+18
Driver data field is a pointer, hence assigning that to an integer results in compilation warnings. Fixes following compilation warnings: drivers/rtc/rtc-s3c.c: In function `s3c_rtc_get_driver_data': drivers/rtc/rtc-s3c.c:452:3: warning: return makes integer from pointer without a cast [enabled by default] drivers/rtc/rtc-s3c.c: At top level: drivers/rtc/rtc-s3c.c:674:3: warning: initialization makes pointer from integer without a cast [enabled by default] drivers/rtc/rtc-s3c.c:674:3: warning: (near initialization for `s3c_rtc_dt_match[1].data') [enabled by default] drivers/rtc/rtc-s3c.c:677:3: warning: initialization makes pointer from integer without a cast [enabled by default] drivers/rtc/rtc-s3c.c:677:3: warning: (near initialization for `s3c_rtc_dt_match[2].data') [enabled by default] drivers/rtc/rtc-s3c.c:680:3: warning: initialization makes pointer from integer without a cast [enabled by default] drivers/rtc/rtc-s3c.c:680:3: warning: (near initialization for `s3c_rtc_dt_match[3].data') [enabled by default] Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12drivers/rtc/rtc-s3c.c: fix compilation errorTushar Behera1-4/+4
Fix this error: drivers/rtc/rtc-s3c.c: At top level: drivers/rtc/rtc-s3c.c:671:3: error: request for member `data' in something not a structure or union drivers/rtc/rtc-s3c.c:674:3: error: request for member `data' in something not a structure or union drivers/rtc/rtc-s3c.c:677:3: error: request for member `data' in something not a structure or union drivers/rtc/rtc-s3c.c:680:3: error: request for member `data' in something not a structure or union Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12MAINTAINERS: add PCDP console maintainerKhalid Aziz1-0/+5
Add missing maintainer info for PCDP console code. Signed-off-by: Khalid Aziz <khalid.aziz@hp.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12memcg: do not open code accesses to res_counter membersGlauber Costa1-2/+2
We should use the accessor res_counter_read_u64 for that. Although a purely cosmetic change is sometimes better delayed, to avoid conflicting with other people's work, we are starting to have people touching this code as well, and reproducing the open code behavior because that's the standard =) Time to fix it, then. Signed-off-by: Glauber Costa <glommer@parallels.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Michal Hocko <mhocko@suse.cz> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12drivers/rtc/rtc-efi.c: fix section mismatch warningJan Beulich1-1/+0
efi_rtc_init() uses platform_driver_probe(), so there's no need to also set efi_rtc_driver's probe member (as it won't be used anyway). This fixes a modpost section mismatch warning (as efi_rtc_probe() validly is __init). Signed-off-by: Jan Beulich <jbeulich@suse.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12drivers/rtc/rtc-r9701.c: reset registers if invalid values are detectedAndreas Dumberger1-0/+22
hwclock refuses to set date/time if RTC registers contain invalid values. Check the date/time register values at probe time and initialize them to make hwclock happy. Signed-off-by: Andreas Dumberger <andreas.dumberger@tqs.de> Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12drivers/char/random.c: fix boot id uniqueness raceMathieu Desnoyers1-3/+8
/proc/sys/kernel/random/boot_id can be read concurrently by userspace processes. If two (or more) user-space processes concurrently read boot_id when sysctl_bootid is not yet assigned, a race can occur making boot_id differ between the reads. Because the whole point of the boot id is to be unique across a kernel execution, fix this by protecting this operation with a spinlock. Given that this operation is not frequently used, hitting the spinlock on each call should not be an issue. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Matt Mackall <mpm@selenic.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Greg Kroah-Hartman <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12memcg: fix broken boolen expressionKirill A. Shutemov1-1/+1
action != CPU_DEAD || action != CPU_DEAD_FROZEN is always true. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12memcg: fix up documentation on global LRUYing Han1-3/+2
In v3.3-rc1, the global LRU was removed in commit 925b7673cce3 ("mm: make per-memcg LRU lists exclusive"). The patch fixes up the memcg docs. I left the swap session to someone who has better understanding of 'memory+swap'. Signed-off-by: Ying Han <yinghan@google.com> Acked-by: Michal Hocko <mhocko@suse.cz> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12Btrfs: fix use-after-free in __btrfs_end_transactionDave Jones1-4/+5
49b25e0540904be0bf558b84475c69d72e4de66e introduced a use-after-free bug that caused spurious -EIO's to be returned. Do the check before we free the transaction. Cc: David Sterba <dsterba@suse.cz> Cc: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2012-04-12Btrfs: check return value of bio_alloc() properlyTsutomu Itoh3-0/+10
bio_alloc() has the possibility of returning NULL. So, it is necessary to check the return value. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2012-04-12Btrfs: remove lock assert from get_restripe_target()Ilya Dryomov1-3/+2
This fixes a regression introduced by fc67c450. spin_is_locked() always returns 0 on UP kernels, which caused assert in get_restripe_target() to be fired on every call from btrfs_reduce_alloc_profile() on UP systems. Remove it completely for now, it's not clear if it's going to be needed in future. Reported-by: Bobby Powers <bobbypowers@gmail.com> Reported-by: Mitch Harder <mitch.harder@sabayonlinux.org> Tested-by: Mitch Harder <mitch.harder@sabayonlinux.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2012-04-12Btrfs: fix eof while discarding extentsLiu Bo1-2/+18
We miscalculate the length of extents we're discarding, and it leads to an eof of device. Reported-by: Daniel Blueman <daniel@quora.org> Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2012-04-12Btrfs: fix uninit variable in repair_eb_io_failureChris Mason1-1/+1
We'd have to be passing bogus extent buffers for this uninit variable to actually be used, but set it to zero just in case. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2012-04-12Merge tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds13-69/+36
Pull irqdomain bug fixes from Grant Likely: "This branch fixes a bug in irq_create_mapping() where an error return from irq_alloc_desc_from() gets ignored. It also removes irq_virq_count to fix a bug on powerpc where the irqdomain code does not find irqs allocated above the CONFIG_NR_IRQS boundary. The remaining patches get rid of an completely pointless export and fix some minor bugs in the irqdomain debug output." * tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6: irq_domain: Move irq_virq_count into NOMAP revmap irqdomain: Fix debugfs formatting irq_domain: correct the debugfs file name irq: Kill pointless irqd_to_hw export irq/irq_domain: Quit ignoring error returns from irq_alloc_desc_from().
2012-04-12Merge branch 'for-linus' of ↵Linus Torvalds6-13/+28
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: "Just a few small fixes..." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: da9052 - fix memory leak in da9052_onkey_probe() Input: gpio_mouse - use linux/gpio.h rather than asm/gpio.h Input: trackpoint - use psmouse_fmt() for messages Input: elantech - v4 is a clickpad, with only one button Input: elantech - reset touchpad before configuring it Input: sentelic - filter taps in absolute mode Input: tps6507x-ts - fix MODULE_ALIAS to match driver name
2012-04-12Merge branch 'for-linus' of ↵Linus Torvalds3-11/+12
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "Regression fix in mtdchar_open(), fix for a really old leak (almost never hit in practice - it's a b0rken failure exit in simple_fill_super()) and a typo fix in vfs.txt (misspelled method type)." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: typo fix in Documentation/filesystems/vfs.txt dentry leak in simple_fill_super() failure exit fix breakage in mtdchar_open(), sanitize failure exits
2012-04-12perf tools: fix NO_GTK2 Makefile config errorStephane Eranian1-1/+1
In case the user specified NO_GTK2 on the make cmdline, compilation would fail with undefined symbol because the Makefile would not set the correct cpp variable: NO_GTK2 vs. NO_GTK2_SUPPORT. This patch renames the variable to the correct name. Signed-off-by: Stephane Eranian <eranian@google.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20120410103513.GA9229@quad Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-12ALSA: hda/realtek - Add quirk for Mac Pro 5,1 machinesJosh Boyer1-0/+1
A user reported that setting model=imac24 used to allow sound to work on their Mac Pro 5,1 machine. Commit 5671087ffa "Move ALC885 macpro and imac24 models to auto-parser" removed this model option. All Mac machines are now explicitly handled with a quirk and the auto-parser. This adds a quirk for the device found on the Mac Pro 5,1 machines. This (partially) fixes https://bugzilla.redhat.com/show_bug.cgi?id=808559 [sorted the new entry in the ID number order by tiwai] Reported-by: Gabriel Somlo <somlo@cmu.edu> Signed-off-by: Josh Boyer <jwboyer@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-12ALSA: hda/realtek - Add a fixup entry for Acer Aspire 8940GTakashi Iwai1-0/+1
It's compatible with 8930G. Using the same fixup gives the proper 5.1 sound back. Reported-and-tested-by: Dany Martineau <dany.luc.martineau@gmail.com> Cc: <stable@kernel.org> [v3.3+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-12Revert "Btrfs: increase the global block reserve estimates"Chris Mason1-1/+1
This reverts commit 5500cdbe14d7435e04f66ff3cfb8ecd8b8e44ebf. We've had a number of complaints of early enospc that bisect down to this patch. We'll hae to fix the reservations differently. CC: stable@kernel.org Signed-off-by: Chris Mason <chris.mason@oracle.com>
2012-04-12Merge branch 'exynos-drm-fixes' of ↵Dave Airlie13-187/+192
git://git.infradead.org/users/kmpark/linux-samsung into drm-intel-fixes * 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung: drm/exynos: fixed exynos broken ioctl drm/exynos: fix to pointer manager member of struct exynos_drm_subdrv drm/exynos: fix struct for operation callback functions to driver name drm/exynos: use define instead of default_win member in struct mixer_context drm/exynos: rename s/HDMI_OVERLAY_NUMBER/MIXER_WIN_NR drm/exynos: remove unused codes in hdmi and mixer drm/exynos: remove unnecessary type conversion of hdmi and mixer drm/exynos: add format list of plane drm/exynos: fixed duplicated page allocation bug. drm/exynos: fixed page align and code clean.
2012-04-12Merge branch 'drm-intel-fixes' of ↵Dave Airlie8-37/+93
git://people.freedesktop.org/~danvet/drm-intel into drm-intel-fixes Daniel Vetter writes: 3 regression fixes: - disable gmbus again, too broken for 3.4, we'll try again for 3.5 - dp bandwidth computation fix, we've lost the 6bpc dithering flag sometimes, this is a 3.3 regression (maybe even earlier for some configurations). - fix resume regression caused by the gen2/3 fencing fix merged into -rc2. And a few other fixes: - gpu hang fix for i845 (Chris) - sprite fix (Armin Reese) - crtc disable vs. scanlinewait race fix (Chris) - rc6 module option read-only, it confused testers (Jesse) - fbc related blitter death hw workaround, note that we disable fbc on snb by default anyway. With these fixes we have one 3.4 regression outstanding: One of the cleanup patches for the interlaced support managed to confuse the lvds panel fitter when upscaling. The root-cause is still unclear, but test patches are awaiting feedback from the reporter. * 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel: drm/i915: clear fencing tracking state when retiring requests drm/i915: make rc6 module parameter read-only drm/i915: implement ColorBlt w/a drm/i915/ringbuffer: Exclude last 2 cachlines of ring on 845g Revert "drm/i915: reenable gmbus on gen3+ again" drm/i915: properly compute dp dithering for user-created modes drm/i915: Finish any pending operations on the framebuffer before disabling drm/i915: Removed IVB forced enable of sprite dest key.
2012-04-12USB: update usbtmc api documentationStephen Lewis1-7/+7
Correct path names in API documentation for usbtmc Signed-off-by: Stephen Lewis <lewis@sdf.lonestar.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-12Merge tag 'for-usb-linus-2012-04-11' of ↵Greg Kroah-Hartman9-21/+47
git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus Hi Greg, Here's 11 xHCI bug fixes for 3.4. Some of the patches fix issues with crashes on system resume related to VIA xHCI host controllers accessing bad memory addresses. The patches change the register restore ordering, so I had several vendors confirm that the patches don't break their xHCI hosts. Elric Fu confirms this patchset fixes the VIA issue, Alex He confirms the changes does not break suspend/resume on AMD xHCI systems, and I've made sure it doesn't break Intel host controllers. I have not heard back from Felipe about the TI host, so at this point, I'm just going to send them off. Several of the patches are marked for stable. Please pull. Sarah Sharp
2012-04-12perf session: Skip event correctly for unknown id/machineJiri Olsa1-2/+2
In case the perf_session__process_event function fails, we estimate the next event offset. This is not necessary for sample event failing on unknown ID or machine. In such case we know proper size of the event, so we dont need to guess. Also failure statistics are updated correctly so we don't miss any information. Forcing perf_session__process_event to return 0 in case of unknown ID or machine. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1334233262-5679-3-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-12IB/srpt: Set srq_type to IB_SRQT_BASICRoland Dreier1-0/+1
Since commit 96104eda0169 ("RDMA/core: Add SRQ type field"), kernel users of SRQs need to specify srq_type = IB_SRQT_BASIC in struct ib_srq_init_attr, or else most low-level drivers will fail in when srpt_add_one() calls ib_create_srq() and gets -ENOSYS. (mlx4_ib works OK nearly all of the time, because it just needs srq_type != IB_SRQT_XRC. And apparently nearly everyone using ib_srpt is using mlx4 hardware) Reported-by: Alexey Shvetsov <alexxy@gentoo.org> Cc: <stable@vger.kernel.org> Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-04-12Merge branch 'master' of ↵John W. Linville25-77/+108
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
2012-04-12drm/exynos: fixed exynos broken ioctlInki Dae1-1/+1
this patch removes the pointer of uint64_t *edid. it should be just a uint64_t. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2012-04-12virtio_blk: helper function to format disk namesRen Mingxin1-12/+29
The current virtio block's naming algorithm just supports 18278 (26^3 + 26^2 + 26) disks. If there are more virtio blocks, there will be disks with the same name. Based on commit 3e1a7ff8a0a7b948f2684930166954f9e8e776fe, add a function "virtblk_name_format()" for virtio block to support mass of disks naming. Notes: - Our naming scheme is ugly. We are stuck with it for virtio but don't use it for any new driver: new drivers should name their devices PREFIX%d where the sequence number can be allocated by ida - sd_format_disk_name has exactly the same logic. Moving it to a central place was deferred over worries that this will make people keep using the legacy naming in new drivers. We kept code idential in case someone wants to deduplicate later. Signed-off-by: Ren Mingxin <renmx@cn.fujitsu.com> Acked-by: Asias He <asias@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2012-04-12tools/virtio: fix up vhost/test module buildZhi Yong Wu1-1/+1
commit ea5d404655ba3b356d0c06d6a3c4f24112124522 broke build for the vhost test module used by tools/virtio. Fix it up. Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2012-04-12drm/i915: clear fencing tracking state when retiring requestsDaniel Vetter1-0/+2
This fixes a resume regression introduced in commit 7dd4906586274f3945f2aeaaa5a33b451c3b4bba Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Mar 21 10:48:18 2012 +0000 drm/i915: Mark untiled BLT commands as fenced on gen2/3 which fixed fencing tracking for untiled blt commands. A side effect of that patch was that now also untiled objects have a non-zero obj->last_fenced_seqno to track when a fence can be set up after a pipelined tiling change. Unfortunately this was only cleared by the fence setup and teardown code, resulting in tons of untiled but inactive objects with non-zero last_fenced_seqno. Now after resume we completely reset the seqno tracking, both on the driver side (by setting dev_priv->next_seqno = 1) and on the hw side (by allocating a new hws page, which contains the seqnos). Hilarity and indefinite waits ensued from the stale seqnos in obj->last_fenced_seqno from before the suspend. The fix is to properly clear the fencing tracking state like we already do for the normal gpu rendering while moving objects off the active list. Reported-and-tested-by: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Jiri Slaby <jslaby@suse.cz> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-12block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancyGreg Kroah-Hartman1-1/+1
This removes the HOTPLUG_PCI_PCIE dependency on the driver and makes it depend on PCI. Cc: Sam Bradshaw <sbradshaw@micron.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-04-12irq_domain: Move irq_virq_count into NOMAP revmapGrant Likely6-31/+17
This patch replaces the old global setting of irq_virq_count that is only used by the NOMAP mapping and instead uses a revmap_data property so that the maximum NOMAP allocation can be set per NOMAP irq_domain. There is exactly one user of irq_virq_count in-tree right now: PS3. Also, irq_virq_count is only useful for the NOMAP mapping. So, instead of having a single global irq_virq_count values, this change drops it entirely and added a max_irq argument to irq_domain_add_nomap(). That makes it a property of an individual nomap irq domain instead of a global system settting. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Milton Miller <miltonm@bga.com>
2012-04-12md/bitmap: prevent bitmap_daemon_work running while initialising bitmapNeilBrown1-0/+2
If a bitmap is added while the array is active, it is possible for bitmap_daemon_work to run while the bitmap is being initialised. This is particularly a problem if bitmap_daemon_work sees bitmap->filemap as non-NULL before it has been filled in properly. So hold bitmap_info.mutex while filling in ->filemap to prevent problems. This patch is suitable for any -stable kernel, though it might not apply cleanly before about 3.1. Cc: stable@vger.kernel.org Signed-off-by: NeilBrown <neilb@suse.de>
2012-04-12md/raid1,raid10: Fix calculation of 'vcnt' when processing error recovery.majianpeng2-3/+4
If r1bio->sectors % 8 != 0,then the memcmp and a later memcpy will omit the last bio_vec. This is suitable for any stable kernel since 3.1 when bad-block management was introduced. Cc: stable@vger.kernel.org Signed-off-by: majianpeng <majianpeng@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
2012-04-12ALSA: hda/realtek - Fix GPIO1 setup for Acer Aspire 4930 & coTakashi Iwai1-2/+6
Add GPIO1 setup explicitly for Acer Aspire 493x & co. This could be set by alc_auto_init_amp(), but it's safer to set it more explicitly in the fixup table. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-12MD: Bitmap version cleanup.Andrei Warkentin1-3/+0
bitmap_new_disk_sb() would still create V3 bitmap superblock with host-endian layout. Perhaps I'm confused, but shouldn't bitmap_new_disk_sb() be creating a V4 bitmap superblock instead, that is portable, as per comment in bitmap.h? Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
2012-04-12drm/exynos: fix to pointer manager member of struct exynos_drm_subdrvJoonyoung Shim5-33/+46
The struct exynos_drm_manager has to exist for exynos drm sub driver using encoder and connector. If it isn't NULL to member of struct exynos_drm_subdrv, will create encoder and connector else will not. And the is_local member also doesn't need. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2012-04-12drm/exynos: fix struct for operation callback functions to driver nameJoonyoung Shim4-79/+62
The mixer driver and hdmi driver have each operation callback functions and they is registered to hdmi common driver. Their struct names in hdmi common driver include display, manager and overlay. It confuses to appear whose operation and two driver cannot register same operation callback functions at the same time. Use their struct names to driver name. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2012-04-12drm/exynos: use define instead of default_win member in struct mixer_contextJoonyoung Shim1-4/+4
The default_win member in struct mixer_context isn't change its value after initialized to 0, so it's better using to define. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2012-04-12drm/exynos: rename s/HDMI_OVERLAY_NUMBER/MIXER_WIN_NRJoonyoung Shim1-5/+5
HDMI_OVERLAY_NUMBER is specific of mixer driver and be used "windows layer" term in exynos user manaual, so rename it. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2012-04-12drm/exynos: remove unused codes in hdmi and mixerJoonyoung Shim2-4/+0
Some members in struct mixer_context aren't used and the define HDMI_OVERLAY_NUMBER is unused in hdmi driver, remove them. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2012-04-12drm/exynos: remove unnecessary type conversion of hdmi and mixerJoonyoung Shim2-18/+16
When the void pointer type variable is assigned to the specific pointer type variable, don't need to do type conversion. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2012-04-11Input: da9052 - fix memory leak in da9052_onkey_probe()Jesper Juhl1-1/+2
If, in drivers/input/misc/da9052_onkey.c::da9052_onkey_probe(), the call to either kzalloc() or input_allocate_device() fails then we will return -ENOMEM from the function without freeing the other allocation that may have succeeded, thus we leak either the memory allocated for 'onkey' or the memory allocated for 'input_dev' if one succeeds and the other fails. Fix that by jumping to the 'err_free_mem' label at the end of the function that properly cleans up rather than returning directly. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-11Merge branch 'merge' of ↵Linus Torvalds2-20/+23
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc Pull powerpc fixes from Benjamin Herrenschmidt: "Fixes for two nasty regression affecting powerpc in 3.4." * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc: Fix typo in runlatch code powerpc: Fix page fault with lockdep regression
2012-04-11Cleanup handling of NULL value passed for a mount optionSachin Prabhu1-61/+19
Allow blank user= and ip= mount option. Also clean up redundant checks for NULL values since the token parser will not actually match mount options with NULL values unless explicitly specified. Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Reported-by: Chris Clayton <chris2553@googlemail.com> Acked-by: Jeff Layton <jlayton@samba.org> Tested-by: Chris Clayton <chris2553@googlemail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2012-04-12Revert "clocksource: Load the ACPI PM clocksource asynchronously"Thomas Gleixner1-16/+8
This reverts commit b519508298e0292e1771eecf14aaf67755adc39d. The reason for this revert is that making the frequency verification preemptible and interruptible is not working reliably. Michaels machine failed to use PM-timer with the message: PM-Timer running at invalid rate: 113% of normal - aborting. That's not a surprise as the frequency verification does rely on interrupts being disabled. With a async scheduled thread there is no guarantee to achieve the same result. Also some driver might fiddle with the CTC channel 2 during the verification period, which makes the result even more random and unpredictable. This can be solved by using the same mechanism as we use in the deferred TSC validation code, but that only will work if we verified a working HPET _BEFORE_ trying to do the PM-Timer lazy validation. So for now reverting is the safe option. Bisected-by: Michael Witten <mfwitten@gmail.com> Cc: Arjan van de Ven <arjanvandeven@gmail.com> Cc: Arjan van de Ven <arjan@infradead.org> Cc: John Stultz <johnstul@us.ibm.com> Cc: Len Brown <lenb@kernel.org> LKML-Reference: <alpine.LFD.2.02.1204112303270.2542@ionos> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-04-11Merge tag 'rdma-for-linus' of ↵Linus Torvalds2-4/+10
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband Pull infiniband fixes from Roland Dreier: "Fix a regression in the /sys/class/infiniband/.../rate attribute -- old kernels used to just return something, even if the underlying value was out-of-bounds, while 3.4-rc1 returned EINVAL to userspace. This breaks some applications that check for the error, so go back to the old behavior." * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/core: Don't return EINVAL from sysfs rate attribute for invalid speeds IB/mlx4: Don't return an invalid speed when a port is down
2012-04-11drm/i915: make rc6 module parameter read-onlyJesse Barnes1-1/+1
People have been getting confused and thinking this is a runtime control. Cc: stable@vger.kernel.org Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-11NFC: Fix the LLCP Tx fragmentation loopSamuel Ortiz1-2/+2
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-11rtlwifi: Add missing DMA buffer unmapping for PCI driversLarry Finger1-1/+6
In https://bugzilla.kernel.org/show_bug.cgi?id=42976, a system with driver rtl8192se used as an AP suffers from "Out of SW-IOMMU space" errors. These are caused by the DMA buffers used for beacons never being unmapped. This bug was also reported at https://bugs.launchpad.net/ubuntu/+source/linux/+bug/961618 Reported-and-Tested-by: Da Xue <da@lessconfused.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-11rtlwifi: Preallocate USB read buffers and eliminate kalloc in read routineLarry Finger2-19/+21
The current version of rtlwifi for USB operations uses kmalloc to acquire a 32-bit buffer for each read of the device. When _usb_read_sync() is called with the rcu_lock held, the result is a "sleeping function called from invalid context" BUG. This is reported for two cases in https://bugzilla.kernel.org/show_bug.cgi?id=42775. The first case has the lock originating from within rtlwifi and could be fixed by rearranging the locking; however, the second originates from within mac80211. The kmalloc() call is removed from _usb_read_sync() by creating a ring buffer pointer in the private area and allocating the buffer data in the probe routine. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> [This version good for 3.3+ - different patch for 3.2 - 2.6.39] Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-11Merge branch 'stable' of ↵Linus Torvalds2-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile Pull arch/tile fixes from Chris Metcalf: "This is one important change from Srivatsa Bhat that got dropped when I put together my pull request for -rc2, plus a trivial change to remove a compiler warning." * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: arch/tile: avoid unused variable warning in proc.c for tilegx tile/CPU hotplug: Add missing call to notify_cpu_starting()
2012-04-11Merge tag 'sound-3.4' of ↵Linus Torvalds18-106/+120
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: - A series of fixes for Conexant 20549 HD-audio codec chip - A workaround for HDMI hotplug debug prints that annoyed people - A fix for the new support of platform DAPM contexts - Many driver-specific minor fixes * tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - hide HDMI/ELD printks unless snd.debug=2 ALSA: sound/isa/sscape.c: add missing resource-release code sound: sound/oss/msnd_pinnacle.c: add vfrees ALSA: hda - clean up CX20549 test mixer setup ALSA: hda - CX20549 doesn't need pin_amp_workaround. ALSA: hda - Remove CD control from model=benq for CX20549 ALSA: hda - fix record volume controls of CX20459 ("Venice") ALSA: hda - Rename capture sources of CX20549 to match common conventions ALSA: hda - Fix proc output for ADC amp values of CX20549 ASoC: tegra: fix i2s compilation when !CONFIG_DEBUG_FS ASoC: set idle_bias_off=1 for all platform DAPM contexts ASoC: imx-audmux: Check for NULL pointer ASoC: imx-audmux: Fix ssi port numbers in sysfs ASoC: ak4642: fixup: mute needs +1 step MAINTAINERS: Don't list everyone working on Wolfson drivers MAINTAINERS: Add missing ASoC OMAP co-maintainer ASoC: pxa: pxa2xx-i2s: add io.h for IOMEM macro ASoC: tegra: ensure clocks are enabled when touching registers ASoC: sgtl5000: Enable VAG when DAC/ADC up ALSA: asihpi - fix return value of hpios_locked_mem_alloc()
2012-04-11Merge branch 'v4l_for_linus' of ↵Linus Torvalds5-37/+87
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - dvb core: there is a regression found when used with xine. For whatever unknown reason, xine (and xine-lib clients) wants that the frontend to tell what frequency he is using even before the PLL lock (or at least, it expects a non-zero frequency). On DVB, the frequency is only actually known after a frequency zig-zag seek, done by the DVB core. Anyway, the fix was trivial. That solves Fedora BZ#808871. - ivtv: fix a regression when selecting the language channel - uvc: fix a race-related crash - it913x: fixes firmware loading - two trivial patches (a dependency issue at a radio driver at sound Kconfig, and a warning fix on dvb). * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] uvcvideo: Fix race-related crash in uvc_video_clock_update() [media] Drivers/media/radio: Fix build error [media] dvb_frontend: fix compiler warning [media] it913x: fix firmware loading errors [media] ivtv: Fix AUDIO_(BILINGUAL_)CHANNEL_SELECT regression [media] dvb_frontend: regression fix: userspace ABI broken for xine
2012-04-11Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixesLinus Torvalds7-13/+41
Pull GFS2 fixes from Steven Whitehouse * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes: GFS2: Allow caching of rindex glock GFS2: Make sure rindex is uptodate before starting transactions GFS2: use depends instead of select in kconfig GFS2: put glock reference in error patch of read_rindex_entry
2012-04-11arch/tile: avoid unused variable warning in proc.c for tilegxChris Metcalf1-3/+1
Until we push the unaligned access support for tilegx, it's silly to have arch/tile/kernel/proc.c generate a warning about an unused variable. Extend the #ifdef to cover all the code and data for now. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-04-11x86: merge 32/64-bit versions of 'strncpy_from_user()' and speed it upLinus Torvalds6-145/+105
This merges the 32- and 64-bit versions of the x86 strncpy_from_user() by just rewriting it in C rather than the ancient inline asm versions that used lodsb/stosb and had been duplicated for (trivial) differences between the 32-bit and 64-bit versions. While doing that, it also speeds them up by doing the accesses a word at a time. Finally, the new routines also properly handle the case of hitting the end of the address space, which we have never done correctly before (fs/namei.c has a hack around it for that reason). Despite all these improvements, it actually removes more lines than it adds, due to the de-duplication. Also, we no longer export (or define) the legacy __strncpy_from_user() function (that was defined to not do the user permission checks), since it's not actually used anywhere, and the user address space checks are built in to the new code. Other architecture maintainers have been notified that the old hack in fs/namei.c will be going away in the 3.5 merge window, in case they copied the x86 approach of being a bit cavalier about the end of the address space. Cc: linux-arch@vger.kernel.org Cc: Ingo Molnar <mingo@kernel.org> Cc: Peter Anvin" <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-11xHCI: Correct the #define XHCI_LEGACY_DISABLE_SMIAlex He2-5/+10
Re-define XHCI_LEGACY_DISABLE_SMI and used it in right way. All SMI enable bits will be cleared to zero and flag bits 29:31 are also cleared to zero. Other bits should be presvered as Table 146. This patch should be backported to kernels as old as 2.6.31. Signed-off-by: Alex He <alex.he@amd.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@vger.kernel.org
2012-04-11xHCI: use gfp flags from caller instead of GFP_ATOMICDan Carpenter1-2/+2
The caller is allowed to specify the GFP flags for these functions. We should prefer their flags unless we have good reason. For example, if we take a spin_lock ourselves we'd need to use GFP_ATOMIC. But in this case it's safe to use the callers GFP flags. The callers all pass GFP_ATOMIC here, so this change doesn't affect how the kernel behaves but we may add other callers later and this is a cleanup. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-04-11xHCI: add XHCI_RESET_ON_RESUME quirk for VIA xHCI hostElric Fu1-0/+2
The suspend operation of VIA xHCI host have some issues and hibernate operation works fine, so The XHCI_RESET_ON_RESUME quirk is added for it. This patch should base on "xHCI: Don't write zeroed pointer to xHC registers" that is released by Sarah. Otherwise, the host system error will ocurr in the hibernate operation process. This should be backported to stable kernels as old as 2.6.37, that contain the commit c877b3b2ad5cb9d4fe523c5496185cc328ff3ae9 "xhci: Add reset on resume quirk for asrock p67 host". Signed-off-by: Elric Fu <elricfu1@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@vger.kernel.org
2012-04-11USB: fix bug of device descriptor got from superspeed deviceElric Fu1-0/+16
When the Seagate Goflex USB3.0 device is attached to VIA xHCI host, sometimes the device will downgrade mode to high speed. By the USB analyzer, I found the device finished the link training process and worked at superspeed mode. But the device descriptor got from the device shows the device works at 2.1. It is very strange and seems like the device controller of Seagate Goflex has a little confusion. The first 8 bytes of device descriptor should be: 12 01 00 03 00 00 00 09 But the first 8 bytes of wrong device descriptor are: 12 01 10 02 00 00 00 40 The wrong device descriptor caused the initialization of mass storage failed. After a while, the device would be recognized as a high speed device and works fine. This patch will warm reset the device to fix the issue after finding the bcdUSB field of device descriptor isn't 0x0300 but the speed mode of device is superspeed. This patch should be backported to kernels as old as 3.2, or ones that contain the commit 75d7cf72ab9fa01dc70877aa5c68e8ef477229dc "usbcore: refine warm reset logic". Signed-off-by: Elric Fu <elricfu1@gmail.com> Acked-by: Andiry Xu <Andiry.Xu@amd.com> Acked-by: Sergei Shtylyov <sshtylyov@mvista.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@vger.kernel.org
2012-04-11xhci: Fix register save/restore order.Sarah Sharp1-4/+4
The xHCI 1.0 spec errata released on June 13, 2011, changes the ordering that the xHCI registers are saved and restored in. It moves the interrupt pending (IMAN) and interrupt control (IMOD) registers to be saved and restored last. I believe that's because the host controller may attempt to fetch the event ring table when interrupts are re-enabled. Therefore we need to restore the event ring registers before we re-enable interrupts. This should be backported to kernels as old as 2.6.37, that contain the commit 5535b1d5f8885695c6ded783c692e3c0d0eda8ca "USB: xHCI: PCI power management implementation" Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Tested-by: Elric Fu <elricfu1@gmail.com> Cc: Andiry Xu <andiry.xu@amd.com> Cc: stable@vger.kernel.org
2012-04-11xhci: Restore event ring dequeue pointer on resume.Sarah Sharp1-0/+1
The xhci_save_registers() function saved the event ring dequeue pointer in the s3 register structure, but xhci_restore_registers() never restored it. No other code in the xHCI successful resume path would ever restore it either. Fix that. This should be backported to kernels as old as 2.6.37, that contain the commit 5535b1d5f8885695c6ded783c692e3c0d0eda8ca "USB: xHCI: PCI power management implementation". Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Tested-by: Elric Fu <elricfu1@gmail.com> Cc: Andiry Xu <andiry.xu@amd.com> Cc: stable@vger.kernel.org
2012-04-11xhci: Don't write zeroed pointers to xHC registers.Sarah Sharp1-7/+2
When xhci_mem_cleanup() is called, we can't be sure if the xHC is actually halted. We can ask the xHC to halt by writing to the RUN bit in the command register, but that might timeout due to a HW hang. If the host controller is still running, we should not write zeroed values to the event ring dequeue pointers or base tables, the DCBAA pointers, or the command ring pointers. Eric Fu reports his VIA VL800 host accesses the event ring pointers after a failed register restore on resume from suspend. The hypothesis is that the host never actually halted before the register write to change the event ring pointer to zero. Remove all writes of zeroed values to pointer registers in xhci_mem_cleanup(). Instead, make all callers of the function reset the host controller first, which will reset those registers to zero. xhci_mem_init() is the only caller that doesn't first halt and reset the host controller before calling xhci_mem_cleanup(). This should be backported to kernels as old as 2.6.32. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Tested-by: Elric Fu <elricfu1@gmail.com> Cc: stable@vger.kernel.org
2012-04-11xhci: Warn when hosts don't halt.Sarah Sharp1-0/+3
Eric Fu reports a problem with his VIA host controller fetching a zeroed event ring pointer on resume from suspend. The host should have been halted, but we can't be sure because that code ignores the return value from xhci_halt(). Print a warning when the host controller refuses to halt within XHCI_MAX_HALT_USEC (currently 16 seconds). (Update: it turns out that the VIA host controller is reporting a halted state when it fetches the zeroed event ring pointer. However, we still need this warning for other host controllers.) Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-04-11xhci: don't re-enable IE constantlyFelipe Balbi2-1/+5
While we're at that, define IMAN bitfield to aid readability. The interrupt enable bit should be set once on driver init, and we shouldn't need to continually re-enable it. Commit c21599a3 introduced a read of the irq_pending register, and that allows us to preserve the state of the IE bit. Before that commit, we were blindly writing 0x3 to the register. This patch should be backported to kernels as old as 2.6.36, or ones that contain the commit c21599a36165dbc78b380846b254017a548b9de5 "USB: xhci: Reduce reads and writes of interrupter registers". Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@vger.kernel.org
2012-04-11cred: copy_process() should clear child->replacement_session_keyringOleg Nesterov1-0/+2
keyctl_session_to_parent(task) sets ->replacement_session_keyring, it should be processed and cleared by key_replace_session_keyring(). However, this task can fork before it notices TIF_NOTIFY_RESUME and the new child gets the bogus ->replacement_session_keyring copied by dup_task_struct(). This is obviously wrong and, if nothing else, this leads to put_cred(already_freed_cred). change copy_creds() to clear this member. If copy_process() fails before this point the wrong ->replacement_session_keyring doesn't matter, exit_creds() won't be called. Cc: <stable@vger.kernel.org> Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-11perf kvm: Finding struct machine fails for PERF_RECORD_MMAPNikunj A. Dadhania1-2/+10
Running 'perf kvm --host --guest --guestmount /tmp/guestmount record -a -g -- sleep 2' Was resulting in a segfault. For event type PERF_RECORD_MMAP, event->ip.pid is being used in perf_session__find_machine_for_cpumode, which is not correct. The event->ip.pid field happens to be 0 in this case and results in returning a NULL machine object. Finally, access to self->pid in machine__mmap_name, results in a segfault later. For PERF_RECORD_MMAP type, pass event->mmap.pid. Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: David Ahern <dsahern@gmail.com> Tested-by: David Ahern <dsahern@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Cc: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com> Link: http://lkml.kernel.org/r/20120409081835.10576.22018.stgit@abhimanyu.in.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-11tcp: avoid order-1 allocations on wifi and tx pathEric Dumazet3-5/+18
Marc Merlin reported many order-1 allocations failures in TX path on its wireless setup, that dont make any sense with MTU=1500 network, and non SG capable hardware. After investigation, it turns out TCP uses sk_stream_alloc_skb() and used as a convention skb_tailroom(skb) to know how many bytes of data payload could be put in this skb (for non SG capable devices) Note : these skb used kmalloc-4096 (MTU=1500 + MAX_HEADER + sizeof(struct skb_shared_info) being above 2048) Later, mac80211 layer need to add some bytes at the tail of skb (IEEE80211_ENCRYPT_TAILROOM = 18 bytes) and since no more tailroom is available has to call pskb_expand_head() and request order-1 allocations. This patch changes sk_stream_alloc_skb() so that only sk->sk_prot->max_header bytes of headroom are reserved, and use a new skb field, avail_size to hold the data payload limit. This way, order-0 allocations done by TCP stack can leave more than 2 KB of tailroom and no more allocation is performed in mac80211 layer (or any layer needing some tailroom) avail_size is unioned with mark/dropcount, since mark will be set later in IP stack for output packets. Therefore, skb size is unchanged. Reported-by: Marc MERLIN <marc@merlins.org> Tested-by: Marc MERLIN <marc@merlins.org> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-11net: allow pskb_expand_head() to get maximum tailroomEric Dumazet1-1/+3
Marc Merlin reported many order-1 allocations failures in TX path on its wireless setup, that dont make any sense with MTU=1500 network, and non SG capable hardware. Turns out part of the problem comes from pskb_expand_head() not using ksize() to get exact head size given by kmalloc(). Doing the same thing than __alloc_skb() allows more tailroom in skb and can prevent future reallocations. As a bonus, struct skb_shared_info becomes cache line aligned. Reported-by: Marc MERLIN <marc@merlins.org> Tested-by: Marc MERLIN <marc@merlins.org> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-11bridge: Do not send queries on multicast group leavesHerbert Xu2-85/+0
As it stands the bridge IGMP snooping system will respond to group leave messages with queries for remaining membership. This is both unnecessary and undesirable. First of all any multicast routers present should be doing this rather than us. What's more the queries that we send may end up upsetting other multicast snooping swithces in the system that are buggy. In fact, we can simply remove the code that send these queries because the existing membership expiry mechanism doesn't rely on them anyway. So this patch simply removes all code associated with group queries in response to group leave messages. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-11ALSA: hda/realtek - Add a few ALC882 model strings backTakashi Iwai2-2/+12
Since there are still many Acer models that might not be covered by the current fixup table, let's add back a few typical model names so that user can test the fixup without recompiling. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-11drm/i915: implement ColorBlt w/aDaniel Vetter2-0/+7
According to an internal workaround master list, we need to set bit 5 of register 9400 to avoid issues with color blits. Testing shows that this seems to fix the blitter hangs when fbc is enabled on snb, thanks to Chris Wilson for figuring this out. Tested-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Michael "brot" Groh <michael.groh@minad.de> Acked-by: Ben Widawsky <ben@bwidawsk.net> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-11drm/i915/ringbuffer: Exclude last 2 cachlines of ring on 845gChris Wilson1-1/+1
The 845g shares the errata with i830 whereby executing a command within 2 cachelines of the end of the ringbuffer may cause a GPU hang. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-11Revert "drm/i915: reenable gmbus on gen3+ again"Daniel Vetter1-1/+1
This reverts commit c3dfefa0a6d235bd465309e12f4c56ea16e71111. gmbus in 3.4 has simply too many known issues: - gmbus is too noisy, we need to rework the logging: https://bugs.freedesktop.org/show_bug.cgi?id=48248 - zero-length writes cause an OOPS, and they are userspace-triggerable: https://lkml.org/lkml/2012/3/30/176 - same for zero-length reads: https://bugs.freedesktop.org/show_bug.cgi?id=48269 We can try again for 3.5. Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-11drm/radeon: only add the mm i2c bus if the hw_i2c module param is setAlex Deucher1-0/+4
It seems it can corrupt the monitor EDID in certain cases on certain boards when running sensors detect. It's rarely used anyway outside of AIW boards. http://lists.lm-sensors.org/pipermail/lm-sensors/2012-April/035847.html http://lists.freedesktop.org/archives/xorg/2011-January/052239.html Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-11vgaarb.h: fix build warningsRandy Dunlap1-0/+2
Fix build warnings by providing a struct stub since no fields of the struct are used: include/linux/vgaarb.h:66:9: warning: 'struct pci_dev' declared inside parameter list include/linux/vgaarb.h:66:9: warning: its scope is only this definition or declaration, which is probably not what you want include/linux/vgaarb.h:99:34: warning: 'struct pci_dev' declared inside parameter list include/linux/vgaarb.h:109:6: warning: 'struct pci_dev' declared inside parameter list include/linux/vgaarb.h:121:8: warning: 'struct pci_dev' declared inside parameter list include/linux/vgaarb.h:140:37: warning: 'struct pci_dev' declared inside parameter list Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-11irqdomain: Fix debugfs formattingGrant Likely1-3/+3
This patch fixes the irq_domain_mapping debugfs output to pad pointer values with leading zeros so that pointer values are displayed correctly. Otherwise you get output similar to "0x 5e0000000000000". Also, when the irq_domain is set to 'null' Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: David Daney <david.daney@cavium.com> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
2012-04-10irq_domain: correct the debugfs file nameMika Westerberg1-1/+1
The actual name of the irq_domain mapping debugfs file is "irq_domain_mapping" not "virq_mapping". Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-10irq: Kill pointless irqd_to_hw exportGrant Likely7-31/+11
It makes no sense to export this trivial function. Make it a static inline instead. This patch also drops virq_to_hw from arch/c6x since it is unused by that architecture. v2: Move irq_hw_number_t into types.h to fix ARM build failure Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Thomas Gleixner <tglx@linutronix.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-04-10irq/irq_domain: Quit ignoring error returns from irq_alloc_desc_from().David Daney1-3/+4
In commit 4bbdd45a (irq_domain/powerpc: eliminate irq_map; use irq_alloc_desc() instead) code was added that ignores error returns from irq_alloc_desc_from() by (silently) casting the return value to unsigned. The negitive value error return now suddenly looks like a valid irq number. Commits cc79ca69 (irq_domain: Move irq_domain code from powerpc to kernel/irq) and 1bc04f2c (irq_domain: Add support for base irq and hwirq in legacy mappings) move this code to its current location in irqdomain.c The result of all of this is a null pointer dereference OOPS if one of the error cases is hit. The fix: Don't cast away the negativeness of the return value and then check for errors. Signed-off-by: David Daney <david.daney@cavium.com> Acked-by: Rob Herring <rob.herring@calxeda.com> [grant.likely: dropped addition of new 'irq' variable] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-10spi/imx: prevent NULL pointer dereference in spi_imx_probe()Lothar Waßmann1-3/+7
When no platform_data is present and either 'spi-num-chipselects' is not defined in the DT or 'cs-gpios' has less entries than 'spi-num-chipselects' specifies, the NULL platform_data pointer is being dereferenced. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-10gpio/exynos: Fix compiler warning in gpio-samsung.c fileSachin Kamat1-8/+8
Fixes the following warning when "SAMSUNG EXYNOS5" is not selected: warning: ‘exynos5_gpios_1’ defined but not used [-Wunused-variable] warning: ‘exynos5_gpios_2’ defined but not used [-Wunused-variable] warning: ‘exynos5_gpios_3’ defined but not used [-Wunused-variable] warning: ‘exynos5_gpios_4’ defined but not used [-Wunused-variable] Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-04-10MAINTAINERS: Mark NATSEMI driver as orphan'd.David S. Miller1-2/+1
After discussion with Tim Hockin. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-11powerpc: Fix typo in runlatch codeBenjamin Herrenschmidt1-2/+2
Commit fe1952fc0afb9a2e4c79f103c08aef5d13db1873 "powerpc: Rework runlatch code" has a nasty typo where it uses "TLF_RUNLATCH" instead of "_TLF_RUNLATCH" (bit number instead of bit mask), causing some flags to be potentially lost such as _TLF_RESTORE_SIGMASK (Brown paper bag for me ! We should be able to make that break at compile time with a bit of magic, any volunteer ?) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-04-10Smack: build when CONFIG_AUDIT not definedKees Cook1-4/+15
This fixes builds where CONFIG_AUDIT is not defined and CONFIG_SECURITY_SMACK=y. This got introduced by the stack-usage reducation commit 48c62af68a40 ("LSM: shrink the common_audit_data data union"). Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Eric Paris <eparis@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-10Merge tag 'dmaengine-fixes' of ↵Linus Torvalds12-30/+86
git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine Pull dmaengine fixes from Dan Williams: 1/ regression fix for Xen as it now trips over a broken assumption about the dma address size on 32-bit builds 2/ new quirk for netdma to ignore dma channels that cannot meet netdma alignment requirements 3/ fixes for two long standing issues in ioatdma (ring size overflow) and iop-adma (potential stack corruption) * tag 'dmaengine-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine: netdma: adding alignment check for NETDMA ops ioatdma: DMA copy alignment needed to address IOAT DMA silicon errata ioat: ring size variables need to be 32bit to avoid overflow iop-adma: Corrected array overflow in RAID6 Xscale(R) test. ioat: fix size of 'completion' for Xen
2012-04-10usb: xhci: fix section mismatch in linux-nextGerard Snitselaar1-1/+1
xhci_unregister_pci() is called in xhci_hcd_init(). Signed-off-by: Gerard Snitselaar <dev@snitselaar.org> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-04-10xHCI: correct to print the true HSEE of USBCMDAlex He1-1/+1
Correct the print of HSEE of USBCMD in xhci-dbg.c. Signed-off-by: Alex He <alex.he@amd.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-04-10kobject: provide more diagnostic info for kobject_add_internal() failuresDan Williams1-7/+7
1/ convert open-coded KERN_ERR+dump_stack() to WARN(), so that automated tools pick up this warning. 2/ include the 'child' and 'parent' kobject names. This information was useful for tracking down the case where scsi invoked device_del() on a parent object and subsequently invoked device_add() on a child. Now the warning looks like: kobject_add_internal failed for target8:0:16 (error: -2 parent: end_device-8:0:24) Pid: 2942, comm: scsi_scan_8 Not tainted 3.3.0-rc7-isci+ #2 Call Trace: [<ffffffff8125e551>] kobject_add_internal+0x1c1/0x1f3 [<ffffffff81075149>] ? trace_hardirqs_on+0xd/0xf [<ffffffff8125e659>] kobject_add_varg+0x41/0x50 [<ffffffff8125e723>] kobject_add+0x64/0x66 [<ffffffff8131124b>] device_add+0x12d/0x63a [<ffffffff8125e0ef>] ? kobject_put+0x4c/0x50 [<ffffffff8132f370>] scsi_sysfs_add_sdev+0x4e/0x28a [<ffffffff8132dce3>] do_scan_async+0x9c/0x145 Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: James Bottomley <JBottomley@parallels.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10sysfs: handle 'parent deleted before child added'Dan Williams1-0/+3
In scsi at least two cases of the parent device being deleted before the child is added have been observed. 1/ scsi is performing async scans and the device is removed prior to the async can thread running (can happen with an in-opportune / unlikely unplug during initial scan). 2/ libsas discovery event running after the parent port has been torn down (this is a bug in libsas). Result in crash signatures like: BUG: unable to handle kernel NULL pointer dereference at 0000000000000098 IP: [<ffffffff8115e100>] sysfs_create_dir+0x32/0xb6 ... Process scsi_scan_8 (pid: 5417, threadinfo ffff88080bd16000, task ffff880801b8a0b0) Stack: 00000000fffffffe ffff880813470628 ffff88080bd17cd0 ffff88080614b7e8 ffff88080b45c108 00000000fffffffe ffff88080bd17d20 ffffffff8125e4a8 ffff88080bd17cf0 ffffffff81075149 ffff88080bd17d30 ffff88080614b7e8 Call Trace: [<ffffffff8125e4a8>] kobject_add_internal+0x120/0x1e3 [<ffffffff81075149>] ? trace_hardirqs_on+0xd/0xf [<ffffffff8125e641>] kobject_add_varg+0x41/0x50 [<ffffffff8125e70b>] kobject_add+0x64/0x66 [<ffffffff8131122b>] device_add+0x12d/0x63a In this scenario the parent is still valid (because we have a reference), but it has been device_del()'d which means its kobj->sd pointer is NULL'd via: device_del()->kobject_del()->sysfs_remove_dir() ...and then sysfs_create_dir() (without this fix) goes ahead and de-references parent_sd via sysfs_ns_type(): return (sd->s_flags & SYSFS_NS_TYPE_MASK) >> SYSFS_NS_TYPE_SHIFT; This scenario is being fixed in scsi/libsas, but if other subsystems present the same ordering the system need not immediately crash. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: James Bottomley <JBottomley@parallels.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10sysfs: Prevent crash on unset sysfs group attributesBruno Prémont1-1/+5
Do not let the kernel crash when a device is registered with sysfs while group attributes are not set (aka NULL). Warn about the offender with some information about the offending device. This would warn instead of trying NULL pointer deref like: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<ffffffff81152673>] internal_create_group+0x83/0x1a0 PGD 0 Oops: 0000 [#1] SMP CPU 0 Modules linked in: Pid: 1, comm: swapper/0 Not tainted 3.4.0-rc1-x86_64 #3 HP ProLiant DL360 G4 RIP: 0010:[<ffffffff81152673>] [<ffffffff81152673>] internal_create_group+0x83/0x1a0 RSP: 0018:ffff88019485fd70 EFLAGS: 00010202 RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000001 RDX: ffff880192e99908 RSI: ffff880192e99630 RDI: ffffffff81a26c60 RBP: ffff88019485fdc0 R08: 0000000000000000 R09: 0000000000000000 R10: ffff880192e99908 R11: 0000000000000000 R12: ffffffff81a16a00 R13: ffff880192e99908 R14: ffffffff81a16900 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88019bc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 0000000000000000 CR3: 0000000001a0c000 CR4: 00000000000007f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process swapper/0 (pid: 1, threadinfo ffff88019485e000, task ffff880194878000) Stack: ffff88019485fdd0 ffff880192da9d60 0000000000000000 ffff880192e99908 ffff880192e995d8 0000000000000001 ffffffff81a16a00 ffff880192da9d60 0000000000000000 0000000000000000 ffff88019485fdd0 ffffffff811527be Call Trace: [<ffffffff811527be>] sysfs_create_group+0xe/0x10 [<ffffffff81376ca6>] device_add_groups+0x46/0x80 [<ffffffff81377d3d>] device_add+0x46d/0x6a0 ... Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10USB: serial: fix race between probe and openJohan Hovold1-0/+8
Fix race between probe and open by making sure that the disconnected flag is not cleared until all ports have been registered. A call to tty_open while probe is running may get a reference to the serial structure in serial_install before its ports have been registered. This may lead to usb_serial_core calling driver open before port is fully initialised. With ftdi_sio this result in the following NULL-pointer dereference as the private data has not been initialised at open: [ 199.698286] IP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio] [ 199.698297] *pde = 00000000 [ 199.698303] Oops: 0000 [#1] PREEMPT SMP [ 199.698313] Modules linked in: ftdi_sio usbserial [ 199.698323] [ 199.698327] Pid: 1146, comm: ftdi_open Not tainted 3.2.11 #70 Dell Inc. Vostro 1520/0T816J [ 199.698339] EIP: 0060:[<f811a089>] EFLAGS: 00010286 CPU: 0 [ 199.698344] EIP is at ftdi_open+0x59/0xe0 [ftdi_sio] [ 199.698348] EAX: 0000003e EBX: f5067000 ECX: 00000000 EDX: 80000600 [ 199.698352] ESI: f48d8800 EDI: 00000001 EBP: f515dd54 ESP: f515dcfc [ 199.698356] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 [ 199.698361] Process ftdi_open (pid: 1146, ti=f515c000 task=f481e040 task.ti=f515c000) [ 199.698364] Stack: [ 199.698368] f811a9fe f811a9e0 f811b3ef 00000000 00000000 00001388 00000000 f4a86800 [ 199.698387] 00000002 00000000 f806e68e 00000000 f532765c f481e040 00000246 22222222 [ 199.698479] 22222222 22222222 22222222 f5067004 f5327600 f5327638 f515dd74 f806e6ab [ 199.698496] Call Trace: [ 199.698504] [<f806e68e>] ? serial_activate+0x2e/0x70 [usbserial] [ 199.698511] [<f806e6ab>] serial_activate+0x4b/0x70 [usbserial] [ 199.698521] [<c126380c>] tty_port_open+0x7c/0xd0 [ 199.698527] [<f806e660>] ? serial_set_termios+0xa0/0xa0 [usbserial] [ 199.698534] [<f806e76f>] serial_open+0x2f/0x70 [usbserial] [ 199.698540] [<c125d07c>] tty_open+0x20c/0x510 [ 199.698546] [<c10e9eb7>] chrdev_open+0xe7/0x230 [ 199.698553] [<c10e48f2>] __dentry_open+0x1f2/0x390 [ 199.698559] [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50 [ 199.698565] [<c10e4b76>] nameidata_to_filp+0x66/0x80 [ 199.698570] [<c10e9dd0>] ? cdev_put+0x20/0x20 [ 199.698576] [<c10f3e08>] do_last+0x198/0x730 [ 199.698581] [<c10f4440>] path_openat+0xa0/0x350 [ 199.698587] [<c10f47d5>] do_filp_open+0x35/0x80 [ 199.698593] [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50 [ 199.698599] [<c10ff110>] ? alloc_fd+0xc0/0x100 [ 199.698605] [<c10f0b72>] ? getname_flags+0x72/0x120 [ 199.698611] [<c10e4450>] do_sys_open+0xf0/0x1c0 [ 199.698617] [<c11fcc08>] ? trace_hardirqs_on_thunk+0xc/0x10 [ 199.698623] [<c10e458e>] sys_open+0x2e/0x40 [ 199.698628] [<c144c990>] sysenter_do_call+0x12/0x36 [ 199.698632] Code: 85 89 00 00 00 8b 16 8b 4d c0 c1 e2 08 c7 44 24 14 88 13 00 00 81 ca 00 00 00 80 c7 44 24 10 00 00 00 00 c7 44 24 0c 00 00 00 00 <0f> b7 41 78 31 c9 89 44 24 08 c7 44 24 04 00 00 00 00 c7 04 24 [ 199.698884] EIP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio] SS:ESP 0068:f515dcfc [ 199.698893] CR2: 0000000000000078 [ 199.698925] ---[ end trace 77c43ec023940cff ]--- Reported-and-tested-by: Ken Huang <csuhgw@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>