Leo Kim [Mon, 12 Oct 2015 07:55:37 +0000 (16:55 +0900)]
staging: wilc1000: host_interface.c : removes unused local variables
This patch removes unused local variables from host_interface.c.
The unused local variable, s32Error is used just to return zero, so this
patch calls "returns 0" instead of "return s32Error" after removing
s32Error.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Mon, 12 Oct 2015 07:55:35 +0000 (16:55 +0900)]
staging: wilc1000: remove typedef from tstrWILC_WFIDrv
This patch removes typedef from the struct tstrWILC_WFIDrv and
rename it to host_if_drv.
This patch includes the removal of the comment for tstrWILC_WFIDrv as well.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Sun, 11 Oct 2015 19:19:08 +0000 (00:49 +0530)]
Staging: vt6655: rxtx: Remove extra space character
Remove unnecessary space character after the variable RATE_16M
preserving the alignment of all other variables and comments.
Fixes the warning by checkpatch: space prohibited before
that ',' (ctx:WxW)
Shraddha Barke [Fri, 9 Oct 2015 15:33:29 +0000 (21:03 +0530)]
Staging: rtl8192e: Use kcalloc instead of kzalloc to allocate array
The advantage of kcalloc is, that will prevent integer overflows which
could result from the multiplication of number of elements and size and
it is also a bit nicer to read.
The problem fixed was that the back-end IO partition was holding onto
stale receive buffers after the "rmmod visornic", and erroneously
completing them after a subsequent "modprobe visornic". This is fixed
in this patch as follows:
* Tell the back-end IO partition that we want it to employ its
"incarnation mechanism" to ensure it does not complete stale receive
buffers after the guest virtual device environment changes (e.g., by
re-loading the driver), by setting the
ULTRA_IO_DRIVER_SUPPORTS_ENHANCED_RCVBUF_CHECKING feature bit, and
supplying a unique incarnation number in rcvpost.unique_num for each
receive buffer posted.
* When visornic loads, make sure we drain and ignore any possible-stale
data in the channel before beginning network operation.
Prior to this patch, faults like this would occur almost every time if
you attempted to rmmod + modprobe the visornic driver and restart the
network service during heavy network activity:
BUG: spinlock bad magic on CPU#0, ksoftirqd/0/3
lock: 0xffff88002d8a56d8, .magic: ffff8800, .owner: <none>/-1,
.owner_cpu: 2304
CPU: 0 PID: 3 Comm: ksoftirqd/0 Tainted: G C
4.3.0-rc3-ARCH+ #74
Signed-off-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shraddha Barke [Fri, 9 Oct 2015 15:33:28 +0000 (21:03 +0530)]
Staging: unisys: Use kcalloc instead of kzalloc to allocate array
The advantage of kcalloc is, that will prevent integer overflows which
could result from the multiplication of number of elements and size and
it is also a bit nicer to read.
Ivan Safonov [Sat, 10 Oct 2015 12:21:54 +0000 (19:21 +0700)]
staging: rtl8188eu: ARRAY_SIZE instead of sizeof/sizeof used
This patch inserts ARRAY_SIZE instead of sizeof(type array[])/sizeof(type),
made arraylen variable constant
and removes unnecessary default value in variable definition.
Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
range->avg_qual.level is of type uint8, so it shouldn't be assigned a
negative number. Assigning it 0x100 - 78, which is the equivalent
to (20 + -98) dBm when IW_QUAL_DBM is set.
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: rtl8712: usleep_range is preferred over udelay
Fix checkpatch.pl issue: "CHECK: usleep_range is preferred over
udelay;
see Documentation/timers/timers-howto.txt".
Replace `udelay()` with a call to `usleep_range()` with a reasonable
upper limit determined by the other sleeping functions present.
staging: rtl8712: Replace GFP_ATOMIC with GFP_KERNEL
Replace GFP_ATOMIC with GFP_KERNEL since GFP_ATOMIC is used in
atomic context and only needed when functions are not allowed to sleep
whereas the function is later calling msleep().
staging: rtl8192u: r8192U_wx: fix negative noise and level values
range->max_qual.noise and level are of type uint8, so they shouldn't be
assigned a negative number. Assigning them 0x100 - 98, and 0x100 - 78 which
are the equivalent to -98 dBm and -78 dBm, respectively, when IW_QUAL_DBM
is set.
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: rtl8192u: r8192U_core: fix negative noise value
ieee80211_rx_stats.noise is of type uint8, so it shouldn't be assigned a
negative number. Assigning it 0x100 - 98, which is the equivalent
to -98 dBm when IW_QUAL_DBM is set.
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shraddha Barke [Fri, 9 Oct 2015 15:33:27 +0000 (21:03 +0530)]
Staging: rdma: ipath: Use kcalloc instead of kzalloc to allocate array
The advantage of kcalloc is, that will prevent integer overflows which
could result from the multiplication of number of elements and size and
it is also a bit nicer to read.
Shraddha Barke [Fri, 9 Oct 2015 15:33:26 +0000 (21:03 +0530)]
Staging: rdma: hfi1: Use kcalloc instead of kzalloc to allocate array
The advantage of kcalloc is, that will prevent integer overflows which
could result from the multiplication of number of elements and size and
it is also a bit nicer to read.
Shraddha Barke [Fri, 9 Oct 2015 17:10:07 +0000 (22:40 +0530)]
Staging: lustre: obdclass: lprocfs_status: Declare local functions as static
Declare lustre_attr_show and lustre_attr_store as static
since they are used only in this particular file. Also remove them from
corresponding header files.
Shraddha Barke [Fri, 9 Oct 2015 17:10:06 +0000 (22:40 +0530)]
Staging: lustre: obdclass: lu_object: Declare local functions as static
Declare lu_dev_add_linkage and lu_object_find as static since they are
used only in this particular file. Also remove the corresponding
declarations from header file.
Deepa Dinamani [Fri, 9 Oct 2015 04:58:36 +0000 (21:58 -0700)]
staging: skein: fix block comment style
Use a separate line for the opening marker of a comment block,
a leading asterisk in front of subsequent lines in the block comment,
and a separate line for the closing marker of the comment block.
This patch fixes the checkpatch.pl warnings:
WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments use * on subsequent lines
Linus Torvalds [Sun, 11 Oct 2015 17:16:59 +0000 (10:16 -0700)]
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Thomas Gleixner:
"Three trivial commits:
- Fix a kerneldoc regression
- Export handle_bad_irq to unbreak a driver in next
- Add an accessor for the of_node field so refactoring in next does
not depend on merge ordering"
* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqdomain: Add an accessor for the of_node field
genirq: Fix handle_bad_irq kerneldoc comment
genirq: Export handle_bad_irq
Linus Torvalds [Sun, 11 Oct 2015 17:02:30 +0000 (10:02 -0700)]
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"This is a set of three bug fixes, two of which are regressions from
recent updates (the 3ware one from 4.1 and the device handler fixes
from 4.2)"
* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
3w-9xxx: don't unmap bounce buffered commands
scsi_dh: Use the correct module name when loading device handler
libiscsi: Fix iscsi_check_transport_timeouts possible infinite loop
Linus Torvalds [Sat, 10 Oct 2015 18:17:45 +0000 (11:17 -0700)]
Merge tag 'usb-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH:
"Here are some small USB and PHY fixes and quirk updates for 4.3-rc5.
Nothing major here, full details in the shortlog, and all of these
have been in linux-next for a while"
* tag 'usb-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: Add device quirk for Logitech PTZ cameras
USB: chaoskey read offset bug
USB: Add reset-resume quirk for two Plantronics usb headphones.
usb: renesas_usbhs: Add support for R-Car H3
usb: renesas_usbhs: fix build warning if 64-bit architecture
usb: gadget: bdc: fix memory leak
phy: berlin-sata: Fix module autoload for OF platform driver
phy: rockchip-usb: power down phy when rockchip phy probe
phy: qcom-ufs: fix build error when the component is built as a module
Linus Torvalds [Sat, 10 Oct 2015 18:09:55 +0000 (11:09 -0700)]
Merge tag 'tty-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial driver fixes from Greg KH:
"Here are a few bug fixes for the tty core that resolve reported
issues, and some serial driver fixes as well (including the
much-reported imx driver problem)
All of these have been in linux-next with no reported problems"
* tag 'tty-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
drivers/tty: require read access for controlling terminal
serial: 8250: add uart_config entry for PORT_RT2880
tty: fix data race on tty_buffer.commit
tty: fix data race in tty_buffer_flush
tty: fix data race in flush_to_ldisc
tty: fix stall caused by missing memory barrier in drivers/tty/n_tty.c
serial: atmel: fix error path of probe function
tty: don't leak cdev in tty_cdev_add()
Revert "serial: imx: remove unbalanced clk_prepare"
Linus Torvalds [Sat, 10 Oct 2015 18:03:31 +0000 (11:03 -0700)]
Merge tag 'staging-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging fixes from Greg KH:
"Here are two tiny staging tree fixes for 4.3-rc5.
One fixes the broken speakup subsystem as reported by a user, and the
other removes an entry in the MAINTAINERS file for a developer that
doesn't want to be listed anymore"
* tag 'staging-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: speakup: fix speakup-r regression
MAINTAINERS: Remove myself as nvec co-maintainer
Linus Torvalds [Sat, 10 Oct 2015 17:58:27 +0000 (10:58 -0700)]
Merge tag 'char-misc-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH:
"Here are some small fixes for some misc drivers that resolve some
reported issues. All of these have been linux-next for a while"
* tag 'char-misc-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
mcb: Fix error handling in mcb_pci_probe()
mei: hbm: fix error in state check logic
nvmem: sunxi: Check for memory allocation failure
nvmem: core: Fix memory leak in nvmem_cell_write
nvmem: core: Handle shift bits in-place if cell->nbits is non-zero
nvmem: core: fix the out-of-range leak in read/write()
Linus Torvalds [Sat, 10 Oct 2015 17:31:13 +0000 (10:31 -0700)]
Merge branch 'stable/for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb
Pull swiotlb fixlet from Konrad Rzeszutek Wilk:
"Enable the SWIOTLB under 32-bit PAE kernels.
Nowadays most distros enable this due to CONFIG_HYPERVISOR|XEN=y which
select SWIOTLB. But for those that are not interested in
virtualization and wanting to use 32-bit PAE kernels and wanting to
have working DMA operations - this configures it for them"
* 'stable/for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb:
swiotlb: Enable it under x86 PAE
Trond Myklebust [Fri, 9 Oct 2015 17:44:34 +0000 (13:44 -0400)]
namei: results of d_is_negative() should be checked after dentry revalidation
Leandro Awa writes:
"After switching to version 4.1.6, our parallelized and distributed
workflows now fail consistently with errors of the form:
T34: ./regex.c:39:22: error: config.h: No such file or directory
From our 'git bisect' testing, the following commit appears to be the
possible cause of the behavior we've been seeing: commit 766c4cbfacd8"
Al Viro says:
"What happens is that 766c4cbfacd8 got the things subtly wrong.
We used to treat d_is_negative() after lookup_fast() as "fall with
ENOENT". That was wrong - checking ->d_flags outside of ->d_seq
protection is unreliable and failing with hard error on what should've
fallen back to non-RCU pathname resolution is a bug.
Unfortunately, we'd pulled the test too far up and ran afoul of
another kind of staleness. The dentry might have been absolutely
stable from the RCU point of view (and we might be on UP, etc), but
stale from the remote fs point of view. If ->d_revalidate() returns
"it's actually stale", dentry gets thrown away and the original code
wouldn't even have looked at its ->d_flags.
What we need is to check ->d_flags where 766c4cbfacd8 does (prior to
->d_seq validation) but only use the result in cases where we do not
discard this dentry outright"
Linus Torvalds [Sat, 10 Oct 2015 01:39:04 +0000 (18:39 -0700)]
Merge tag 'pm+acpi-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management and ACPI fixes from Rafael Wysocki:
"These are four fixes for bugs in the devfreq and cpufreq subsystems,
including two regression fixes (one for a recent regression and one
for a problem introduced in 4.2).
Specifics:
- Two fixes for cpufreq regressions, an acpi-cpufreq driver one
introduced during the 4.2 cycle when we started to preserve cpufreq
directories for offline CPUs and a general one introduced recently
(Srinivas Pandruvada).
- Two devfreq fixes, one for a double kfree() in an error code path
and one for a confusing sysfs-related failure (Geliang Tang, Tobias
Jakobi)"
* tag 'pm+acpi-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: prevent lockup on reading scaling_available_frequencies
cpufreq: acpi_cpufreq: prevent crash on reading freqdomain_cpus
PM / devfreq: fix double kfree
PM / devfreq: Fix governor_store()
Linus Torvalds [Fri, 9 Oct 2015 23:58:11 +0000 (16:58 -0700)]
Merge tag 'dm-4.3-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
Pull dm fixes from Mike Snitzer:
"Three stable fixes:
- DM core AB-BA deadlock fix in the device destruction path (vs
device creation's DM table swap).
- DM raid fix to properly round up the region_size to the next
power-of-2.
- DM cache fix for a NULL pointer seen while switching from the
"cleaner" cache policy.
Two fixes for regressions introduced during the 4.3 merge:
- request-based DM error propagation regressed due to incorrect
changes introduced when adding the bi_error field to bio.
- DM snapshot fix to only support snapshots that overflow if the
client (e.g. lvm2) is prepared to deal with the associated
snapshot status interface change"
* tag 'dm-4.3-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
dm snapshot: add new persistent store option to support overflow
dm cache: fix NULL pointer when switching from cleaner policy
dm: fix request-based dm error reporting
dm raid: fix round up of default region size
dm: fix AB-BA deadlock in __dm_destroy()
Linus Torvalds [Fri, 9 Oct 2015 23:39:35 +0000 (16:39 -0700)]
Merge branch 'for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
"These are small and assorted. Neil's is the oldest, I dropped the
ball thinking he was going to send it in"
* 'for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
Btrfs: support NFSv2 export
Btrfs: open_ctree: Fix possible memory leak
Btrfs: fix deadlock when finalizing block group creation
Btrfs: update fix for read corruption of compressed and shared extents
Btrfs: send, fix corner case for reference overwrite detection
Linus Torvalds [Fri, 9 Oct 2015 22:54:14 +0000 (15:54 -0700)]
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from Arnd Bergmann:
"The fixes for this week include one small patch that was years in the
making and that finally fixes using all eight CPUs on exynos542x.
The rest are lots of minor changes for sunxi, imx, exynos and shmobile
- fixing the minimum voltage for Allwinner A20
- thermal boot issue on SMDK5250.
- invalid clock used for FIMD IOMMU.
- audio on Renesas r8a7790/r8a7791
- invalid clock used for FIMD IOMMU
- LEDs on exynos5422-odroidxu3-common
- usb pin control for imx-rex
- imx53: fix PMIC interrupt level
- a Makefile typo"
* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: dts: Fix wrong clock binding for sysmmu_fimd1_1 on exynos5420
ARM: dts: Fix bootup thermal issue on smdk5250
ARM: shmobile: r8a7791 dtsi: Add CPG/MSTP Clock Domain for sound
ARM: shmobile: r8a7790 dtsi: Add CPG/MSTP Clock Domain for sound
arm-cci500: Don't enable PMU driver by default
ARM: dts: fix usb pin control for imx-rex dts
ARM: imx53: qsrb: fix PMIC interrupt level
ARM: imx53: include IRQ dt-bindings header
ARM: dts: add suspend opp to exynos4412
ARM: dts: Fix LEDs on exynos5422-odroidxu3
ARM: EXYNOS: reset Little cores when cpu is up
ARM: dts: Fix Makefile target for sun4i-a10-itead-iteaduino-plus
ARM: dts: sunxi: Raise minimum CPU voltage for sun7i-a20 to meet SoC specifications
Mike Snitzer [Thu, 8 Oct 2015 22:05:41 +0000 (18:05 -0400)]
dm snapshot: add new persistent store option to support overflow
Commit 76c44f6d80 introduced the possibly for "Overflow" to be reported
by the snapshot device's status. Older userspace (e.g. lvm2) does not
handle the "Overflow" status response.
Fix this incompatibility by requiring newer userspace code, that can
cope with "Overflow", request the persistent store with overflow support
by using "PO" (Persistent with Overflow) for the snapshot store type.
Marc Zyngier [Fri, 9 Oct 2015 14:50:11 +0000 (15:50 +0100)]
irqdomain: Add an accessor for the of_node field
As we're about to remove the of_node field from the irqdomain
structure, introduce an accessor for it. Subsequent patches
will take care of the actual repainting.
Joe Thornber [Fri, 9 Oct 2015 13:03:38 +0000 (14:03 +0100)]
dm cache: fix NULL pointer when switching from cleaner policy
The cleaner policy doesn't make use of the per cache block hint space in
the metadata (unlike the other policies). When switching from the
cleaner policy to mq or smq a NULL pointer crash (in dm_tm_new_block)
was observed. The crash was caused by bugs in dm-cache-metadata.c
when trying to skip creation of the hint btree.
The minimal fix is to change hint size for the cleaner policy to 4 bytes
(only hint size supported).
Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Cc: stable@vger.kernel.org
Mikulas Patocka [Thu, 1 Oct 2015 19:17:43 +0000 (15:17 -0400)]
crash in md-raid1 and md-raid10 due to incorrect list manipulation
The commit 55ce74d4bfe1b9444436264c637f39a152d1e5ac (md/raid1: ensure
device failure recorded before write request returns) is causing crash in
the LVM2 testsuite test shell/lvchange-raid.sh. For me the crash is 100%
reproducible.
The reason for the crash is that the newly added code in raid1d moves the
list from conf->bio_end_io_list to tmp, then tests if tmp is non-empty and
then incorrectly pops the bio from conf->bio_end_io_list (which is empty
because the list was alrady moved).
cpufreq: prevent lockup on reading scaling_available_frequencies
When scaling_available_frequencies is read on an offlined cpu, then
either lockup or junk values are displayed. This is caused by
freed freq_table, which policy is using.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>