aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-06-21Linux 3.16-rc2HEADv3.16-rc2masterLinus Torvalds1-1/+1
2014-06-21Merge branch 'i2c/for-next' of ↵Linus Torvalds6-0/+1216
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c new drivers from Wolfram Sang: "Here is a pull request from i2c hoping for the "new driver" rule. Originally, I wanted to send this request during the merge window, but code checkers with very recent additions complained, so a few fixups were needed. So, some more time went by and I merged rc1 to get a stable base" So the "new driver" rule is really about drivers that people absolutely need for the kernel to work on new hardware, which is not so much the case for i2c. So I considered not pulling this, but eventually relented. Just for FYI: the whole (and only) point of "new drivers" is not that new drivers cannot regress things (they can, and they have - by triggering badly tested code on machines that never triggered that code before), but because they can bring to life machines that otherwise wouldn't be useful at all without the drivers. So the new driver rule is for essential things that actual consumers would care about, ie devices like networking or disk drivers that matter to normal people (not server people - they run old kernels anyway, so mainlining new drivers is irrelevant for them). * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: sun6-p2wi: fix call to snprintf i2c: rk3x: add NULL entry to the end of_device_id array i2c: sun6i-p2wi: use proper return value in probe i2c: sunxi: add P2WI (Push/Pull 2 Wire Interface) controller support i2c: sunxi: add P2WI DT bindings documentation i2c: rk3x: add driver for Rockchip RK3xxx SoC I2C adapter
2014-06-21Merge tag 'locks-v3.16-2' of git://git.samba.org/jlayton/linuxLinus Torvalds2-1/+7
Pull file locking fixes from Jeff Layton: "File locking related bugfixes Nothing too earth-shattering here. A fix for a potential regression due to a patch in pile #1, and the addition of a memory barrier to prevent a race condition between break_deleg and generic_add_lease" * tag 'locks-v3.16-2' of git://git.samba.org/jlayton/linux: locks: set fl_owner for leases back to current->files locks: add missing memory barrier in break_deleg
2014-06-21Merge branch 'rc-fixes' of ↵Linus Torvalds4-11/+12
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild fixes from Michal Marek: "There are three fixes for regressions caused by the relative paths series: deb-pkg, tar-pkg and *docs did not work with O=. Plus, there is a fix for the linux-headers deb package and a fixed typo. These are not regression fixes but are safe enough" * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: fix a typo in a kbuild document builddeb: fix missing headers in linux-headers package Documentation: Fix DocBook build with relative $(srctree) kbuild: Fix tar-pkg with relative $(objtree) deb-pkg: Fix for relative paths
2014-06-21Merge branch 'for-linus' of ↵Linus Torvalds11-172/+359
git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "This fixes some lockups in btrfs reported with rc1. It probably has some performance impact because it is backing off our spinning locks more often and switching to a blocking lock. I'll be able to nail that down next week, but for now I want to get the lockups taken care of. Otherwise some more stack reduction and assorted fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix wrong error handle when the device is missing or is not writeable Btrfs: fix deadlock when mounting a degraded fs Btrfs: use bio_endio_nodec instead of open code Btrfs: fix NULL pointer crash when running balance and scrub concurrently btrfs: Skip scrubbing removed chunks to avoid -ENOENT. Btrfs: fix broken free space cache after the system crashed Btrfs: make free space cache write out functions more readable Btrfs: remove unused wait queue in struct extent_buffer Btrfs: fix deadlocks with trylock on tree nodes
2014-06-21Merge branch 'for-3.16' of git://linux-nfs.org/~bfields/linuxLinus Torvalds2-0/+79
Pull nfsd bugfixes from Bruce Fields: "Fixes for a new regression from the xdr encoding rewrite, and a delegation problem we've had for a while (made somewhat more annoying by the vfs delegation support added in 3.13)" * 'for-3.16' of git://linux-nfs.org/~bfields/linux: NFSD: fix bug for readdir of pseudofs NFSD: Don't hand out delegations for 30 seconds after recalling them.
2014-06-21Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds41-126/+1249
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "This is larger than usual: the main reason are the ARM symbol lookup speedups that came in late and were hard to resist. There's also a kprobes fix and various tooling fixes, plus the minimal re-enablement of the mmap2 support interface" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits) x86/kprobes: Fix build errors and blacklist context_track_user perf tests: Add test for closing dso objects on EMFILE error perf tests: Add test for caching dso file descriptors perf tests: Allow reuse of test_file function perf tests: Spawn child for each test perf tools: Add dso__data_* interface descriptons perf tools: Allow to close dso fd in case of open failure perf tools: Add file size check and factor dso__data_read_offset perf tools: Cache dso data file descriptor perf tools: Add global count of opened dso objects perf tools: Add global list of opened dso objects perf tools: Add data_fd into dso object perf tools: Separate dso data related variables perf tools: Cache register accesses for unwind processing perf record: Fix to honor user freq/interval properly perf timechart: Reflow documentation perf probe: Improve error messages in --line option perf probe: Improve an error message of perf probe --vars mode perf probe: Show error code and description in verbose mode perf probe: Improve error message for unknown member of data structure ...
2014-06-21Merge branch 'locking-urgent-for-linus.patch' of ↵Linus Torvalds3-35/+218
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull rtmutex fixes from Thomas Gleixner: "Another three patches to make the rtmutex code more robust. That's the last urgent fallout from the big futex/rtmutex investigation" * 'locking-urgent-for-linus.patch' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rtmutex: Plug slow unlock race rtmutex: Detect changes in the pi lock chain rtmutex: Handle deadlock detection smarter
2014-06-21Merge branch 'for-linus' of ↵Linus Torvalds26-456/+505
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 patches from Martin Schwidefsky: "A couple of bug fixes, a debug change for qdio, an update for the default config, and one small extension. The watchdog module based on diagnose 0x288 is converted to the watchdog API and it now works under LPAR as well" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/ccwgroup: use ccwgroup_ungroup wrapper s390/ccwgroup: fix an uninitialized return code s390/ccwgroup: obtain extra reference for asynchronous processing qdio: Keep device-specific dbf entries s390/compat: correct ucontext layout for high gprs s390/cio: set device name as early as possible s390: update default configuration s390: avoid format strings leaking into names s390/airq: silence lockdep warning s390/watchdog: add support for LPAR operation (diag288) s390/watchdog: use watchdog API s390/sclp_vt220: Enable ASCII console per default s390/qdio: replace shift loop by ilog2 s390/cio: silence lockdep warning s390/uaccess: always load the kernel ASCE after task switch s390/ap_bus: Make modules parameters visible in sysfs
2014-06-21Merge tag 'for-linus' of git://github.com/gxt/linuxLinus Torvalds16-102/+88
Pull UniCore32 bug fixes from Guan Xuetao: "This includes bugfixes to make unicore32 successfully build under defconfig, and some changes for allmodconfig (though not finished)" * tag 'for-linus' of git://github.com/gxt/linux: unicore32: Remove ARCH_HAS_CPUFREQ config option UniCore32: Change git tree location information in MAINTAINERS arch: unicore32: ksyms: export '__cpuc_coherent_kern_range' to avoid compiling failure arch: unicore32: ksyms: export 'pm_power_off' to avoid compiling failure. arch: unicore32: ksyms: export additional find_first_*() to avoid compiling failure arch:unicore32:mm: add devmem_is_allowed() to support STRICT_DEVMEM unicore32: include: asm: add missing ')' for PAGE_* macros in pgtable.h arch/unicore32/kernel/setup.c: add generic 'screen_info' to avoid compiling failure drivers: scsi: mvsas: fix compiling issue by adding 'MVS_' for "enum pci_interrupt_cause" arch: unicore32: kernel: ksyms: remove 'bswapsi2' and 'muldi3' to avoid compiling failure arch/unicore32/kernel/ksyms.c: remove 2 export symbols to avoid compiling failure drivers/rtc/rtc-puv3.c: remove "&dev->" for typo issue MIME-Version: 1.0 drivers/rtc/rtc-puv3.c: use dev_dbg() instead of dev_debug() for typo issue arch/unicore32/include/asm/io.h: add readl_relaxed() generic definition arch/unicore32/include/asm/ptrace.h: add generic definition for profile_pc() arch/unicore32/mm/alignment.c: include "asm/pgtable.h" to avoid compiling error arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macros arch/unicore32/kernel/module.c: use __vmalloc_node_range() instead of __vmalloc_area() arch/unicore32/kernel/ksyms.c: remove several undefined exported symbols
2014-06-21Merge tag 'char-misc-3.16-rc2' of ↵Linus Torvalds4-3/+12
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc driver fixes from Greg KH: "Here are 3 patches, one a revert of the UIO patch you objected to in 3.16-rc1 and that no one wanted to defend, a w1 driver bugfix, and a MAINTAINERS update for the vmware balloon driver. All of these, except for the MAINTAINERS update which just got added, have been in linux-next just fine" * tag 'char-misc-3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: MAINTAINERS: add entry for VMware Balloon driver w1: mxc_w1: Fix incorrect "presence" status Revert "uio: fix vma io range check in mmap"
2014-06-21Merge tag 'staging-3.16-rc2' of ↵Linus Torvalds14-34/+49
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Here are a few fixes for staging and iio drivers that resolve issues reported in 3.16-rc1. All have been in linux-next just fine" * tag 'staging-3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: imx-drm: parallel-display: Fix DPMS default state. staging: android: timed_output: fix use after free of dev staging: comedi: addi_apci_1564: add addi_watchdog dependency staging: rtl8723au: Reference correct firmwarefiles with MODULE_FIRMWARE() staging: rtl8723au: Request correct firmware file for A-cut parts iio: adc: checking for NULL instead of IS_ERR() in probe iio: adc: at91: signedness bug in at91_adc_get_trigger_value_by_name() iio: mxs-lradc: fix divider iio: Fix endianness issue in ak8975_read_axis() staging/iio: IIO_SIMPLE_DUMMY_BUFFER neds IIO_BUFFER twl4030-madc: Request processed values in twl4030_get_madc_conversion staging: iio: tsl2x7x_core: fix proximity treshold iio: Fix two mpl3115 issues in measurement conversion iio: hid-sensors: Get feature report from sensor hub after changing power state
2014-06-21Merge tag 'tty-3.16-rc2' of ↵Linus Torvalds38-44/+60
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial bugfixes from Greg KH: "Here are some tty / serial driver bugfixes for 3.16-rc2 that resolve some reported issues. The samsung driver build error itself has been reported by a bunch of people, sorry about that one. The others are all tiny and everyone seems to like them in linux-next so far" * tag 'tty-3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty/serial: fix 8250 early console option passing to regular console tty: Correct INPCK handling serial: Fix IGNBRK handling serial: samsung: Fix build error
2014-06-21Merge tag 'usb-3.16-rc2' of ↵Linus Torvalds6-42/+119
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some USB fixes for 3.16-rc2 that resolve some reported issues. All of these have been in linux-next for a while with no problems" * tag 'usb-3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: usbtest: add a timeout for scatter-gather tests USB: EHCI: avoid BIOS handover on the HASEE E200 usb: fix hub-port pm_runtime_enable() vs runtime pm transitions usb: quiet peer failure warning, disable poweroff usb: improve "not suspended yet" message in hub_suspend() xhci: Fix sleeping with IRQs disabled in xhci_stop_device() usb: fix ->update_hub_device() vs hdev->maxchild
2014-06-20MAINTAINERS: add entry for VMware Balloon driverDmitry Torokhov2-1/+10
Signed-off-by: Dmitry Torokhov <dtor@vmware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19Merge tag 'pm+acpi-3.16-rc2' of ↵Linus Torvalds17-60/+167
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI and power management fixes from Rafael Wysocki: "These are fixes mostly (ia64 regression related to the ACPI enumeration of devices, cpufreq regressions, fix for I2C controllers included in Intel SoCs, mvebu cpuidle driver fix related to sysfs) plus additional kernel command line arguments from Kees to make it possible to build kernel images with hibernation and the kernel address space randomization included simultaneously, a new ACPI battery driver quirk for a system with a broken BIOS and a couple of ACPI core cleanups. Specifics: - Fix for an ia64 regression introduced during the 3.11 cycle by a commit that modified the hardware initialization ordering and made device discovery fail on some systems. - Fix for a build problem on systems where the cpufreq-cpu0 driver is built-in and the cpu-thermal driver is modular from Arnd Bergmann. - Fix for a recently introduced computational mistake in the intel_pstate driver that leads to excessive rounding errors from Doug Smythies. - Fix for a failure code path in cpufreq_update_policy() that fails to unlock the locks acquired previously from Aaron Plattner. - Fix for the cpuidle mvebu driver to use shorter state names which will prevent the sysfs interface from returning mangled strings. From Gregory Clement. - ACPI LPSS driver fix to make sure that the I2C controllers included in BayTrail SoCs are not held in the reset state while they are being probed from Mika Westerberg. - New kernel command line arguments making it possible to build kernel images with hibernation and kASLR included at the same time and to select which of them will be used via the command line (they are still functionally mutually exclusive, though). From Kees Cook. - ACPI battery driver quirk for Acer Aspire V5-573G that fails to send battery status change notifications timely from Alexander Mezin. - Two ACPI core cleanups from Christoph Jaeger and Fabian Frederick" * tag 'pm+acpi-3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpuidle: mvebu: Fix the name of the states cpufreq: unlock when failing cpufreq_update_policy() intel_pstate: Correct rounding in busy calculation ACPI: use kstrto*() instead of simple_strto*() ACPI / processor replace __attribute__((packed)) by __packed ACPI / battery: add quirk for Acer Aspire V5-573G ACPI / battery: use callback for setting up quirks ACPI / LPSS: Take I2C host controllers out of reset x86, kaslr: boot-time selectable with hibernation PM / hibernate: introduce "nohibernate" boot parameter cpufreq: cpufreq-cpu0: fix CPU_THERMAL dependency ACPI / ia64 / sba_iommu: Restore the working initialization ordering
2014-06-19Merge tag 'sound-3.16-rc2' of ↵Linus Torvalds19-133/+213
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "The significant part here is a few security fixes for ALSA core control API by Lars. Besides that, there are a few fixes for ASoC sigmadsp (again by Lars) for building properly, and small fixes for ASoC rsnd, MMP, PXA and FSL, in addition to a fix for bogus WARNING in i915/HD-audio binding" * tag 'sound-3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: control: Make sure that id->index does not overflow ALSA: control: Handle numid overflow ALSA: control: Don't access controls outside of protected regions ALSA: control: Fix replacing user controls ALSA: control: Protect user controls against concurrent access drm/i915, HD-audio: Don't continue probing when nomodeset is given ASoC: fsl: Fix build problem ASoC: rsnd: fixup index of src/dst mod when capture ASoC: fsl_spdif: Fix integer overflow when calculating divisors ASoC: fsl_spdif: Fix incorrect usage of regmap_read() ASoC: dapm: Make sure register value is in sync with DAPM kcontrol state ASoC: sigmadsp: Split regmap and I2C support into separate modules ASoC: MMP audio needs sram support ASoC: pxa: add I2C dependencies as needed
2014-06-19Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds48-832/+1373
Pull drm fixes from Dave Airlie: "This looks bigger than it is, as one of the nouveau firmware fixes ("drm/gf100-/gr: report class data to host on fwmthd failure") regenerates a bunch of the firmware files after changing the assembly by a few lines, without that, its more of a 36 files changed, 370 insertions(+), 129 deletions(-) It contains some vt.c fixes acked by Greg, for rare hard hangs on i915 loading, that also fixes hangs on reload and spurious register write errors. drm core: one fix for uninit memory nouveau: displayport rework caused a few regressions, Ben has been fixing them as the appear, along with some other fixes radeon: pageflipping regression fix, deep color fix, mode validation fixes i915: fbc disable, vga console kick off, backlight fix, divide-by-zero fix" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (33 commits) drm: fix uninitialized acquire_ctx fields (v2) drm/radeon: Fix radeon_irq_kms_pflip_irq_get/put() imbalance Revert "drm/radeon: remove drm_vblank_get|put from pflip handling" drm/radeon: improve dvi_mode_valid drm/radeon: update mode_valid testing for DP drm/radeon: Use dce5/6 hdmi deep color clock setup also on dce8+ drm/nouveau/disp: fix oops in destructor with headless cards drm/gf117/i2c: no aux channels on this chipset drm/nouveau/doc: update the thermal documentation drm/nouveau/pwr: fix typo in fifo wrap handling drm/nv50/disp: fix a potential oops in supervisor handling drm/nouveau/disp/dp: don't touch link config after success drm/nouveau/kms: reference vblank for crtc during pageflip. drm/gk104/fb/ram: fixups from an earlier search+replace drm/nv50/gr: remove an unneeded write while initialising PGRAPH drm/nv50/gr: fix overlap while zeroing zcull regions drm/gf100-/gr: report class data to host on fwmthd failure drm/gk104/ibus: increase various random timeouts drm/gk104/clk: only touch divider for mode we'll be using drm/radeon: Bypass hw lut's for > 8 bpc framebuffer scanout. ...
2014-06-19Merge branch 'for-linus' of git://git.kernel.dk/linux-blockLinus Torvalds11-96/+50
Pull block fixes from Jens Axboe: "A smaller collection of fixes for the block core that would be nice to have in -rc2. This pull request contains: - Fixes for races in the wait/wakeup logic used in blk-mq from Alexander. No issues have been observed, but it is definitely a bit flakey currently. Alternatively, we may drop the cyclic wakeups going forward, but that needs more testing. - Some cleanups from Christoph. - Fix for an oops in null_blk if queue_mode=1 and softirq completions are used. From me. - A fix for a regression caused by the chunk size setting. It inadvertently used max_hw_sectors instead of max_sectors, which is incorrect, and causes hangs on btrfs multi-disk setups (where hw sectors apparently isn't set). From me. - Removal of WQ_POWER_EFFICIENT in the kblockd creation. This was a recent addition as well, but it actually breaks blk-mq which relies on strict scheduling. If the workqueue power_efficient mode is turned on, this breaks blk-mq. From Matias. - null_blk module parameter description fix from Mike" * 'for-linus' of git://git.kernel.dk/linux-block: blk-mq: bitmap tag: fix races in bt_get() function blk-mq: bitmap tag: fix race on blk_mq_bitmap_tags::wake_cnt blk-mq: bitmap tag: fix races on shared ::wake_index fields block: blk_max_size_offset() should check ->max_sectors null_blk: fix softirq completions for queue_mode == 1 blk-mq: merge blk_mq_drain_queue and __blk_mq_drain_queue blk-mq: properly drain stopped queues block: remove WQ_POWER_EFFICIENT from kblockd null_blk: fix name and description of 'queue_mode' module parameter block: remove elv_abort_queue and blk_abort_flushes
2014-06-19Merge tag 'fixes-for-linus' of ↵Linus Torvalds44-158/+123
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "A first set of bug fixes that didn't make it for the merge window, and two Kconfig cleanups that still make sense at this point. Unfortunately, one of the two cleanups caused an unintended change in the original version, so we had to revert one part of it and do some more testing to ensure the rest is really fine. There was also a last-minute rebase of the patches to remove another bad commit" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: use menuconfig for sub-arch menus ARM: multi_v7_defconfig: re-enable SDHCI drivers ARM: EXYNOS: Fix compilation warning ARM: exynos: move sysram info to exynos.c ARM: dts: Specify the NAND ECC scheme explicitly on Armada 385 DB board ARM: dts: Specify the NAND ECC scheme explicitly on Armada 375 DB board ARM: exynos: cleanup kconfig option display misc: vexpress: fix error handling vexpress_syscfg_regmap_init() ARM: Remove ARCH_HAS_CPUFREQ config option ARM: integrator: fix section mismatch problem ARM: mvebu: DT: fix OpenBlocks AX3-4 RAM size ARM: samsung: make SAMSUNG_DMADEV optional remoteproc: da8xx: don't select CMA on no-MMU bus/arm-cci: add dependency on OF && CPU_V7 ARM: keystone requires ARM_PATCH_PHYS_VIRT ARM: omap2: fix am43xx dependency on l2x0 cache
2014-06-19w1: mxc_w1: Fix incorrect "presence" statusAlexander Shiyan1-1/+1
W1 reset_bus() should return zero if slave device is present. This patch fix this issue. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19imx-drm: parallel-display: Fix DPMS default state.Denis Carikli1-0/+7
If connector->dpms is left untouched, it defaults to DRM_MODE_DPMS_ON (0). As a result, drm_helper_connector_dpms will exit when it will be asked to set the state to DRM_MODE_DPMS_ON, because it is already set. That issue prevented displays from turning on at boot. Signed-off-by: Denis Carikli <denis@eukrea.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19staging: android: timed_output: fix use after free of devYi Zhang1-1/+0
tdev->dev has been freed in device_destroy(), it's not right to use dev_set_drvdata() after that; Signed-off-by: Yi Zhang <yizhang@marvell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20unicore32: Remove ARCH_HAS_CPUFREQ config optionStephen Boyd1-6/+0
This config exists entirely to hide the cpufreq menu from the kernel configuration unless a platform has selected it. Nothing is actually built if this config is 'Y' and it just leads to more patches that add a select under a platform Kconfig so that some other CPUfreq option can be chosen. Let's remove the option so that we can always enable CPUfreq drivers on unicore32 platforms. Cc: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20UniCore32: Change git tree location information in MAINTAINERSGuan Xuetao1-2/+2
UniCore32 git repo has moved to github. Branch 'unicore32' is used for prepared patches, and automatically merged to linux-next. Branch 'unicore32-working' is used for development. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
2014-06-20arch: unicore32: ksyms: export '__cpuc_coherent_kern_range' to avoid ↵Chen Gang1-0/+2
compiling failure flush_icache_range() is '__cpuc_coherent_kern_range' under unicore32, and lkdtm.ko needs it. At present, '__cpuc_coherent_kern_range' is still used by unicore32, so export it to avoid compiling failure. The related error (with allmodconfig under unicore32): ERROR: "__cpuc_coherent_kern_range" [drivers/misc/lkdtm.ko] undefined! Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch: unicore32: ksyms: export 'pm_power_off' to avoid compiling failure.Chen Gang1-0/+1
Two driver modules need 'pm_power_off', so export it. The related error (with allmodconfig under unicore32): MODPOST 4039 modules ERROR: "pm_power_off" [drivers/mfd/retu-mfd.ko] undefined! ERROR: "pm_power_off" [drivers/char/ipmi/ipmi_poweroff.ko] undefined! Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch: unicore32: ksyms: export additional find_first_*() to avoid compiling ↵Chen Gang1-0/+2
failure Some modules need find_first_bit() and find_first_zero_bit(), so export them. The related error (with allmodconfig under unicore32): MODPOST 4039 modules ERROR: "find_first_bit" [sound/soc/codecs/snd-soc-uda1380.ko] undefined! ERROR: "find_first_zero_bit" [net/sctp/sctp.ko] undefined! ... Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch:unicore32:mm: add devmem_is_allowed() to support STRICT_DEVMEMChen Gang1-0/+23
unicore32 supports STRICT_DEVMEM, so it needs devmem_is_allowed(), like some of other architectures have done (e.g. arm, powerpc, x86 ...). The related error with allmodconfig: CC drivers/char/mem.o drivers/char/mem.c: In function ‘range_is_allowed’: drivers/char/mem.c:69: error: implicit declaration of function ‘devmem_is_allowed’ make[2]: *** [drivers/char/mem.o] Error 1 make[1]: *** [drivers/char] Error 2 make: *** [drivers] Error 2 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20unicore32: include: asm: add missing ')' for PAGE_* macros in pgtable.hChen Gang1-5/+5
Missing related ')', the related compiling error: CC [M] drivers/gpu/drm/udl/udl_fb.o drivers/gpu/drm/udl/udl_fb.c: In function ‘udl_fb_mmap’: drivers/gpu/drm/udl/udl_fb.c:273: error: expected ‘)’ before ‘return’ drivers/gpu/drm/udl/udl_fb.c:281: error: expected expression before ‘}’ token make[4]: *** [drivers/gpu/drm/udl/udl_fb.o] Error 1 make[3]: *** [drivers/gpu/drm/udl] Error 2 make[2]: *** [drivers/gpu/drm] Error 2 make[1]: *** [drivers/gpu] Error 2 make: *** [drivers] Error 2 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/kernel/setup.c: add generic 'screen_info' to avoid compiling ↵Chen Gang1-0/+4
failure Add generic 'screen_info' just like another architectures have done (e.g. tile, sh, score, ia64, hexagon, and cris). The related error (with allmodconfig under unicore32): LD init/built-in.o drivers/built-in.o: In function `vgacon_save_screen': powercap_sys.c:(.text+0x21788): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_resize': powercap_sys.c:(.text+0x21b54): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_switch': powercap_sys.c:(.text+0x21cb4): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_init': powercap_sys.c:(.text+0x2296c): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_startup': powercap_sys.c:(.text+0x22e80): undefined reference to `screen_info' Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20drivers: scsi: mvsas: fix compiling issue by adding 'MVS_' for "enum ↵Chen Gang2-34/+34
pci_interrupt_cause" The direct cause is IRQ_SPI is already defined as a macro in unicore32 architecture (also, blackfin and mips architectures define it). The related error (unicore32 with allmodconfig) CC [M] drivers/scsi/mvsas/mv_94xx.o In file included from drivers/scsi/mvsas/mv_94xx.c:27: drivers/scsi/mvsas/mv_94xx.h:176: error: expected identifier before numeric constant And IRQ_SAS_A and IRQ_SAS_B are used as 'u32' (although "enum pci_interrupt_cause" is not used directly, now). All together, need add 'MVS_' for "enum pci_interrupt_cause". Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch: unicore32: kernel: ksyms: remove 'bswapsi2' and 'muldi3' to avoid ↵Chen Gang2-4/+0
compiling failure After check the code, 'bswapsi2' and 'muldi3' are useless for unicore32, so can remove them to avoid compiling failure. The related error (with allmodconfig under unicore32): LD init/built-in.o arch/unicore32/kernel/built-in.o:(___ksymtab+__muldi3+0x0): undefined reference to `__muldi3' arch/unicore32/kernel/built-in.o:(___ksymtab+__bswapsi2+0x0): undefined reference to `__bswapsi2' Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/kernel/ksyms.c: remove 2 export symbols to avoid compiling ↵Chen Gang1-4/+0
failure 'csum_partial' and 'csum_partial_copy_from_user' have already been exported in "lib/", so need not export them again, or it will cause compiling error. The related error (with allmodconfig under unicore32): LD vmlinux.o lib/built-in.o:(___ksymtab+csum_partial+0x0): multiple definition of `__ksymtab_csum_partial' arch/unicore32/kernel/built-in.o:(___ksymtab+csum_partial+0x0): first defined here lib/built-in.o:(___ksymtab+csum_partial_copy_from_user+0x0): multiple definition of `__ksymtab_csum_partial_copy_from_user' arch/unicore32/kernel/built-in.o:(___ksymtab+csum_partial_copy_from_user+0x0): first defined here make: *** [vmlinux] Error 1 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20drivers/rtc/rtc-puv3.c: remove "&dev->" for typo issue MIME-Version: 1.0Chen Gang1-1/+1
It is only a typo issue, the related commit: "1fbc4c4 drivers/rtc/rtc-puv3.c: use dev_dbg() instead of pr_debug()" The related error (for unicore32 with allmodconfig): CC [M] drivers/rtc/rtc-puv3.o drivers/rtc/rtc-puv3.c: In function 'puv3_rtc_setalarm': drivers/rtc/rtc-puv3.c:143: error: 'struct device' has no member named 'dev' Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20drivers/rtc/rtc-puv3.c: use dev_dbg() instead of dev_debug() for typo issueChen Gang1-1/+1
It is only a typo issue, the related commit: "1fbc4c4 drivers/rtc/rtc-puv3.c: use dev_dbg() instead of pr_debug()" The related error (unicore32 with allmodconfig): CC [M] drivers/rtc/rtc-puv3.o drivers/rtc/rtc-puv3.c: In function 'puv3_rtc_setpie': drivers/rtc/rtc-puv3.c:74: error: implicit declaration of function 'dev_debug' Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/include/asm/io.h: add readl_relaxed() generic definitionChen Gang1-0/+4
Need generic definition for readl_relaxed(), like other architectures have done. Or can not pass compiling with allmodconfig, the related error: CC [M] drivers/message/fusion/mptbase.o drivers/message/fusion/mptbase.c: In function 'mpt_send_handshake_request': drivers/message/fusion/mptbase.c:1224: error: implicit declaration of function 'readl_relaxed' Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/include/asm/ptrace.h: add generic definition for profile_pc()Chen Gang1-0/+1
Add generic definition just like another architectures have done, or can not pass compiling with allmodconfig, the related error: CC kernel/profile.o kernel/profile.c: In function 'profile_tick': kernel/profile.c:419: error: implicit declaration of function 'profile_pc' make[1]: *** [kernel/profile.o] Error 1 make: *** [kernel] Error 2 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/mm/alignment.c: include "asm/pgtable.h" to avoid compiling errorChen Gang1-0/+1
Need include "asm/pgtable.h" to include "asm-generic/pgtable-nopmd.h", so can let 'pmd_t' defined. The related error with allmodconfig: CC arch/unicore32/mm/alignment.o In file included from arch/unicore32/mm/alignment.c:24: arch/unicore32/include/asm/tlbflush.h:135: error: expected .). before .*. token arch/unicore32/include/asm/tlbflush.h:154: error: expected .). before .*. token In file included from arch/unicore32/mm/alignment.c:27: arch/unicore32/mm/mm.h:15: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token arch/unicore32/mm/mm.h:20: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token arch/unicore32/mm/mm.h:25: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token make[1]: *** [arch/unicore32/mm/alignment.o] Error 1 make: *** [arch/unicore32/mm] Error 2 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macrosChen Gang1-4/+4
Add readl() and writel() for 'PM_' macros, just like another areas have done within unicored32, or will cause compiling issue. The related error (allmodconfig for unicored32): CC arch/unicore32/kernel/clock.o arch/unicore32/kernel/clock.c: In function 'clk_set_rate': arch/unicore32/kernel/clock.c:182: warning: initialization makes integer from pointer without a cast arch/unicore32/kernel/clock.c:204: error: lvalue required as left operand of assignment arch/unicore32/kernel/clock.c:206: error: lvalue required as left operand of assignment arch/unicore32/kernel/clock.c:207: error: invalid operands to binary & (have 'void *' and 'long unsigned int') make[1]: *** [arch/unicore32/kernel/clock.o] Error 1 make: *** [arch/unicore32/kernel] Error 2 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/kernel/module.c: use __vmalloc_node_range() instead of ↵Chen Gang1-8/+3
__vmalloc_area() __vmalloc_area() has already been removed from upstream kernel, need use __vmalloc_node_range() instead of. The related commit: "d0a2126 mm: unify module_alloc code for vmalloc". The related error (allmodconfig for unicore32): CC arch/unicore32/kernel/module.o arch/unicore32/kernel/module.c: In function 'module_alloc' : arch/unicore32/kernel/module.c:34: error: implicit declaration of function '__vmalloc_area' arch/unicore32/kernel/module.c:34: warning: return makes pointer from integer without a cast make[1]: *** [arch/unicore32/kernel/module.o] Error 1 make: *** [arch/unicore32/kernel] Error 2 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-20arch/unicore32/kernel/ksyms.c: remove several undefined exported symbolsChen Gang1-33/+0
For 'csum_partial_copy_nocheck()', it has default definition in 'asm-generic'. For '__raw_reads?()' and '__raw_writes?()' are used by the drivers which no relationship with allmodconfig for unicode32, the related modules are: drivers/mmc/host/omap.c drivers/mtd/nand/atmel_nand.c drivers/mtd/nand/pxa3xx_nand.c drivers/usb/gadget/at91_udc.c Others are only within some architectures (not kernel wide). The related error with allmodconfig for unicode32: CC arch/unicore32/kernel/ksyms.o arch/unicore32/kernel/ksyms.c:29: error: ._backtrace. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:29: error: type defaults to .nt. in declaration of ._backtrace. arch/unicore32/kernel/ksyms.c:38: error: .sum_partial_copy_nocheck. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:38: error: type defaults to .nt. in declaration of .sum_partial_copy_nocheck. arch/unicore32/kernel/ksyms.c:39: error: ._csum_ipv6_magic. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:39: error: type defaults to .nt. in declaration of ._csum_ipv6_magic. arch/unicore32/kernel/ksyms.c:43: error: ._raw_readsb. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:43: error: type defaults to .nt. in declaration of ._raw_readsb. arch/unicore32/kernel/ksyms.c:46: error: ._raw_readsw. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:46: error: type defaults to .nt. in declaration of ._raw_readsw. arch/unicore32/kernel/ksyms.c:49: error: ._raw_readsl. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:49: error: type defaults to .nt. in declaration of ._raw_readsl. arch/unicore32/kernel/ksyms.c:52: error: ._raw_writesb. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:52: error: type defaults to .nt. in declaration of ._raw_writesb. arch/unicore32/kernel/ksyms.c:55: error: ._raw_writesw. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:55: error: type defaults to .nt. in declaration of ._raw_writesw. arch/unicore32/kernel/ksyms.c:58: error: ._raw_writesl. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:58: error: type defaults to .nt. in declaration of ._raw_writesl. arch/unicore32/kernel/ksyms.c:79: error: ._get_user_1. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:79: error: type defaults to .nt. in declaration of ._get_user_1. arch/unicore32/kernel/ksyms.c:80: error: ._get_user_2. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:80: error: type defaults to .nt. in declaration of ._get_user_2. arch/unicore32/kernel/ksyms.c:81: error: ._get_user_4. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:81: error: type defaults to .nt. in declaration of ._get_user_4. arch/unicore32/kernel/ksyms.c:83: error: ._put_user_1. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:83: error: type defaults to .nt. in declaration of ._put_user_1. arch/unicore32/kernel/ksyms.c:84: error: ._put_user_2. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:84: error: type defaults to .nt. in declaration of ._put_user_2. arch/unicore32/kernel/ksyms.c:85: error: ._put_user_4. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:85: error: type defaults to .nt. in declaration of ._put_user_4. arch/unicore32/kernel/ksyms.c:86: error: ._put_user_8. undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:86: error: type defaults to .nt. in declaration of ._put_user_8. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn> Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
2014-06-19Btrfs: fix wrong error handle when the device is missing or is not writeableMiao Xie1-7/+15
The original bio might be submitted, so we shoud increase bi_remaining to account for it when we deal with the error that the device is missing or is not writeable, or we would skip the endio handle. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19Btrfs: fix deadlock when mounting a degraded fsMiao Xie2-1/+9
The deadlock happened when we mount degraded filesystem, the reproduced steps are following: # mkfs.btrfs -f -m raid1 -d raid1 <dev0> <dev1> # echo 1 > /sys/block/`basename <dev0>`/device/delete # mount -o degraded <dev1> <mnt> The reason was that the counter -- bi_remaining was wrong. If the missing or unwriteable device was the last device in the mapping array, we would not submit the original bio, so we shouldn't increase bi_remaining of it in btrfs_end_bio(), or we would skip the final endio handle. Fix this problem by adding a flag into btrfs bio structure. If we submit the original bio, we will set the flag, and we increase bi_remaining counter, or we don't. Though there is another way to fix it -- decrease bi_remaining counter of the original bio when we make sure the original bio is not submitted, this method need add more check and is easy to make mistake. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Reviewed-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19Btrfs: use bio_endio_nodec instead of open codeMiao Xie1-8/+1
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19Btrfs: fix NULL pointer crash when running balance and scrub concurrentlyWang Shilong3-7/+6
While running balance, scrub, fsstress concurrently we hit the following kernel crash: [56561.448845] BTRFS info (device sde): relocating block group 11005853696 flags 132 [56561.524077] BUG: unable to handle kernel NULL pointer dereference at 0000000000000078 [56561.524237] IP: [<ffffffffa038956d>] scrub_chunk.isra.12+0xdd/0x130 [btrfs] [56561.524297] PGD 9be28067 PUD 7f3dd067 PMD 0 [56561.524325] Oops: 0000 [#1] SMP [....] [56561.527237] Call Trace: [56561.527309] [<ffffffffa038980e>] scrub_enumerate_chunks+0x24e/0x490 [btrfs] [56561.527392] [<ffffffff810abe00>] ? abort_exclusive_wait+0x50/0xb0 [56561.527476] [<ffffffffa038add4>] btrfs_scrub_dev+0x1a4/0x530 [btrfs] [56561.527561] [<ffffffffa0368107>] btrfs_ioctl+0x13f7/0x2a90 [btrfs] [56561.527639] [<ffffffff811c82f0>] do_vfs_ioctl+0x2e0/0x4c0 [56561.527712] [<ffffffff8109c384>] ? vtime_account_user+0x54/0x60 [56561.527788] [<ffffffff810f768c>] ? __audit_syscall_entry+0x9c/0xf0 [56561.527870] [<ffffffff811c8551>] SyS_ioctl+0x81/0xa0 [56561.527941] [<ffffffff815707f7>] tracesys+0xdd/0xe2 [...] [56561.528304] RIP [<ffffffffa038956d>] scrub_chunk.isra.12+0xdd/0x130 [btrfs] [56561.528395] RSP <ffff88004c0f5be8> [56561.528454] CR2: 0000000000000078 This is because in btrfs_relocate_chunk(), we will free @bdev directly while scrub may still hold extent mapping, and may access freed memory. Fix this problem by wrapping freeing @bdev work into free_extent_map() which is based on reference count. Reported-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19btrfs: Skip scrubbing removed chunks to avoid -ENOENT.Qu Wenruo1-10/+9
When run scrub with balance, sometimes -ENOENT will be returned, since in scrub_enumerate_chunks() will search dev_extent in *COMMIT_ROOT*, but btrfs_lookup_block_group() will search block group in *MEMORY*, so if a chunk is removed but not committed, -ENOENT will be returned. However, there is no need to stop scrubbing since other chunks may be scrubbed without problem. So this patch changes the behavior to skip removed chunks and continue to scrub the rest. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19Btrfs: fix broken free space cache after the system crashedMiao Xie4-44/+186
When we mounted the filesystem after the crash, we got the following message: BTRFS error (device xxx): block group xxxx has wrong amount of free space BTRFS error (device xxx): failed to load free space cache for block group xxx It is because we didn't update the metadata of the allocated space (in extent tree) until the file data was written into the disk. During this time, there was no information about the allocated spaces in either the extent tree nor the free space cache. when we wrote out the free space cache at this time (commit transaction), those spaces were lost. In fact, only the free space that is used to store the file data had this problem, the others didn't because the metadata of them is updated in the same transaction context. There are many methods which can fix the above problem - track the allocated space, and write it out when we write out the free space cache - account the size of the allocated space that is used to store the file data, if the size is not zero, don't write out the free space cache. The first one is complex and may make the performance drop down. This patch chose the second method, we use a per-block-group variant to account the size of that allocated space. Besides that, we also introduce a per-block-group read-write semaphore to avoid the race between the allocation and the free space cache write out. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19Btrfs: make free space cache write out functions more readableMiao Xie1-66/+93
This patch makes the free space cache write out functions more readable, and beisdes that, it also reduces the stack space that the function -- __btrfs_write_out_cache uses from 194bytes to 144bytes. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19Btrfs: remove unused wait queue in struct extent_bufferFilipe Manana1-1/+0
The lock_wq wait queue is not used anywhere, therefore just remove it. On a x86_64 system, this reduced sizeof(struct extent_buffer) from 320 bytes down to 296 bytes, which means a 4Kb page can now be used for 13 extent buffers instead of 12. Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19Btrfs: fix deadlocks with trylock on tree nodesChris Mason1-34/+46
The Btrfs tree trylock function is poorly named. It always takes the spinlock and backs off if the blocking lock is held. This can lead to surprising lockups because people expect it to really be a trylock. This commit makes it a pure trylock, both for the spinlock and the blocking lock. It also reworks the nested lock handling slightly to avoid taking the read lock while a spinning write lock might be held. Signed-off-by: Chris Mason <clm@fb.com>
2014-06-19tty/serial: fix 8250 early console option passing to regular consoleRob Herring2-2/+5
In the conversion to generic early console, the passing of options from the early 8250 console to the regular ttyS console was broken. This resulted in the baud rate changing when switching consoles during boot. This feature allows specifying a single console option on the kernel command line rather than both an early console and regular serial tty console. It would be nice to generalize this feature. However, it only works if the correct baud rate can be probed early which is not the case on many platforms which have non-standard UART clock rates. So for now, this is left as an 8250 specific feature. Reported-and-tested-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Rob Herring <robh@kernel.org> Cc: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19tty: Correct INPCK handlingPeter Hurley1-9/+10
If INPCK is not set, input parity detection should be disabled. This means parity errors should not be received from the tty driver, and the data received should be treated normally. SUS v3, 11.2.2, General Terminal Interface - Input Modes, states: "If INPCK is set, input parity checking shall be enabled. If INPCK is not set, input parity checking shall be disabled, allowing output parity generation without input parity errors. Note that whether input parity checking is enabled or disabled is independent of whether parity detection is enabled or disabled (see Control Modes). If parity detection is enabled but input parity checking is disabled, the hardware to which the terminal is connected shall recognize the parity bit, but the terminal special file shall not check whether or not this bit is correctly set." Ignore parity errors reported by the tty driver when INPCK is not set, and handle the received data normally. Fixes: Bugzilla #71681, 'Improvement of n_tty_receive_parity_error from n_tty.c' Reported-by: Ivan <athlon_@mail.ru> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19serial: Fix IGNBRK handlingPeter Hurley34-32/+44
If IGNBRK is set without either BRKINT or PARMRK set, some uart drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the line discipline, when it should send either nothing or the TTYBREAK flag set. This happens because the read_status_mask masks out the BI condition, which uart_insert_char() then interprets as a normal 0x00 byte. SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General Terminal Interface - Input Modes, states: "If IGNBRK is set, a break condition detected on input shall be ignored; that is, not put on the input queue and therefore not read by any process." Fix read_status_mask to include the BI bit if IGNBRK is set; the lsr status retains the BI bit if a BREAK is recv'd, which is subsequently ignored in uart_insert_char() when masked with the ignore_status_mask. Affected drivers: 8250 - all serial_txx9 mfd amba-pl010 amba-pl011 atmel_serial bfin_uart dz ip22zilog max310x mxs-auart netx-serial pnx8xxx_uart pxa sb1250-duart sccnxp serial_ks8695 sirfsoc_uart st-asc vr41xx_siu zs sunzilog fsl_lpuart sunsab ucc_uart bcm63xx_uart sunsu efm32-uart pmac_zilog mpsc msm_serial m32r_sio Unaffected drivers: omap-serial rp2 sa1100 imx icom Annotated for fixes: altera_uart mcf Drivers without break detection: 21285 xilinx-uartps altera_jtaguart apbuart arc-uart clps711x max3100 uartlite msm_serial_hs nwpserial lantiq vt8500_serial Unknown: samsung mpc52xx_uart bfin_sport_uart cpm_uart/core Fixes: Bugzilla #71651, '8250_core.c incorrectly handles IGNBRK flag' Reported-by: Ivan <athlon_@mail.ru> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19Merge branch 'for-linus' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security maintainership update from James Morris: "Add Serge Hallyn as security subsystem co-maintainer" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: security: add Serge Hallyn as a maintainer
2014-06-19Merge tag 'stable/for-linus-3.16-rc1-tag' of ↵Linus Torvalds4-30/+39
git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull Xen fixes from David Vrabel: "Xen regression and PVH fixes for 3.16-rc1 - fix dom0 PVH memory setup on latest unstable Xen releases - fix 64-bit x86 PV guest boot failure on Xen 3.1 and earlier - fix resume regression on non-PV (auto-translated physmap) guests" * tag 'stable/for-linus-3.16-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/grant-table: fix suspend for non-PV guests x86/xen: no need to explicitly register an NMI callback Revert "xen/pvh: Update E820 to work with PVH (v2)" x86/xen: fix memory setup for PVH dom0
2014-06-19Merge tag 'arm64-fixes' of ↵Linus Torvalds16-77/+142
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: "These are primarily bug fixes with a performance improvement patch for the GHASH crypto algorithm (which went in during this merging window) and dts/defconfig/Kconfig updates. - ftrace_return_addr() macro fix for arm (introduced earlier via the arm64 tree) - stack alignment exception entry code fix - GHASH crypto algorithm fix and performance improvement - CMA buffer limited to 32-bit (until a better way to describe the system topology in DT) - UAPI sigcontext.h build fix - __kernel_old_{gid,uid}_t definitions fix (affecting 32-bit LTP) - ptrace fixes (kernel fault and 32-bit arm core dump) - pte_mknotpresent() fix - dts updates (APM SoC) - defconfig and Kconfig update" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: remove broken &= operator from pmd_mknotpresent arm64: fix build error in sigcontext.h arm64: dts: Add more serial port nodes in APM X-Gene device tree arm64/dma: Removing ARCH_HAS_DMA_GET_REQUIRED_MASK macro arm64: ptrace: fix empty registers set in prstatus of aarch32 process core arm64: uid16: fix __kernel_old_{gid,uid}_t definitions arm64: ptrace: change fs when passing kernel pointer to regset code arm64: Limit the CMA buffer to 32-bit if ZONE_DMA arm/ftrace: fix ftrace_return_addr() to ftrace_return_address() arm64/crypto: improve performance of GHASH algorithm arm64/crypto: fix data corruption bug in GHASH algorithm arm64: defconfig update for LTP arm64: ftrace: Fix comment typo 'CONFIG_FUNCTION_GRAPH_FP_TEST' arm64: add ARCH_HAS_OPP to allow enabling OPP library arm64: restore alphabetic order in Kconfig arm64: Bug fix in stack alignment exception
2014-06-19Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-nextLinus Torvalds160-1853/+1579
Pull sparc fixes from David Miller: "Sparc sparse fixes from Sam Ravnborg" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next: (67 commits) sparc64: fix sparse warnings in int_64.c sparc64: fix sparse warning in ftrace.c sparc64: fix sparse warning in kprobes.c sparc64: fix sparse warning in kgdb_64.c sparc64: fix sparse warnings in compat_audit.c sparc64: fix sparse warnings in init_64.c sparc64: fix sparse warnings in aes_glue.c sparc: fix sparse warnings in smp_32.c + smp_64.c sparc64: fix sparse warnings in perf_event.c sparc64: fix sparse warnings in kprobes.c sparc64: fix sparse warning in tsb.c sparc64: clean up compat_sigset_t.seta handling sparc64: fix sparse "Should it be static?" warnings in signal32.c sparc64: fix sparse warnings in sys_sparc32.c sparc64: fix sparse warning in pci.c sparc64: fix sparse warnings in smp_64.c sparc64: fix sparse warning in prom_64.c sparc64: fix sparse warning in btext.c sparc64: fix sparse warnings in sys_sparc_64.c + unaligned_64.c sparc64: fix sparse warning in process_64.c ... Conflicts: arch/sparc/include/asm/pgtable_64.h
2014-06-19Merge branches 'pm-cpufreq' and 'pm-cpuidle'Rafael J. Wysocki4-12/+9
* pm-cpufreq: cpufreq: unlock when failing cpufreq_update_policy() intel_pstate: Correct rounding in busy calculation cpufreq: cpufreq-cpu0: fix CPU_THERMAL dependency * pm-cpuidle: cpuidle: mvebu: Fix the name of the states
2014-06-19Merge branch 'pm-sleep'Rafael J. Wysocki7-11/+61
* pm-sleep: x86, kaslr: boot-time selectable with hibernation PM / hibernate: introduce "nohibernate" boot parameter
2014-06-19Merge branches 'acpi-general', 'acpi-processor', 'acpi-lpss' and 'acpi-battery'Rafael J. Wysocki5-10/+60
* acpi-general: ACPI: use kstrto*() instead of simple_strto*() * acpi-processor: ACPI / processor replace __attribute__((packed)) by __packed * acpi-lpss: ACPI / LPSS: Take I2C host controllers out of reset * acpi-battery: ACPI / battery: add quirk for Acer Aspire V5-573G ACPI / battery: use callback for setting up quirks
2014-06-19Merge tag 'drm-intel-fixes-2014-06-17' of ↵Dave Airlie12-34/+92
git://anongit.freedesktop.org/drm-intel into drm-next First round of fixes for 3.16-rc, mostly cc: stable, and the vt/vgacon fixes from Daniel [1] to avoid hangs and unclaimed register errors on module load/reload. * tag 'drm-intel-fixes-2014-06-17' of git://anongit.freedesktop.org/drm-intel: drm/i915/bdw: remove erroneous chv specific workarounds from bdw code drm/i915: fix possible refcount leak when resetting forcewake drm/i915: Reorder semaphore deadlock check drm/i95: Initialize active ring->pid to -1 drm/i915: set backlight duty cycle after backlight enable for gen4 drm/i915: Avoid div-by-zero when pixel_multiplier is zero drm/i915: Disable FBC by default also on Haswell and later drm/i915: Kick out vga console drm/i915: Fixup global gtt cleanup vt: Don't ignore unbind errors in vt_unbind vt: Fix up unregistration of vt drivers vt: Fix replacement console check when unbinding
2014-06-19drm: fix uninitialized acquire_ctx fields (v2)Rob Clark1-0/+1
The acquire ctx will typically be declared on the stack, which means we could have garbage values for any uninitialized field. In this case, it was triggering WARN_ON()s because 'contended' had garbage value. Go ahead and use memset() to be more future-proof. v2: now with extra brown paper bag Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-06-19Merge branch 'drm-fixes-3.16' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie3-15/+41
into drm-next mode validation, deep color and pageflipping fixes. * 'drm-fixes-3.16' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: Fix radeon_irq_kms_pflip_irq_get/put() imbalance Revert "drm/radeon: remove drm_vblank_get|put from pflip handling" drm/radeon: improve dvi_mode_valid drm/radeon: update mode_valid testing for DP drm/radeon: Use dce5/6 hdmi deep color clock setup also on dce8+
2014-06-18staging: comedi: addi_apci_1564: add addi_watchdog dependencyArnd Bergmann1-0/+1
With commit aed3f9d498b ("staging: comedi: addi_apci_1564: absorb apci1564_reset()"), the apci 1564 driver has gained a dependency on the addi watchdog module, which is not reflected correctly in Kconfig, and that can lead to link errors when the watchdog is disabled. This adds an explicit 'select', like it is done in the other addi apci drivers that need it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18drm/radeon: Fix radeon_irq_kms_pflip_irq_get/put() imbalanceMichel Dänzer1-1/+1
Fixes a regression in 3.16-rc1 compared to 3.15. The unbalanced calls would presumably result in the page flip interrupts never getting disabled once they are enabled. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18Revert "drm/radeon: remove drm_vblank_get|put from pflip handling"Michel Dänzer1-0/+17
This reverts commit 75f36d861957cb05b7889af24c8cd4a789398304. drm_vblank_get() is necessary to ensure the DRM vblank counter value is up to date in drm_send_vblank_event(). Seems to fix weston hangs waiting for page flips to complete. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18drm/radeon: improve dvi_mode_validAlex Deucher1-9/+7
Make sure we have an HDMI monitor before validating modes with clocks >165 Mhz on single link connections. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18drm/radeon: update mode_valid testing for DPAlex Deucher1-4/+15
When we have a passive adapter validate the clocks against the HMDI/DVI limits. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18drm/radeon: Use dce5/6 hdmi deep color clock setup also on dce8+Mario Kleiner1-1/+1
Need to use the adjusted clock on dce8 as well. bug: https://bugs.freedesktop.org/show_bug.cgi?id=80029 Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18cpuidle: mvebu: Fix the name of the statesGregory CLEMENT1-2/+2
The length name of the states 2 was too long to fit in the allocated string (limited to 16 bytes). This lead to improper string displayed through sysfs. This patch shorten the name by removing the reference to Marvell and to the CPU as both are implicit. For coherency the same change have been done for the states 1. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-06-18cpufreq: unlock when failing cpufreq_update_policy()Aaron Plattner1-6/+4
Commit bd0fa9bb455d introduced a failure path to cpufreq_update_policy() if cpufreq_driver->get(cpu) returns NULL. However, it jumps to the 'no_policy' label, which exits without unlocking any of the locks the function acquired earlier. This causes later calls into cpufreq to hang. Fix this by creating a new 'unlock' label and jumping to that instead. Fixes: bd0fa9bb455d ("cpufreq: Return error if ->get() failed in cpufreq_update_policy()") Link: https://devtalk.nvidia.com/default/topic/751903/kernel-3-15-and-nv-drivers-337-340-failed-to-initialize-the-nvidia-kernel-module-gtx-550-ti-/ Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Cc: 3.15+ <stable@vger.kernel.org> # 3.15+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-06-18kbuild: fix a typo in a kbuild documentMasahiro Yamada1-1/+1
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-06-18builddeb: fix missing headers in linux-headers packageFathi Boudra1-1/+3
The kernel headers package (linux-headers) doesn't include several header files required to build out-of-tree modules. It makes the package unusable on e.g. ARM architecture: /usr/src/linux-headers-3.14.0/arch/arm/include/asm/memory.h:24:25: fatal error: mach/memory.h: No such file or directory #include <mach/memory.h> ^ compilation terminated. Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> Reviewed-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-06-18Merge tag 'iio-fixes-for-3.16a' of ↵Greg Kroah-Hartman9-31/+37
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First set of IIO fixes for the 3.16 cycle. A mixed bag of fixes, many of which feel just to late for 3.15. * hid sensors - some devices need a feature report request in order to change power state. This isn't part of the spec, but has been observed on several devices and does no harm to others. * mpl3115 has had two errors in the buffer description fixed. The presure is signed, not unsigned and the temperature has 12 bits rather than 16. These could lead to incorrect interpretation of the data in userspace. * tsl2x7x - the high byte of the proximity thresholds should be written along with the low byte (which was). This could lead to interesting results with large thresholds. * twl4030 - a flag to specify processed values were required was not set when initializing a reading. As such values returned were in an unknown state. Fixed by simply initializing it appropriately. * IIO_SIMPLE_DUMMY_BUFFER did not select IIO_BUFFER leading to randconfig build errors. * ak8975 was applying an unwanted le16_to_cpu conversion as the i2c framework already performs one. As such for big endian systems, the bytes would be in the wrong order in the magnetic field measurements reported. * mxs-lradc - the controllable voltage dividers were not enabled / disabled for later channels than the first one during conversion. * at91_adc error handling returned -ENOMEM in a u8. Return value of at91_adc_get_trigger_value_by_name changed to int thus allowing -ENOMEM and also original values to be returned. * mcb - mcb_request_mem returns and ERR_PTR but the caller was checking for NULL to detect an error.
2014-06-18Documentation: Fix DocBook build with relative $(srctree)Michal Marek1-2/+2
After commits 890676c6 (kbuild: Use relative path when building in the source tree) and 9da0763b (kbuild: Use relative path when building in a subdir of the source tree), the $(srctree) variable can be a relative path. This breaks Documentation/DocBook/media/Makefile, because it tries to create symlinks from a subdirectory of the object tree to the source tree. Fix this by using a full path in this case. Reported-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-06-18kbuild: Fix tar-pkg with relative $(objtree)Michal Marek1-2/+1
Commit 7e1c0477 (kbuild: Use relative path for $(objtree)) assumes that the build process does not change its working directory. make tar-pkg was a couterexample, fix this by changing directory only for the tar command and not for the whole script, which at one point references the now relative $(objtree). Reported-and-tested-by: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-06-18arm64: mm: remove broken &= operator from pmd_mknotpresentWill Deacon1-1/+1
This should be a plain old '&' and could easily lead to undefined behaviour if the target of a pmd_mknotpresent invocation was the same as the parameter. Fixes: 9c7e535fcc17 (arm64: mm: Route pmd thp functions through pte equivalents) Signed-off-by: Will Deacon <will.deacon@arm.com> Cc: <stable@vger.kernel.org> # v3.15 Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-06-18Merge branch 'topic/core-vuln-fixes' into for-linusTakashi Iwai3-27/+54
2014-06-18Merge tag 'asoc-v3.16-rc1' of ↵Takashi Iwai11-89/+135
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v3.16 Quite a few build coverage fixes in here among the usual small driver fixes includling the sigmadsp change from Lars - moving the driver to separate modules per bus (which is basically just code motion) avoids issues with some combinations of buses being enabled.
2014-06-18deb-pkg: Fix for relative pathsMichal Marek1-5/+5
When $srctree or $objtree are relative paths, we cannot change directory and refer to them in the same subshell. Do the redirection outside of the subshell to fix this. Reported-and-tested-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-06-18ALSA: control: Make sure that id->index does not overflowLars-Peter Clausen1-0/+3
The ALSA control code expects that the range of assigned indices to a control is continuous and does not overflow. Currently there are no checks to enforce this. If a control with a overflowing index range is created that control becomes effectively inaccessible and unremovable since snd_ctl_find_id() will not be able to find it. This patch adds a check that makes sure that controls with a overflowing index range can not be created. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-18ALSA: control: Handle numid overflowLars-Peter Clausen1-0/+4
Each control gets automatically assigned its numids when the control is created. The allocation is done by incrementing the numid by the amount of allocated numids per allocation. This means that excessive creation and destruction of controls (e.g. via SNDRV_CTL_IOCTL_ELEM_ADD/REMOVE) can cause the id to eventually overflow. Currently when this happens for the control that caused the overflow kctl->id.numid + kctl->count will also over flow causing it to be smaller than kctl->id.numid. Most of the code assumes that this is something that can not happen, so we need to make sure that it won't happen Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-18ALSA: control: Don't access controls outside of protected regionsLars-Peter Clausen1-5/+10
A control that is visible on the card->controls list can be freed at any time. This means we must not access any of its memory while not holding the controls_rw_lock. Otherwise we risk a use after free access. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-18ALSA: control: Fix replacing user controlsLars-Peter Clausen1-16/+9
There are two issues with the current implementation for replacing user controls. The first is that the code does not check if the control is actually a user control and neither does it check if the control is owned by the process that tries to remove it. That allows userspace applications to remove arbitrary controls, which can cause a user after free if a for example a driver does not expect a control to be removed from under its feed. The second issue is that on one hand when a control is replaced the user_ctl_count limit is not checked and on the other hand the user_ctl_count is increased (even though the number of user controls does not change). This allows userspace, once the user_ctl_count limit as been reached, to repeatedly replace a control until user_ctl_count overflows. Once that happens new controls can be added effectively bypassing the user_ctl_count limit. Both issues can be fixed by instead of open-coding the removal of the control that is to be replaced to use snd_ctl_remove_user_ctl(). This function does proper permission checks as well as decrements user_ctl_count after the control has been removed. Note that by using snd_ctl_remove_user_ctl() the check which returns -EBUSY at beginning of the function if the control already exists is removed. This is not a problem though since the check is quite useless, because the lock that is protecting the control list is released between the check and before adding the new control to the list, which means that it is possible that a different control with the same settings is added to the list after the check. Luckily there is another check that is done while holding the lock in snd_ctl_add(), so we'll rely on that to make sure that the same control is not added twice. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-18ALSA: control: Protect user controls against concurrent accessLars-Peter Clausen3-6/+28
The user-control put and get handlers as well as the tlv do not protect against concurrent access from multiple threads. Since the state of the control is not updated atomically it is possible that either two write operations or a write and a read operation race against each other. Both can lead to arbitrary memory disclosure. This patch introduces a new lock that protects user-controls from concurrent access. Since applications typically access controls sequentially than in parallel a single lock per card should be fine. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-18arm64: fix build error in sigcontext.hMark Salter1-1/+1
I'm seeing this build failure for arm64: CC [M] Documentation/filesystems/configfs/configfs_example_macros.o In file included from /usr/include/bits/sigcontext.h:27:0, from /usr/include/signal.h:340, from /usr/include/sys/wait.h:30, from Documentation/accounting/getdelays.c:24: .../linux/usr/include/asm/sigcontext.h:61:2: error: unknown type name ‘u64’ u64 esr; ^ make[2]: *** [Documentation/accounting/getdelays] Error 1 This was introduced by commit 15af1942dd61ee23: arm64: Expose ESR_EL1 information to user when SIGSEGV/SIGBUS Using __u64 instead of u64 fixes the problem. Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-06-18arm64: dts: Add more serial port nodes in APM X-Gene device treeVinayak Kale2-1/+39
APM X-Gene Storm SoC supports 4 serial ports. This patch adds device nodes for serial ports 1 to 3 (a device node for serial port 0 is already present in the dts file). This patch also sets the compatible property of serial nodes to "ns16550a". Signed-off-by: Vinayak Kale <vkale@apm.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-06-18arm64/dma: Removing ARCH_HAS_DMA_GET_REQUIRED_MASK macroSuravee Suthikulpanit1-2/+0
Arm64 does not define dma_get_required_mask() function. Therefore, it should not define the ARCH_HAS_DMA_GET_REQUIRED_MASK. This causes build errors in some device drivers (e.g. mpt2sas) Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: <stable@vger.kernel.org>
2014-06-18arm64: ptrace: fix empty registers set in prstatus of aarch32 process coreVictor Kamensky1-9/+19
Currently core file of aarch32 process prstatus note has empty registers set. As result aarch32 core files create by V8 kernel are not very useful. It happens because compat_gpr_get and compat_gpr_set functions can copy registers values to/from either kbuf or ubuf. ELF core file collection function fill_thread_core_info calls compat_gpr_get with kbuf set and ubuf set to 0. But current compat_gpr_get and compat_gpr_set function handle copy to/from only ubuf case. Fix is to handle kbuf and ubuf as two separate cases in similar way as other functions like user_regset_copyout, user_regset_copyin do. Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> Acked-by: Will Deacon <will.deacon@arm.com> Cc: stable@vger.kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-06-18arm64: uid16: fix __kernel_old_{gid,uid}_t definitionsWill Deacon2-1/+10
Whilst native arm64 applications don't have the 16-bit UID/GID syscalls wired up, compat tasks can still access them. The 16-bit wrappers for these syscalls use __kernel_old_uid_t and __kernel_old_gid_t, which must be 16-bit data types to maintain compatibility with the 16-bit UIDs used by compat applications. This patch defines 16-bit __kernel_old_{gid,uid}_t types for arm64 instead of using the 32-bit types provided by asm-generic. Signed-off-by: Will Deacon <will.deacon@arm.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: <stable@vger.kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-06-18arm64: ptrace: change fs when passing kernel pointer to regset codeWill Deacon1-0/+4
Our compat PTRACE_POKEUSR implementation simply passes the user data to regset_copy_from_user after some simple range checking. Unfortunately, the data in question has already been copied to the kernel stack by this point, so the subsequent access_ok check fails and the ptrace request returns -EFAULT. This causes problems tracing fork() with older versions of strace. This patch briefly changes the fs to KERNEL_DS, so that the access_ok check passes even with a kernel address. Signed-off-by: Will Deacon <will.deacon@arm.com> Cc: <stable@vger.kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-06-18arm64: Limit the CMA buffer to 32-bit if ZONE_DMACatalin Marinas1-2/+8
When the CMA buffer is allocated, it is too early to know whether devices will require ZONE_DMA memory. This patch limits the CMA buffer to (DMA_BIT_MASK(32) + 1) if CONFIG_ZONE_DMA is enabled. In addition, it computes the dma_to_phys(DMA_BIT_MASK(32)) before the increment (no current functional change). Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-06-18arm/ftrace: fix ftrace_return_addr() to ftrace_return_address()Steven Rostedt1-1/+1
The clean up of CALLER_ADDR*() functions required the archs to either use the default __builtin_return_address(X) (where X > 0) or override it with something the arch can use. To override it, the arch would define ftrace_return_address(x). The arm architecture requires this to be redefined but instead of defining ftrace_return_address(x) it defined ftrace_return_addr(x). Fixes: eed542d6962b (ftrace: Make CALLER_ADDRx macros more generic) Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-06-18arm64/crypto: improve performance of GHASH algorithmArd Biesheuvel2-56/+40
This patches modifies the GHASH secure hash implementation to switch to a faster, polynomial multiplication based reduction instead of one that uses shifts and rotates. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-06-18arm64/crypto: fix data corruption bug in GHASH algorithmArd Biesheuvel1-0/+1
This fixes a bug in the GHASH algorithm resulting in the calculated hash to be incorrect if the input is presented in chunks whose size is not a multiple of 16 bytes. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Fixes: fdd2389457b2 ("arm64/crypto: GHASH secure hash using ARMv8 Crypto Extensions") Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-06-18arm64: defconfig update for LTPCatalin Marinas1-0/+15
This patch adds several defconfig options required primarily by the LTP test suite. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-06-18arm64: ftrace: Fix comment typo 'CONFIG_FUNCTION_GRAPH_FP_TEST'Paul Bolle1-1/+1
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-06-18arm64: add ARCH_HAS_OPP to allow enabling OPP librarySudeep Holla1-0/+1
The Operating Performance Point (OPP) Layer library is a generic library used by CPUFREQ and DEVFREQ. It can be enabled only on the platforms that specify ARCH_HAS_OPP option. This patch selects that option in order to allow ARM64 based platforms to use OPP library. Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-06-18arm64: restore alphabetic order in KconfigSudeep Holla1-1/+1
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-06-18arm64: Bug fix in stack alignment exceptionChiaHao1-1/+0
The value of ESR has been stored into x1, and should be directly pass to do_sp_pc_abort function, "MOV x1, x25" is an extra operation and do_sp_pc_abort will get the wrong value of ESR. Signed-off-by: ChiaHao <andy.jhshiu@gmail.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: <stable@vger.kernel.org>
2014-06-18xen/grant-table: fix suspend for non-PV guestsDavid Vrabel1-1/+2
Commit aa8532c32216ae07c3813b9aeb774517878a7573 (xen: refactor suspend pre/post hooks) broke resuming PVHVM (auto-translated physmap) guests. The gnttab_suspend() would clear the mapping for the grant table frames, but the ->unmap_frames() call is only applicable to PV guests. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2014-06-18x86/xen: no need to explicitly register an NMI callbackDavid Vrabel1-8/+1
Remove xen_enable_nmi() to fix a 64-bit guest crash when registering the NMI callback on Xen 3.1 and earlier. It's not needed since the NMI callback is set by a set_trap_table hypercall (in xen_load_idt() or xen_write_idt_entry()). It's also broken since it only set the current VCPU's callback. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com> Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
2014-06-18security: add Serge Hallyn as a maintainerJames Morris1-0/+1
Add Serge E. Hallyn <serge@hallyn.com> as a co-maintainer of the security subsystem, to avoid having a single point of failure in the development process. Signed-off-by: James Morris <james.l.morris@oracle.com>
2014-06-18Merge branch 'drm-nouveau-next' of ↵Dave Airlie5-3/+46
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next couple more DP regression fixes. * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau/disp: fix oops in destructor with headless cards drm/gf117/i2c: no aux channels on this chipset
2014-06-18drm/nouveau/disp: fix oops in destructor with headless cardsMaarten Lankhorst1-2/+4
If init doesn't run then disp->outp might not be initialized, resulting in an oops. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-18drm/gf117/i2c: no aux channels on this chipsetBen Skeggs4-1/+42
Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17blk-mq: bitmap tag: fix races in bt_get() functionAlexander Gordeev1-8/+5
This update fixes few issues in bt_get() function: - list_empty(&wait.task_list) check is not protected; - was_empty check is always true which results in *every* thread entering the loop resets bt_wait_state::wait_cnt counter rather than every bt->wake_cnt'th thread; - 'bt_wait_state::wait_cnt' counter update is redundant, since it also gets reset in bt_clear_tag() function; Cc: Christoph Hellwig <hch@infradead.org> Cc: Ming Lei <tom.leiming@gmail.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
2014-06-17blk-mq: bitmap tag: fix race on blk_mq_bitmap_tags::wake_cntAlexander Gordeev1-2/+12
This piece of code in bt_clear_tag() function is racy: bs = bt_wake_ptr(bt); if (bs && atomic_dec_and_test(&bs->wait_cnt)) { atomic_set(&bs->wait_cnt, bt->wake_cnt); wake_up(&bs->wait); } Since nothing prevents bt_wake_ptr() from returning the very same 'bs' address on multiple CPUs, the following scenario is possible: CPU1 CPU2 ---- ---- 0. bs = bt_wake_ptr(bt); bs = bt_wake_ptr(bt); 1. atomic_dec_and_test(&bs->wait_cnt) 2. atomic_dec_and_test(&bs->wait_cnt) 3. atomic_set(&bs->wait_cnt, bt->wake_cnt); If the decrement in [1] yields zero then for some amount of time the decrement in [2] results in a negative/overflow value, which is not expected. The follow-up assignment in [3] overwrites the invalid value with the batch value (and likely prevents the issue from being severe) which is still incorrect and should be a lesser. Cc: Ming Lei <tom.leiming@gmail.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
2014-06-17blk-mq: bitmap tag: fix races on shared ::wake_index fieldsAlexander Gordeev3-13/+23
Fix racy updates of shared blk_mq_bitmap_tags::wake_index and blk_mq_hw_ctx::wake_index fields. Cc: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
2014-06-17block: blk_max_size_offset() should check ->max_sectorsJens Axboe1-1/+1
Commit 762380ad9322 inadvertently changed a check for max_sectors to max_hw_sectors. Revert that part, so we still compare against max_sectors. Signed-off-by: Jens Axboe <axboe@fb.com>
2014-06-17Merge tag 'dt-fixes-for-3.16' of ↵Linus Torvalds2-7/+4
git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull device tree fixes from Rob Herring: - fix microblaze compiling due to conflicting merge window changes - a fix in of_attach_node due to of_find_node_by_path changes - prevent format strings in DT kobject names * tag 'dt-fixes-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: OF: fix of_find_node_by_path() assumption that of_allnodes is root of: avoid format string parsing in kobject names of/platform: Fix microblaze build failure
2014-06-17Merge tag 'random_for_linus' of ↵Linus Torvalds1-8/+9
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random Pull randomness bugfix from Ted Ts'o: "random: fix entropy accounting bug introduced in v3.15" * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: random: fix nasty entropy accounting bug
2014-06-17Merge tag 'regulator-v3.16-rc1' of ↵Linus Torvalds4-1/+10
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A few small fixes: - Fixes for bugs in Palmas and as3722 exposed by recent changes in the core - the drivers weren't allowing the current configuration to be read sometimes. - Provide a stub for regulator_can_change_voltage() for !REGULATOR. - Make sure ltc3589 only looks at its child nodes in the device tree rather than searching the whole tree" * tag 'regulator-v3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: ltc3589: Use of_get_child_by_name regulator: palmas: Fix SMPS list for 0V regulator: add regulator_can_change_voltage stub regulator: as3722: Make 0 a valid selector
2014-06-17Merge tag 'spi-v3.16-rc1' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "A single bugfix from the merge window, fixing an issue with DMA at slow speeds on Intel hardware" * tag 'spi-v3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi/pxa2xx: change default supported DMA burst size to 1
2014-06-17serial: samsung: Fix build errorSachin Kamat1-1/+1
Fixes the following build error due to a typo introduced by commit e4ac92df27 ("serial: samsung: Neaten dbg uses"): drivers/tty/serial/samsung.c:69:26: error: ‘buf’ undeclared (first use in this function) Reported-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-17USB: usbtest: add a timeout for scatter-gather testsAlan Stern1-1/+15
In usbtest, tests 5 - 8 use the scatter-gather library in usbcore without any sort of timeout. If there's a problem in the gadget or host controller being tested, the test can hang. This patch adds a 10-second timeout to the tests, so that they will fail gracefully with an ETIMEDOUT error instead of hanging. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Huang Rui <ray.huang@amd.com> Tested-by: Huang Rui <ray.huang@amd.com> CC: <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-17USB: EHCI: avoid BIOS handover on the HASEE E200Alan Stern1-3/+16
Leandro Liptak reports that his HASEE E200 computer hangs when we ask the BIOS to hand over control of the EHCI host controller. This definitely sounds like a bug in the BIOS, but at the moment there is no way to fix it. This patch works around the problem by avoiding the handoff whenever the motherboard and BIOS version match those of Leandro's computer. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Leandro Liptak <leandroliptak@gmail.com> Tested-by: Leandro Liptak <leandroliptak@gmail.com> CC: <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-17usb: fix hub-port pm_runtime_enable() vs runtime pm transitionsDan Williams3-19/+54
Commit 9262c19d14c4 "usb: disable port power control if not supported in wHubCharacteristics" gated enabling runtime pm for usb_port devices on whether the parent hub supports power control, which causes a regression. The port must still be allowed to carry out runtime pm callbacks and receive a -EAGAIN or -EBUSY result. Otherwise the usb_port device will transition to the pm error state and trigger the same for the child usb_device. Prior to the offending commit usb_hub_create_port_device() arranged for runtime pm to be disabled is dev_pm_qos_expose_flags() failed. Instead, force the default state of PM_QOS_FLAG_NO_POWER_OFF flag to be set prior to enabling runtime pm. If that policy can not be set then fail registration. Report: http://marc.info/?l=linux-usb&m=140290586301336&w=2 Fixes: 9262c19d14c4 ("usb: disable port power control if not supported in wHubCharacteristics") Reported-by: Bjørn Mork <bjorn@mork.no> Reported-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-17usb: quiet peer failure warning, disable poweroffDan Williams1-5/+19
In the case where platform firmware has specified conflicting values for port locations it is confusing and otherwise not helpful to throw a backtrace. Instead, include enough information to determine that firmware has done something wrong and globally disable port poweroff. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-17usb: improve "not suspended yet" message in hub_suspend()Dan Williams1-1/+2
Reading through a recent bug report [1], Alan notes: "Dan, the warning message in hub_suspend() should mention that the child device isn't suspended yet." ...update the warning from: "usb usb3-port4: not suspended yet" ...to: "usb usb3-port4: device 3-4: not suspended yet" [1]: http://marc.info/?l=linux-usb&m=140290586301336&w=2 Reported-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-17xhci: Fix sleeping with IRQs disabled in xhci_stop_device()Mathias Nyman1-1/+1
xhci_stop_device() allocates and issues stop commands for each active endpoint. This is done with spinlock held and interrupt disabled so we can't sleep during memory allocation. Use GFP_NOWAIT instead Regression from commit ddba5cd0aeff5bbed92ebdf4b1223300b0541e78 "xhci: Use command structures when queuing commands on the command ring" for 3.16-rc1 Fixes: ddba5cd0aeff ("xhci: Use command structures when queuing commands") Reported-by: Dan Williams <dan.j.williams@intel.com> Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-17usb: fix ->update_hub_device() vs hdev->maxchildDan Williams1-12/+12
Commit d8521afe3586 "usb: assign default peer ports for root hubs" delayed marking a hub valid (set hdev->maxchild) until it had been fully configured and to enable the publishing of valid hubs to be serialized by usb_port_peer_mutex. However, xhci_update_hub_device() in some cases depends on hdev->maxchild already being set. Do the minimal fix and move it after the setting of hdev->maxchild. Cc: Mathias Nyman <mathias.nyman@linux.intel.com> Reported-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Tested-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-17Revert "uio: fix vma io range check in mmap"Greg Kroah-Hartman1-1/+1
This reverts commit ddb09754e6c7239e302c7b675df9bbd415f8de5d. Linus objected to this originally, I can see why it might be needed, but given that no one spoke up defending this patch, I'm going to revert it. If you have hardware that requires this change, please speak up in the future and defend the patch. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Bin Wang <binw@marvell.com> Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Cc: Norbert Ciosek <norbertciosek@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-17staging: rtl8723au: Reference correct firmwarefiles with MODULE_FIRMWARE()Jes Sorensen1-1/+3
Add missing firmware references, and request the correct one. Reported-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-17staging: rtl8723au: Request correct firmware file for A-cut partsJes Sorensen1-1/+1
The filename requested by the driver didn't match what we had sitting in /lib/firmware/ Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-17intel_pstate: Correct rounding in busy calculationDoug Smythies1-4/+1
There was a mistake in the actual rounding portion this previous patch: f0fe3cd7e12d (intel_pstate: Correct rounding in busy calculation) such that the rounding was asymetric and incorrect. Severity: Not very serious, but can increase target pstate by one extra value. For real world work flows the issue should self correct (but I have no proof). It is the equivalent of different PID gains for positive and negative numbers. Examples: -3.000000 used to round to -4, rounds to -3 with this patch. -3.503906 used to round to -5, rounds to -4 with this patch. Fixes: f0fe3cd7e12d (intel_pstate: Correct rounding in busy calculation) Signed-off-by: Doug Smythies <dsmythies@telus.net> Cc: 3.14+ <stable@vger.kernel.org> # 3.14+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-06-17NFSD: fix bug for readdir of pseudofsKinglong Mee1-0/+1
Commit 561f0ed498ca (nfsd4: allow large readdirs) introduces a bug about readdir the root of pseudofs. Call xdr_truncate_encode() revert encoded name when skipping. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2014-06-17NFSD: Don't hand out delegations for 30 seconds after recalling them.NeilBrown1-0/+78
If nfsd needs to recall a delegation for some reason it implies that there is contention on the file, so further delegations should not be handed out. The current code fails to do so, and the result is effectively a live-lock under some workloads: a client attempting a conflicting operation on a read-delegated file receives NFS4ERR_DELAY and retries the operation, but by the time it retries the server may already have given out another delegation. We could simply avoid delegations for (say) 30 seconds after any recall, but this is probably too heavy handed. We could keep a list of inodes (or inode numbers or filehandles) for recalled delegations, but that requires memory allocation and searching. The approach taken here is to use a bloom filter to record the filehandles which are currently blocked from delegation, and to accept the cost of a few false positives. We have 2 bloom filters, each of which is valid for 30 seconds. When a delegation is recalled the filehandle is added to one filter and will remain disabled for between 30 and 60 seconds. We keep a count of the number of filehandles that have been added, so when that count is zero we can bypass all other tests. The bloom filters have 256 bits and 3 hash functions. This should allow a couple of dozen blocked filehandles with minimal false positives. If many more filehandles are all blocked at once, behaviour will degrade towards rejecting all delegations for between 30 and 60 seconds, then resetting and allowing new delegations. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2014-06-17ARM: use menuconfig for sub-arch menusRob Herring17-61/+33
The System Type menu is getting quite long with platforms and is inconsistent in handling of sub-arch specific options. Tidy up the menu by making platform options a menuconfig entry containing any platform specific config items. [arnd: change OMAP part according to suggestion from Tony Lindgren <tony@atomide.com>] Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-06-17ARM: multi_v7_defconfig: re-enable SDHCI driversStephen Warren1-0/+1
Following 5d01b7684b7e "mmc: simplify SDHCI Kconfig dependencies", SDHCI drivers that use MMC_SDHCI_PLTFM no longer select it, but instead depend on it. This means that multi_v7_defconfig no longer selects it, and hence many SDHCI drivers are no longer enabled. Explicitly enable MMC_SDHCI_PLTFM to solve this. Fixes: 5d01b7684b7e ("mmc: simplify SDHCI Kconfig dependencies") Signed-off-by: Stephen Warren <swarren@nvidia.com> Tested-by: Matt Porter <mporter@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-06-17ARM: EXYNOS: Fix compilation warningSachin Kamat1-1/+1
of_get_flat_dt_prop return type is now const. Fixes the following compilation warning introduced by commit 9d0c4dfedd96 ("of/fdt: update of_get_flat_dt_prop in prep for libfdt") arch/arm/mach-exynos/exynos.c:259:6: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Reviewed-by: Tushar Behera <tushar.behera@linaro.org> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-06-17ARM: exynos: move sysram info to exynos.cOlof Johansson3-24/+32
This solves a problem with building with CONFIG_SMP=n due to missing sysram_base_addr (or sysram_ns_base_addr) variables. The new setup method is more awkward than I'd like for it to be, but it can't be done in init_early() since ioremap is not yet available, but it needs to happen before SMP. Reported-by: Russell King <linux@arm.linux.org.uk> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Olof Johansson <olof@lixom.net> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-06-17ARM: dts: Specify the NAND ECC scheme explicitly on Armada 385 DB boardEzequiel Garcia1-0/+2
The factory bootloader on A385-DB boards expect the ECC strength to be 4 bits over 512 bytes. Hence, we need to specify this in the devicetree, to prevent the kernel from assuming any different ECC scheme. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Link: https://lkml.kernel.org/r/1400941030-2123-3-git-send-email-ezequiel.garcia@free-electrons.com Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-06-17ARM: dts: Specify the NAND ECC scheme explicitly on Armada 375 DB boardEzequiel Garcia1-0/+2
The factory bootloader on A375-DB boards expect the ECC strength to be 4 bits over 512 bytes. Hence, we need to specify this in the devicetree, to prevent the kernel from assuming any different ECC scheme. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Link: https://lkml.kernel.org/r/1400941030-2123-2-git-send-email-ezequiel.garcia@free-electrons.com Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-06-17ARM: exynos: cleanup kconfig option displayRob Herring2-16/+4
The addition of Exynos to multi-platform configs creates a mess of config options with options appearing before the Exynos config option. This is due to arch/arm/plat-samsung/Kconfig being included out of order with the other Samsung platform kconfig files. Reorder the kconfig files and move all the options into a sub-menu. Some of the options are dead, so remove those as well. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-06-17misc: vexpress: fix error handling vexpress_syscfg_regmap_init()Dan Carpenter1-4/+8
This function should be returning an ERR_PTR() on failure instead of NULL. Also there is a use after free bug if regmap_init() fails because we free "func" and then dereference doing the return. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-06-17ARM: Remove ARCH_HAS_CPUFREQ config optionStephen Boyd14-33/+0
This config exists entirely to hide the cpufreq menu from the kernel configuration unless a platform has selected it. Nothing is actually built if this config is 'Y' and it just leads to more patches that add a select under a platform Kconfig so that some other CPUfreq option can be chosen. Let's remove the option so that we can always enable CPUfreq drivers on ARM platforms. Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-06-17ARM: integrator: fix section mismatch problemLinus Walleij2-2/+12
This addresses a section mismatch problem in the IM-PD1 driver in the Integrator/AP. The IM-PD1 contains a VIC interrupt controller and therefore the driver calls vic_init_cascaded() which is marked __init as irqchips are simply not hot-pluggable and specifically the VIC is assumed to initiate only on boot. However the module driver model of the Integrator LM bus assumes that logic tile drivers can be probed at runtime. This is not really the case for IM-PD1: these tiles are detected at boot and they cannot be plugged into a running system. Before this patch it is of course possible to modprobe them later. By first forcing the IM-PD1 to bool we make sure this driver gets compiled into the kernel, and we know it will be probed only at boot time when the tiles are detected, so we can tag its probe function __init_refok as we know it won't be called after boot now, and the section mismatch problem goes away. As a side effect, sysfs binding from userspace becomes impossible, so we tag the driver to suppress the bind/unbind sysfs attributes. Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-06-17ARM: mvebu: DT: fix OpenBlocks AX3-4 RAM sizeJason Cooper1-1/+1
The OpenBlocks AX3-4 has a non-DT bootloader. It also comes with 1GB of soldered on RAM, and a DIMM slot for expansion. Unfortunately, atags_to_fdt() doesn't work in big-endian mode, so we see the following failure when attempting to boot a big-endian kernel: 686 slab pages 17 pages shared 0 pages swap cached [ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name Kernel panic - not syncing: Out of memory and no killable processes... CPU: 1 PID: 351 Comm: kworker/u4:0 Not tainted 3.15.0-rc8-next-20140603 #1 [<c0215a54>] (unwind_backtrace) from [<c021160c>] (show_stack+0x10/0x14) [<c021160c>] (show_stack) from [<c0802500>] (dump_stack+0x78/0x94) [<c0802500>] (dump_stack) from [<c0800068>] (panic+0x90/0x21c) [<c0800068>] (panic) from [<c02b5704>] (out_of_memory+0x320/0x340) [<c02b5704>] (out_of_memory) from [<c02b93a0>] (__alloc_pages_nodemask+0x874/0x930) [<c02b93a0>] (__alloc_pages_nodemask) from [<c02d446c>] (handle_mm_fault+0x744/0x96c) [<c02d446c>] (handle_mm_fault) from [<c02cf250>] (__get_user_pages+0xd0/0x4c0) [<c02cf250>] (__get_user_pages) from [<c02f3598>] (get_arg_page+0x54/0xbc) [<c02f3598>] (get_arg_page) from [<c02f3878>] (copy_strings+0x278/0x29c) [<c02f3878>] (copy_strings) from [<c02f38bc>] (copy_strings_kernel+0x20/0x28) [<c02f38bc>] (copy_strings_kernel) from [<c02f4f1c>] (do_execve+0x3a8/0x4c8) [<c02f4f1c>] (do_execve) from [<c025ac10>] (____call_usermodehelper+0x15c/0x194) [<c025ac10>] (____call_usermodehelper) from [<c020e9b8>] (ret_from_fork+0x14/0x3c) CPU0: stopping CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.15.0-rc8-next-20140603 #1 [<c0215a54>] (unwind_backtrace) from [<c021160c>] (show_stack+0x10/0x14) [<c021160c>] (show_stack) from [<c0802500>] (dump_stack+0x78/0x94) [<c0802500>] (dump_stack) from [<c021429c>] (handle_IPI+0x138/0x174) [<c021429c>] (handle_IPI) from [<c02087f0>] (armada_370_xp_handle_irq+0xb0/0xcc) [<c02087f0>] (armada_370_xp_handle_irq) from [<c0212100>] (__irq_svc+0x40/0x50) Exception stack(0xc0b6bf68 to 0xc0b6bfb0) bf60: e9fad598 00000000 00f509a3 00000000 c0b6a000 c0b724c4 bf80: c0b72458 c0b6a000 00000000 00000000 c0b66da0 c0b6a000 00000000 c0b6bfb0 bfa0: c027bb94 c027bb24 60000313 ffffffff [<c0212100>] (__irq_svc) from [<c027bb24>] (cpu_startup_entry+0x54/0x214) [<c027bb24>] (cpu_startup_entry) from [<c0ac5b30>] (start_kernel+0x318/0x37c) [<c0ac5b30>] (start_kernel) from [<00208078>] (0x208078) ---[ end Kernel panic - not syncing: Out of memory and no killable processes... A similar failure will also occur if ARM_ATAG_DTB_COMPAT isn't selected. Fix this by setting a sane default (1 GB) in the dts file. Signed-off-by: Jason Cooper <jason@lakedaemon.net> Tested-by: Kevin Hilman <khilman@linaro.org> Cc: <stable@vger.kernel.org> #v3.13+ Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-06-17ARM: samsung: make SAMSUNG_DMADEV optionalArnd Bergmann6-13/+16
The only remaining driver using the samsung dmadev code is the broken samsung-ac97 sound driver. However, as found by Russell's autobuilder, the elaborate dependency chains around it cause problems with circular dependencies. This is an attempt to simplify those dependencies by making the SAMSUNG_DMADEV option user-selectable. I also try to keep the default settings for all related options unchanged, so we don't introduce any regressions against earlier testing on linux-next. In particular, all s3c64xx and s5p* platforms keep selecting the pl330 and pl08x drivers they require, but the select statement is now moved towards the main platform option, and it remains optional by unselecting CONFIG_DMADEVICES. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Kukjin Kim <kgene.kim@samsung.com>
2014-06-17remoteproc: da8xx: don't select CMA on no-MMUArnd Bergmann1-1/+1
We can only use CMA on systems that have an MMU, because of the requirement to use memory migration. NOMMU systems are rather constrained to start with, but it seems reasonable to assume that DMA allocations can still succeed in the constrained case for remoteproc on NOMMU, so this patch changes the da8xx implementation to not rely on CMA when the MMU is disabled. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Ohad Ben-Cohen <ohad@wizery.com> Cc: Robert Tivy <rtivy@ti.com>
2014-06-17bus/arm-cci: add dependency on OF && CPU_V7Arnd Bergmann1-1/+1
The arm-cci code uses device tree helpers for initialization that don't work on kernels built without CONFIG_OF. Further, it contains an inline assembly in cci_enable_port_for_self() that uses ARMv7 instructions and fails to build when targetting other ARM instruction set versions. This works around both issues by limiting the scope of the Kconfig symbol to platforms that can actually build this driver cleanly. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Shawn Guo <shawn.guo@linaro.org>
2014-06-17ARM: keystone requires ARM_PATCH_PHYS_VIRTArnd Bergmann1-0/+1
The dynamic relocation that the keystone platform performs only works if we can pick the phys offset at boot time. It's possible that there is another solution for this, but this is the easiest workaround. Kernels with ARM_PATCH_PHYS_VIRT are not portable across platforms, and I see no reason why anyone would run a kernel without ARM_PATCH_PHYS_VIRT on keystone. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
2014-06-17ARM: omap2: fix am43xx dependency on l2x0 cacheArnd Bergmann3-1/+8
Commit d941f86fad41b ("ARM: l2c: AM43x: add L2 cache support") enabled the L2 cache support for the am43xx SoC, but caused a build regression when the driver for that cache controller is disabled: arch/arm/mach-omap2/built-in.o: In function `am43xx_init_early': :(.init.text+0xb20): undefined reference to `omap_l2_cache_init' This did not happen for OMAP4, which has the same call, but enables the l2x0 driver unconditionally. We could do the same thing for am43xx, but it seems better to allow turning it off and make the code work in either case. This adds an inline wrapper for omap_l2_cache_init for the disabled case, and removes the 'select' from OMAP4 so it becomes a user visible option. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Tony Lindgren <tony@atomide.com> Cc: linux-omap@vger.kernel.org
2014-06-17Merge tag 'v3.16-rc1' into i2c/for-nextWolfram Sang2435-46522/+105768
Merge a stable base (Linux 3.16-rc1) Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-06-17i2c: sun6-p2wi: fix call to snprintfBoris BREZILLON1-1/+1
Fixes possible issue in case pdev name contains formatting characters. Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> Reported-by: Kees Cook <keescook@google.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-06-17ACPI: use kstrto*() instead of simple_strto*()Christoph Jaeger3-3/+8
simple_strto*() are obsolete; use kstrto*() instead. Add proper error checking. Signed-off-by: Christoph Jaeger <christophjaeger@linux.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-06-17ACPI / processor replace __attribute__((packed)) by __packedFabian Frederick1-5/+5
This patch fixes checkpatch warnings: "WARNING: __packed is preferred over __attribute__((packed))" Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-06-17ACPI / battery: add quirk for Acer Aspire V5-573GAlexander Mezin1-0/+24
On Acer Aspire V5-573G battery notifications are sometimes triggered too early. For example, when AC is unplugged and notification is triggered, battery state is still reported as "Full", and changes to "Discharging" only after short delay, without any notification. This patch solves the problem by adding 1 second sleep. Similar quirk is already implemented in AC driver for other laptop. Signed-off-by: Alexander Mezin <mezin.alexander@gmail.com> Acked-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-06-17ACPI / battery: use callback for setting up quirksAlexander Mezin1-2/+8
Use callback for setting up quirk instead of checking return code of dmi_check_system(). This change will allow using bat_dmi_table for other quirks. Signed-off-by: Alexander Mezin <mezin.alexander@gmail.com> Acked-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-06-17ACPI / LPSS: Take I2C host controllers out of resetMika Westerberg1-0/+15
On Intel Baytrail, some I2C host controllers are held in reset when the OS gets control. This causes the driver to fail to detect the hardware properly. Fix this so that we make sure that the I2C host controller is not in reset when the driver gets probe'd. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-06-17Merge branch 'drm-next-3.16' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie4-17/+105
into drm-next two fixes for the deep color support in radeon. * 'drm-next-3.16' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: Bypass hw lut's for > 8 bpc framebuffer scanout. drm/radeon: use pixel formats instead of depth/bpp
2014-06-17Merge branch 'drm-nouveau-next' of ↵Dave Airlie25-763/+1088
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next This is bigger because it regenerates the internal firmwares after a fix. * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau/doc: update the thermal documentation drm/nouveau/pwr: fix typo in fifo wrap handling drm/nv50/disp: fix a potential oops in supervisor handling drm/nouveau/disp/dp: don't touch link config after success drm/nouveau/kms: reference vblank for crtc during pageflip. drm/gk104/fb/ram: fixups from an earlier search+replace drm/nv50/gr: remove an unneeded write while initialising PGRAPH drm/nv50/gr: fix overlap while zeroing zcull regions drm/gf100-/gr: report class data to host on fwmthd failure drm/gk104/ibus: increase various random timeouts drm/gk104/clk: only touch divider for mode we'll be using
2014-06-17drm/nouveau/doc: update the thermal documentationMartin Peres1-3/+4
Changes: - Change the maintainer's address (the labri address will expire soon); - Drop the note about not all families supporting all fan modes; - Add a note about the reported RPM not being accurate when driven outside the vbios-defined PWM range. Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17drm/nouveau/pwr: fix typo in fifo wrap handlingBen Skeggs5-5/+5
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17drm/nv50/disp: fix a potential oops in supervisor handlingBen Skeggs1-1/+1
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17drm/nouveau/disp/dp: don't touch link config after successBen Skeggs1-4/+3
I don't know of anything this fixes, but it seems wrong anyway. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17drm/nouveau/kms: reference vblank for crtc during pageflip.Mario Kleiner1-0/+7
Need to drm_vblank_get/put() the crtc involved in a pending pageflip, or we might not get vblank irqs and updates of vblank counts and timestamps for pageflip events and flip completion. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org
2014-06-17drm/gk104/fb/ram: fixups from an earlier search+replaceBen Skeggs1-38/+38
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17drm/nv50/gr: remove an unneeded write while initialising PGRAPHPierre Moreau1-1/+0
The blob does not seem to write at that place for my NVAC, though it does for my NV96, agreeing with what is done in the if/else structure below. I guess someone forgot to remove the line when the if/else was put in place. Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17drm/nv50/gr: fix overlap while zeroing zcull regionsPierre Moreau1-4/+4
The specified stride was not correct, resulting in erases overlapping and part of the zcull regions being not erased at all. Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17drm/gf100-/gr: report class data to host on fwmthd failureBen Skeggs12-703/+1003
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17drm/gk104/ibus: increase various random timeoutsBen Skeggs1-1/+18
Fixes (at least) PTHERM accesses timing out at higher clock speeds. Values and registers taken from what the binary driver does. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17drm/gk104/clk: only touch divider for mode we'll be usingBen Skeggs1-3/+5
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-16epoll: fix use-after-free in eventpoll_release_fileKonstantin Khlebnikov1-2/+2
This fixes use-after-free of epi->fllink.next inside list loop macro. This loop actually releases elements in the body. The list is rcu-protected but here we cannot hold rcu_read_lock because we need to lock mutex inside. The obvious solution is to use list_for_each_entry_safe(). RCU-ness isn't essential because nobody can change this list under us, it's final fput for this file. The bug was introduced by ae10b2b4eb01 ("epoll: optimize EPOLL_CTL_DEL using rcu") Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com> Reported-by: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Stable <stable@vger.kernel.org> # 3.13+ Cc: Sasha Levin <sasha.levin@oracle.com> Cc: Jason Baron <jbaron@akamai.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-06-16x86, kaslr: boot-time selectable with hibernationKees Cook4-6/+21
Changes kASLR from being compile-time selectable (blocked by CONFIG_HIBERNATION), to being boot-time selectable (with hibernation available by default) via the "kaslr" kernel command line. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-06-16PM / hibernate: introduce "nohibernate" boot parameterKees Cook5-5/+40
To support using kernel features that are not compatible with hibernation, this creates the "nohibernate" kernel boot parameter to disable both hibernation and resume. This allows hibernation support to be a boot-time choice instead of only a compile-time choice. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-06-16cpufreq: cpufreq-cpu0: fix CPU_THERMAL dependencyArnd Bergmann1-0/+2
5fbfbcd3e842d ("cpufreq: cpufreq-cpu0: remove dependency on THERMAL and REGULATOR") was a little too quick in completely removing the dependency on the THERMAL driver. The problem is that while there are inline wrappers to turn the thermal API calls into empty functions, those do not help if the cpu-thermal driver is a loadable module and cpufreq-cpu0 is builtin. Since CONFIG_CPU_THERMAL is a bool option that decides whether the cpu code is built into the thermal module or not, we have to use a dependency on the thermal driver itself. However, if CPU_THERMAL is disabled, we don't need the dependency, hence the strange '!CPU_THERMAL || THERMAL' construct. Fixes: 5fbfbcd3e842d ("cpufreq: cpufreq-cpu0: remove dependency on THERMAL and REGULATOR") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-06-16ACPI / ia64 / sba_iommu: Restore the working initialization orderingRafael J. Wysocki1-27/+37
Commit 66345d5f79fc (ACPI / ia64 / sba_iommu: Use ACPI scan handler for device discovery) changed the ordering of SBA (System Bus Adapter) IOMMU initialization with respect to the PCI host bridge initialization which broke things inadvertently, because the SBA IOMMU initialization code has to run after the PCI host bridge has been initialized. Fix that by reworking the SBA IOMMU ACPI scan handler so that it claims the discovered matching ACPI device objects without attempting to initialize anything and move the entire SBA IOMMU initialization to sba_init() that runs after the PCI bus has been enumerated. Link: https://bugzilla.kernel.org/show_bug.cgi?id=76691 Fixes: 66345d5f79fc (ACPI / ia64 / sba_iommu: Use ACPI scan handler for device discovery) Reported-and-tested-by: Émeric Maschino <emeric.maschino@gmail.com> Cc: Tony Luck <tony.luck@intel.com> Cc: 3.11+ <stable@vger.kernel.org> # 3.11+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-06-16OF: fix of_find_node_by_path() assumption that of_allnodes is rootFrank Rowand1-2/+2
of_find_node_by_path() is borked because of_allnodes is not guaranteed to contain the root of the tree after using any of the dynamic update functions because some other nodes ends up as of_allnodes. Fixes: c22e650e66b8 of: Make of_find_node_by_path() handle /aliases Reported-by: pantelis.antoniou@konsulko.com Signed-off-by: Frank Rowand <frank.rowand@sonymobile.com> Signed-off-by: Rob Herring <robh@kernel.org>
2014-06-16of: avoid format string parsing in kobject namesKees Cook1-1/+2
This makes sure a format string cannot leak into the kobject name that is constructed. (And splits the >80 character line.) Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Rob Herring <robh@kernel.org>
2014-06-16of/platform: Fix microblaze build failureGuenter Roeck1-4/+0
Commit bf5db2f (microblaze: Use generic device.h) removes the microblaze specific pdev_archdata and dma_mask. At the same time, commit 591c1ee (of: configure the platform device dma parameters) initializes the just removed field. This causes all microblaze builds to fail. Drop the unnecessary initialization. Cc: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Rob Herring <robh@kernel.org>
2014-06-16null_blk: fix softirq completions for queue_mode == 1Jens Axboe1-1/+4
Only blk-mq completions have payload attached to the request, for request_fn mode we have stored it in req->special. This fixes an oops with queue_mode=1 and softirq completions. Signed-off-by: Jens Axboe <axboe@fb.com>
2014-06-16Merge remote-tracking branches 'regulator/fix/as3722', ↵Mark Brown3-1/+5
'regulator/fix/ltc3589' and 'regulator/fix/palmas' into regulator-linus
2014-06-16Merge remote-tracking branch 'regulator/fix/core' into regulator-linusMark Brown1-0/+5
2014-06-16Merge remote-tracking branches 'asoc/fix/fsl-dma', 'asoc/fix/fsl-spdif', ↵Mark Brown10-76/+119
'asoc/fix/pxa', 'asoc/fix/rcar' and 'asoc/fix/sigmadsp' into asoc-linus
2014-06-16Merge remote-tracking branch 'asoc/fix/core' into asoc-linusMark Brown1-13/+16
2014-06-16regulator: ltc3589: Use of_get_child_by_nameAxel Lin1-1/+1
of_find_node_by_name() walks the allnodes list, and can thus walk outside of the parent node. Use of_get_child_by_name() instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-16Revert "offb: Add palette hack for little endian"Benjamin Herrenschmidt1-10/+1
This reverts commit e1edf18b20076da83dd231dbd2146cbbc31c0b14. This patch was a misguided attempt at fixing offb for LE ppc64 kernels on BE qemu but is just wrong ... it breaks real LE/LE setups, LE with real HW, and existing mixed endian systems that did the fight thing with the appropriate device-tree property. Bad reviewing on my part, sorry. The right fix is to either make qemu change its endian when the guest changes endian (working on that) or to use the existing foreign endian support. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: <stable@vger.kernel.org> [v3.13+] ---
2014-06-16drm/i915, HD-audio: Don't continue probing when nomodeset is givenTakashi Iwai5-17/+24
When a machine is booted with nomodeset option, i915 driver skips the whole initialization. Meanwhile, HD-audio tries to bind wth i915 just by request_symbol() without knowing that the initialization was skipped, and eventually it hits WARN_ON() in i915_request_power_well() and i915_release_power_well() wrongly but still continues probing, even though it doesn't work at all. In this patch, both functions are changed to return an error in case of uninitialized state instead of WARN_ON(), so that HD-audio driver can give up HDMI controller initialization at the right time. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: <stable@vger.kernel.org> [3.15] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-16s390/ccwgroup: use ccwgroup_ungroup wrapperSebastian Ott1-12/+2
To ungroup and deregister the group device always use the ccwgroup_ungroup wrapper. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-06-16s390/ccwgroup: fix an uninitialized return codeSebastian Ott1-4/+5
Since commit 0b60f9ead5d4816e7e3d6e28f4a0d22d4a1b2513 "s390: use device_remove_file_self() instead of device_schedule_callback()" the return code of ccwgroup_ungroup_store is uninitialized. Make sure the rc is always initialized. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-06-16s390/ccwgroup: obtain extra reference for asynchronous processingSebastian Ott1-1/+4
Commit 0b60f9ead5d4816e7e3d6e28f4a0d22d4a1b2513 "s390: use device_remove_file_self() instead of device_schedule_callback()" changed ccwgroup to use an extra work queue instead of device_schedule_callback. This function obtained an extra device reference for its async work which is missing in the new implementation and results in a "freeing memory with a lock still held" BUG. Fix this by obtaining an extra reference for the async work. Reported-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-06-16qdio: Keep device-specific dbf entriesStefan Raspl3-13/+77
Keep the per-device dbf entries until module is removed, with proper error checking for debug feature setup. Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Reviewed-by: Steffen Maier <maier@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-06-16s390/compat: correct ucontext layout for high gprsMartin Schwidefsky2-3/+9
The uc_sigmask definition in the kernel differs from the one in the glibc, the kernel uc_sigmask has 64 bits while the glibc verison is 1024 bits. The extension of the ucontext structure for 64-bit register support for 31-bit compat processes added a new field uc_gprs_high which starts 8 bytes after the uc_sigmask field. As the glibc view of the ucontext assumes a size of 128 bytes for uc_sigmask add a 120 byte padding to the kernel structure ucontext_extended after the 8 byte uc_sigmask. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-06-16s390/cio: set device name as early as possibleSebastian Ott1-35/+36
Currently we set the device name at the time we call device_add after we receive the interrupt for the first I/O. When something is not working as expected during that first I/O (e.g. we don't receive an interrupt) we print a message including the device name which has not yet been initialized. Set the device name after calling device_initialize (prior to starting the first I/O) so that we have the name present if some unexpected error occurs during that first I/O. Reported-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reported-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-06-16rtmutex: Plug slow unlock raceThomas Gleixner1-6/+109
When the rtmutex fast path is enabled the slow unlock function can create the following situation: spin_lock(foo->m->wait_lock); foo->m->owner = NULL; rt_mutex_lock(foo->m); <-- fast path free = atomic_dec_and_test(foo->refcnt); rt_mutex_unlock(foo->m); <-- fast path if (free) kfree(foo); spin_unlock(foo->m->wait_lock); <--- Use after free. Plug the race by changing the slow unlock to the following scheme: while (!rt_mutex_has_waiters(m)) { /* Clear the waiters bit in m->owner */ clear_rt_mutex_waiters(m); owner = rt_mutex_owner(m); spin_unlock(m->wait_lock); if (cmpxchg(m->owner, owner, 0) == owner) return; spin_lock(m->wait_lock); } So in case of a new waiter incoming while the owner tries the slow path unlock we have two situations: unlock(wait_lock); lock(wait_lock); cmpxchg(p, owner, 0) == owner mark_rt_mutex_waiters(lock); acquire(lock); Or: unlock(wait_lock); lock(wait_lock); mark_rt_mutex_waiters(lock); cmpxchg(p, owner, 0) != owner enqueue_waiter(); unlock(wait_lock); lock(wait_lock); wakeup_next waiter(); unlock(wait_lock); lock(wait_lock); acquire(lock); If the fast path is disabled, then the simple m->owner = NULL; unlock(m->wait_lock); is sufficient as all access to m->owner is serialized via m->wait_lock; Also document and clarify the wakeup_next_waiter function as suggested by Oleg Nesterov. Reported-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20140611183852.937945560@linutronix.de Cc: stable@vger.kernel.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2014-06-15Linux 3.16-rc1v3.16-rc1Linus Torvalds1-2/+2
2014-06-15Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds10-34/+96
Pull networking fixes from David Miller: 1) Fix checksumming regressions, from Tom Herbert. 2) Undo unintentional permissions changes for SCTP rto_alpha and rto_beta sysfs knobs, from Denial Borkmann. 3) VXLAN, like other IP tunnels, should advertize it's encapsulation size using dev->needed_headroom instead of dev->hard_header_len. From Cong Wang. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: net: sctp: fix permissions for rto_alpha and rto_beta knobs vxlan: Checksum fixes net: add skb_pop_rcv_encapsulation udp: call __skb_checksum_complete when doing full checksum net: Fix save software checksum complete net: Fix GSO constants to match NETIF flags udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup vxlan: use dev->needed_headroom instead of dev->hard_header_len MAINTAINERS: update cxgb4 maintainer
2014-06-15Merge tag 'clk-for-linus-3.16-part2' of ↵Linus Torvalds30-265/+1836
git://git.linaro.org/people/mike.turquette/linux Pull more clock framework updates from Mike Turquette: "This contains the second half the of the clk changes for 3.16. They are simply fixes and code refactoring for the OMAP clock drivers. The sunxi clock driver changes include splitting out the one mega-driver into several smaller pieces and adding support for the A31 SoC clocks" * tag 'clk-for-linus-3.16-part2' of git://git.linaro.org/people/mike.turquette/linux: (25 commits) clk: sunxi: document PRCM clock compatible strings clk: sunxi: add PRCM (Power/Reset/Clock Management) clks support clk: sun6i: Protect SDRAM gating bit clk: sun6i: Protect CPU clock clk: sunxi: Rework clock protection code clk: sunxi: Move the GMAC clock to a file of its own clk: sunxi: Move the 24M oscillator to a file of its own clk: sunxi: Remove calls to clk_put clk: sunxi: document new A31 USB clock compatible clk: sunxi: Implement A31 USB clock ARM: dts: OMAP5/DRA7: use omap5-mpu-dpll-clock capable of dealing with higher frequencies CLK: TI: dpll: support OMAP5 MPU DPLL that need special handling for higher frequencies ARM: OMAP5+: dpll: support Duty Cycle Correction(DCC) CLK: TI: clk-54xx: Set the rate for dpll_abe_m2x2_ck CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic) dt:/bindings: DRA7 ATL (Audio Tracking Logic) clock bindings ARM: dts: dra7xx-clocks: Correct name for atl clkin3 clock CLK: TI: gate: add composite interface clock to OMAP2 only build ARM: OMAP2: clock: add DT boot support for cpufreq_ck CLK: TI: OMAP2: add clock init support ...
2014-06-15Merge git://git.infradead.org/users/willy/linux-nvmeLinus Torvalds5-110/+194
Pull NVMe update from Matthew Wilcox: "Mostly bugfixes again for the NVMe driver. I'd like to call out the exported tracepoint in the block layer; I believe Keith has cleared this with Jens. We've had a few reports from people who're really pounding on NVMe devices at scale, hence the timeout changes (and new module parameters), hotplug cpu deadlock, tracepoints, and minor performance tweaks" [ Jens hadn't seen that tracepoint thing, but is ok with it - it will end up going away when mq conversion happens ] * git://git.infradead.org/users/willy/linux-nvme: (22 commits) NVMe: Fix START_STOP_UNIT Scsi->NVMe translation. NVMe: Use Log Page constants in SCSI emulation NVMe: Define Log Page constants NVMe: Fix hot cpu notification dead lock NVMe: Rename io_timeout to nvme_io_timeout NVMe: Use last bytes of f/w rev SCSI Inquiry NVMe: Adhere to request queue block accounting enable/disable NVMe: Fix nvme get/put queue semantics NVMe: Delete NVME_GET_FEAT_TEMP_THRESH NVMe: Make admin timeout a module parameter NVMe: Make iod bio timeout a parameter NVMe: Prevent possible NULL pointer dereference NVMe: Fix the buffer size passed in GetLogPage(CDW10.NUMD) NVMe: Update data structures for NVMe 1.2 NVMe: Enable BUILD_BUG_ON checks NVMe: Update namespace and controller identify structures to the 1.1a spec NVMe: Flush with data support NVMe: Configure support for block flush NVMe: Add tracepoints NVMe: Protect against badly formatted CQEs ...
2014-06-15random: fix nasty entropy accounting bugTheodore Ts'o1-8/+9
Commit 0fb7a01af5b0 "random: simplify accounting code", introduced in v3.15, has a very nasty accounting problem when the entropy pool has has fewer bytes of entropy than the number of requested reserved bytes. In that case, "have_bytes - reserved" goes negative, and since size_t is unsigned, the expression: ibytes = min_t(size_t, ibytes, have_bytes - reserved); ... does not do the right thing. This is rather bad, because it defeats the catastrophic reseeding feature in the xfer_secondary_pool() path. It also can cause the "BUG: spinlock trylock failure on UP" for some kernel configurations when prandom_reseed() calls get_random_bytes() in the early init, since when the entropy count gets corrupted, credit_entropy_bits() erroneously believes that the nonblocking pool has been fully initialized (when in fact it is not), and so it calls prandom_reseed(true) recursively leading to the spinlock BUG. The logic is *not* the same it was originally, but in the cases where it matters, the behavior is the same, and the resulting code is hopefully easier to read and understand. Fixes: 0fb7a01af5b0 "random: simplify accounting code" Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: Greg Price <price@mit.edu> Cc: stable@vger.kernel.org #v3.15
2014-06-15net: sctp: fix permissions for rto_alpha and rto_beta knobsDaniel Borkmann1-4/+28
Commit 3fd091e73b81 ("[SCTP]: Remove multiple levels of msecs to jiffies conversions.") has silently changed permissions for rto_alpha and rto_beta knobs from 0644 to 0444. The purpose of this was to discourage users from tweaking rto_alpha and rto_beta knobs in production environments since they are key to correctly compute rtt/srtt. RFC4960 under section 6.3.1. RTO Calculation says regarding rto_alpha and rto_beta under rule C3 and C4: [...] C3) When a new RTT measurement R' is made, set RTTVAR <- (1 - RTO.Beta) * RTTVAR + RTO.Beta * |SRTT - R'| and SRTT <- (1 - RTO.Alpha) * SRTT + RTO.Alpha * R' Note: The value of SRTT used in the update to RTTVAR is its value before updating SRTT itself using the second assignment. After the computation, update RTO <- SRTT + 4 * RTTVAR. C4) When data is in flight and when allowed by rule C5 below, a new RTT measurement MUST be made each round trip. Furthermore, new RTT measurements SHOULD be made no more than once per round trip for a given destination transport address. There are two reasons for this recommendation: First, it appears that measuring more frequently often does not in practice yield any significant benefit [ALLMAN99]; second, if measurements are made more often, then the values of RTO.Alpha and RTO.Beta in rule C3 above should be adjusted so that SRTT and RTTVAR still adjust to changes at roughly the same rate (in terms of how many round trips it takes them to reflect new values) as they would if making only one measurement per round-trip and using RTO.Alpha and RTO.Beta as given in rule C3. However, the exact nature of these adjustments remains a research issue. [...] While it is discouraged to adjust rto_alpha and rto_beta and not further specified how to adjust them, the RFC also doesn't explicitly forbid it, but rather gives a RECOMMENDED default value (rto_alpha=3, rto_beta=2). We have a couple of users relying on the old permissions before they got changed. That said, if someone really has the urge to adjust them, we could allow it with a warning in the log. Fixes: 3fd091e73b81 ("[SCTP]: Remove multiple levels of msecs to jiffies conversions.") Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Cc: Vlad Yasevich <vyasevich@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-15Merge branch 'csum_fixes'David S. Miller7-25/+60
Tom Herbert says: ==================== Fixes related to some recent checksum modifications. - Fix GSO constants to match NETIF flags - Fix logic in saving checksum complete in __skb_checksum_complete - Call __skb_checksum_complete from UDP if we are checksumming over whole packet in order to save checksum. - Fixes to VXLAN to work correctly with checksum complete ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-15vxlan: Checksum fixesTom Herbert1-9/+2
Call skb_pop_rcv_encapsulation and postpull_rcsum for the Ethernet header to work properly with checksum complete. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-15net: add skb_pop_rcv_encapsulationTom Herbert1-0/+12
This function is used by UDP encapsulation protocols in RX when crossing encapsulation boundary. If ip_summed is set to CHECKSUM_UNNECESSARY and encapsulation is not set, change to CHECKSUM_NONE since the checksum has not been validated within the encapsulation. Clears csum_valid by the same rationale. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-15udp: call __skb_checksum_complete when doing full checksumTom Herbert1-1/+3
In __udp_lib_checksum_complete check if checksum is being done over all the data (len is equal to skb->len) and if it is call __skb_checksum_complete instead of __skb_checksum_complete_head. This allows checksum to be saved in checksum complete. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-15net: Fix save software checksum completeTom Herbert2-10/+29
Geert reported issues regarding checksum complete and UDP. The logic introduced in commit 7e3cead5172927732f51fde ("net: Save software checksum complete") is not correct. This patch: 1) Restores code in __skb_checksum_complete_header except for setting CHECKSUM_UNNECESSARY. This function may be calculating checksum on something less than skb->len. 2) Adds saving checksum to __skb_checksum_complete. The full packet checksum 0..skb->len is calculated without adding in pseudo header. This value is saved in skb->csum and then the pseudo header is added to that to derive the checksum for validation. 3) In both __skb_checksum_complete_header and __skb_checksum_complete, set skb->csum_valid to whether checksum of zero was computed. This allows skb_csum_unnecessary to return true without changing to CHECKSUM_UNNECESSARY which was done previously. 4) Copy new csum related bits in __copy_skb_header. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-15net: Fix GSO constants to match NETIF flagsTom Herbert3-5/+14
Joseph Gasparakis reported that VXLAN GSO offload stopped working with i40e device after recent UDP changes. The problem is that the SKB_GSO_* bits are out of sync with the corresponding NETIF flags. This patch fixes that. Also, we add BUILD_BUG_ONs in net_gso_ok for several GSO constants that were missing to avoid the problem in the future. Reported-by: Joseph Gasparakis <joseph.gasparakis@intel.com> Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>