Dan Carpenter [Mon, 17 Feb 2014 19:56:06 +0000 (22:56 +0300)]
staging/bcm: two information leaks in ioctl
There are a couple paths where we don't check how much data we copy back
to the user.
Cc: Dave Jones <davej@redhat.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Zhao, Gang [Tue, 18 Feb 2014 15:03:27 +0000 (23:03 +0800)]
staging: wlan-ng: replace function ieee80211_dsss_chan_to_freq()
Replace ieee80211_dsss_chan_to_freq() with more generic
ieee80211_channel_to_frequency(), and add a variable to deal with 80
characters problem.
File cfg80211.c is included by p80211netdev.c, p80211netdev.c includes
<net/cfg80211.h>, both ieee80211_channel_to_frequency() and
IEEE80211_BAND_2GHZ is defined / declared in <net/cfg80211.h>. So this
change is safe.
This change is a preparation for the removal of function
ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}.
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chase Southwood [Sun, 16 Feb 2014 08:41:32 +0000 (02:41 -0600)]
Staging: comedi: addi-data: do not initialize statics to 0 in hwdrv_apci035.c
This patch for hwdrv_apci035.c removes a zero initialization from two
static variables. Static variables are initialized to zero by default,
so doing so explicitly is not necessary.
Chase Southwood [Tue, 18 Feb 2014 06:34:39 +0000 (00:34 -0600)]
Staging: comedi: addi-data: convert printk() to dev_err()
This patch for hwdrv_apci035.c changes a printk() call to a dev_err() call
since this is generally preferred. It also removes a newline from the start
of the error message.
Chase Southwood [Sun, 16 Feb 2014 08:41:09 +0000 (02:41 -0600)]
Staging: comedi: addi-data: cleanup comments in hwdrv_apci035.c
This patch for hwdrv_apci035.c aligns comment blocks and makes indentation
of comments consistent. Removed all "spaces before tabs" in comment
indentation as well.
Chase Southwood [Sun, 16 Feb 2014 08:40:06 +0000 (02:40 -0600)]
Staging: comedi: addi-data: fix brace-related coding style issues in hwdrv_apci035.c
This patch for hwdrv_apci035 removes some unneeded braces, and moves some
improperly placed braces to the correct position, as found by checkpatch.
It also removes a commented out if-statement that I found whilst cleaning
braces that is identical to another un-commented if-statement directly
above it, so it is just added clutter and so we can delete it to clean up
further.
staging: ion: Add private buffer flag to skip page pooling on free
Currently, when we free a buffer it might actually just go back into a
heap-specific page pool rather than going back to the system. This poses
a problem because sometimes (like when we're running a shrinker in low
memory conditions) we need to force the memory associated with the
buffer to truly be relinquished to the system rather than just going
back into a page pool.
There isn't a use case for this flag by Ion clients, so make it a
private flag. The main use case right now is to provide a mechanism for
the deferred free code to force stale buffers to bypass page pooling.
Cc: Colin Cross <ccross@android.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
[jstultz: Minor commit subject tweak] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Cross [Mon, 17 Feb 2014 21:58:38 +0000 (13:58 -0800)]
staging: ion: Move shrinker out of heaps
Every heap that uses deferred frees is going to need a shrinker
to shrink the freelist under memory pressure. Rather than
requiring each heap to implement a shrinker, automatically
register a shrinker if the deferred free flag is set.
The system heap also needs to shrink its page pools, so add
a shrink function to the heap ops that will be called after
shrinking the freelists.
Cc: Colin Cross <ccross@android.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com>
[jstultz: Resolved big conflicts with the shrinker api change.
Also minor commit subject tweak.] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: ion: Make sure all clients are exposed in debugfs
Currently, if multiple Ion clients are created with the same name, only
the first one shows up in debugfs. Rectify this by adding a
monotonically-increasing serial number to the debug names of Ion
clients.
Cc: Colin Cross <ccross@android.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
[jstultz: Minor commit subject tweaks] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: ion: Store a copy of the client name on client creation
Currently, we copy the pointer passed in to ion_client_create without
making a copy of the string itself. This approach is problematic since
it relies on the client keeping the name string in working order.
Cc: Colin Cross <ccross@android.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
[jstultz: Minor commit subject tweaks] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Laura Abbott [Mon, 17 Feb 2014 21:58:35 +0000 (13:58 -0800)]
staging: ion: Fix debugfs handling of multiple kernel clients
Currently, Ion registers all debugfs entries for clients
via pid. If there are multiple kernel clients, this means
the debugfs entry only gets created for the first one. Fix
this by creating debugfs entries by name always. When
creating user clients, specify the name via the pid.
Cc: Colin Cross <ccross@android.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Laura Abbott <lauraa@codeaurora.org> Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
[jstultz: Minor commit subject tweaks] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: ion: Create separate heap and client debugfs directories
It can be slightly annoying to figure out which files under the ion
debugfs directory are heap debug files and which ones are client debug
files. Create separate subdirectories under ion to hold the different
types of debug files.
Cc: Colin Cross <ccross@android.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
[jstultz: Minor commit subject tweaks] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Cross [Mon, 17 Feb 2014 21:58:33 +0000 (13:58 -0800)]
staging: android: Split uapi out of binder.h
Move the userspace interface of binder.h to
drivers/staging/android/uapi/binder.h.
Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Colin Cross <ccross@android.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com>
[jstultz: Worked out the collisions from some of the type changes
made upstream. Also minor commit subject tweak] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Cross [Mon, 17 Feb 2014 21:58:32 +0000 (13:58 -0800)]
staging: android: split uapi out of sync.h and sw_sync.h
Move the userspace interfaces of sync.h and sw_sync.h to
drivers/staging/android/uapi/
Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Colin Cross <ccross@android.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com>
[jstultz: Fixed up some conflicts from upstream spelling fixes] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Sun, 16 Feb 2014 19:05:27 +0000 (11:05 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
"We have a small collection of fixes in my for-linus branch.
The big thing that stands out is a revert of a new ioctl. Users
haven't shipped yet in btrfs-progs, and Dave Sterba found a better way
to export the information"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
Btrfs: use right clone root offset for compressed extents
btrfs: fix null pointer deference at btrfs_sysfs_add_one+0x105
Btrfs: unset DCACHE_DISCONNECTED when mounting default subvol
Btrfs: fix max_inline mount option
Btrfs: fix a lockdep warning when cleaning up aborted transaction
Revert "btrfs: add ioctl to export size of global metadata reservation"
Linus Torvalds [Sun, 16 Feb 2014 19:03:58 +0000 (11:03 -0800)]
Merge tag 'dt-fixes-for-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull devicetree fixes from Rob Herring:
"Fix booting on PPC boards. Changes to of_match_node matching caused
the serial port on some PPC boards to stop working. Reverted the
change and reimplement to split matching between new style compatible
only matching and fallback to old matching algorithm"
* tag 'dt-fixes-for-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
of: search the best compatible match first in __of_match_node()
Revert "OF: base: match each node compatible against all given matches first"
Kevin Hao [Fri, 14 Feb 2014 05:22:46 +0000 (13:22 +0800)]
of: search the best compatible match first in __of_match_node()
Currently, of_match_node compares each given match against all node's
compatible strings with of_device_is_compatible.
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and also
an alphabetical ordering is more sane there.
Therefore, this patch introduces a function to match each of the node's
compatible strings against all given compatible matches without type and
name first, before checking the next compatible string. This implies
that node's compatibles are ordered from specific to generic while
given matches can be in any order. If we fail to find such a match
entry, then fall-back to the old method in order to keep compatibility.
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Kevin Hao <haokexin@gmail.com> Tested-by: Stephen Chivers <schivers@csc.com> Signed-off-by: Rob Herring <robh@kernel.org>
Pull SCSI target fixes from Nicholas Bellinger:
"Mostly minor fixes this time to v3.14-rc1 related changes. Also
included is one fix for a free after use regression in persistent
reservations UNREGISTER logic that is CC'ed to >= v3.11.y stable"
* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
Target/sbc: Fix protection copy routine
IB/srpt: replace strict_strtoul() with kstrtoul()
target: Simplify command completion by removing CMD_T_FAILED flag
iser-target: Fix leak on failure in isert_conn_create_fastreg_pool
iscsi-target: Fix SNACK Type 1 + BegRun=0 handling
target: Fix missing length check in spc_emulate_evpd_83()
qla2xxx: Remove last vestiges of qla_tgt_cmd.cmd_list
target: Fix 32-bit + CONFIG_LBDAF=n link error w/ sector_div
target: Fix free-after-use regression in PR unregister
Linus Torvalds [Sun, 16 Feb 2014 00:06:12 +0000 (16:06 -0800)]
Merge branches 'irq-urgent-for-linus' and 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq update from Thomas Gleixner:
"Fix from the urgent branch: a trivial oneliner adding the missing
Kconfig dependency curing build failures which have been discovered by
several build robots.
The update in the irq-core branch provides a new function in the
irq/devres code, which is a prerequisite for driver developers to get
rid of boilerplate code all over the place.
Not a bugfix, but it has zero impact on the current kernel due to the
lack of users. It's simpler to provide the infrastructure to
interested parties via your tree than fulfilling the wishlist of
driver maintainers on which particular commit or tag this should be
based on"
* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
genirq: Add missing irq_to_desc export for CONFIG_SPARSE_IRQ=n
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
genirq: Add devm_request_any_context_irq()
Linus Torvalds [Sun, 16 Feb 2014 00:04:42 +0000 (16:04 -0800)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner:
"The following trilogy of patches brings you:
- fix for a long standing math overflow issue with HZ < 60
- an onliner fix for a corner case in the dreaded tick broadcast
mechanism affecting a certain range of AMD machines which are
infested with the infamous automagic C1E power control misfeature
- a fix for one of the ARM platforms which allows the kernel to
proceed and boot instead of stupidly panicing for no good reason.
The patch is slightly larger than necessary, but it's less ugly
than the alternative 5 liner"
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
tick: Clear broadcast pending bit when switching to oneshot
clocksource: Kona: Print warning rather than panic
time: Fix overflow when HZ is smaller than 60
Linus Torvalds [Sat, 15 Feb 2014 23:03:34 +0000 (15:03 -0800)]
Merge tag 'trace-fixes-v3.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull twi tracing fixes from Steven Rostedt:
"Two urgent fixes in the tracing utility.
The first is a fix for the way the ring buffer stores timestamps.
After a restructure of the code was done, the ring buffer timestamp
logic missed the fact that the first event on a sub buffer is to have
a zero delta, as the full timestamp is stored on the sub buffer
itself. But because the delta was not cleared to zero, the timestamp
for that event will be calculated as the real timestamp + the delta
from the last timestamp. This can skew the timestamps of the events
and have them say they happened when they didn't really happen.
That's bad.
The second fix is for modifying the function graph caller site. When
the stop machine was removed from updating the function tracing code,
it missed updating the function graph call site location. It is still
modified as if it is being done via stop machine. But it's not. This
can lead to a GPF and kernel crash if the function graph call site
happens to lie between cache lines and one CPU is executing it while
another CPU is doing the update. It would be a very hard condition to
hit, but the result is severe enough to have it fixed ASAP"
* tag 'trace-fixes-v3.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
ftrace/x86: Use breakpoints for converting function graph caller
ring-buffer: Fix first commit on sub-buffer having non-zero delta
Linus Torvalds [Sat, 15 Feb 2014 23:02:28 +0000 (15:02 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 EFI fixes from Peter Anvin:
"A few more EFI-related fixes"
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/efi: Check status field to validate BGRT header
x86/efi: Fix 32-bit fallout
Linus Torvalds [Sat, 15 Feb 2014 23:01:33 +0000 (15:01 -0800)]
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from Kevin Hilman:
"A collection of ARM SoC fixes for v3.14-rc1.
Mostly a collection of Kconfig, device tree data and compilation fixes
along with fix to drivers/phy that fixes a boot regression on some
Marvell mvebu platforms"
* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
dma: mv_xor: Silence a bunch of LPAE-related warnings
ARM: ux500: disable msp2 device tree node
ARM: zynq: Reserve not DMAable space in front of the kernel
ARM: multi_v7_defconfig: Select CONFIG_SOC_DRA7XX
ARM: imx6: Initialize low-power mode early again
ARM: pxa: fix various compilation problems
ARM: pxa: fix compilation problem on AM300EPD board
ARM: at91: add Atmel's SAMA5D3 Xplained board
spi/atmel: document clock properties
mmc: atmel-mci: document clock properties
ARM: at91: enable USB host on at91sam9n12ek board
ARM: at91/dt: fix sama5d3 ohci hclk clock reference
ARM: at91/dt: sam9263: fix compatibility string for the I2C
ata: sata_mv: Fix probe failures with optional phys
drivers: phy: Add support for optional phys
drivers: phy: Make NULL a valid phy reference
ARM: fix HAVE_ARM_TWD selection for OMAP and shmobile
ARM: moxart: move DMA_OF selection to driver
ARM: hisi: fix kconfig warning on HAVE_ARM_TWD
Chase Southwood [Sat, 15 Feb 2014 03:59:40 +0000 (21:59 -0600)]
Staging: comedi: kcomedilib: replace deprecated simple_strtoul() with kstrtouint()
Since simple_strtoul() has been deprecated, replace it with kstrtouint().
Also, since return code checking for this new function is enforced, add a
check to ensure that the conversion has succeeded.
Stas Sergeev [Fri, 14 Feb 2014 22:54:17 +0000 (16:54 -0600)]
staging: r8188eu: Make firmware buffer persistent
The present code reloads the firmware file from the disk every time the interface
re-inits. Change to hold the firmware in memory, and only download to the
device.
Larry Finger [Fri, 14 Feb 2014 22:54:11 +0000 (16:54 -0600)]
staging: r8188eu: Remove get_recvframe_data()
This inline function checks that the pointer is not NULL and then returns
the rx_data member. Unfortunately, all 3 callers of this function have
dereferenced that pointer before this routine is called. As the check for
NULL is useless, eliminate the routine.
Larry Finger [Fri, 14 Feb 2014 22:54:07 +0000 (16:54 -0600)]
staging: r8188eu: Remove union wrapping of recv_frame
We have now removed everthing from the union except the struct. The union
can be deleted, the struct renamed, and the referencing of members of the
struct becomes a lot simpler.
Some, but not all, of the problems noted by checkpatch.pl have been fixed.
Julia Lawall [Sat, 15 Feb 2014 07:36:11 +0000 (08:36 +0100)]
staging: r8712u: delete unnecessary field initialization
On success, the function netdev_alloc_skb initializes the dev field of its
result to its first argument, so this doesn't have to be done in the
calling context.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression skb,privn,e;
@@
skb = netdev_alloc_skb(privn,...);
... when strict
(
-skb->dev = privn;
|
?skb = e
)
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Levente Kurusa [Fri, 14 Feb 2014 21:50:23 +0000 (22:50 +0100)]
staging: rtl8821ae: fix invalid bit mask on MSR_AP check
Since MSR_AP is 0x3, ANDing it with 0xFC will never be true.
Add a NOT operation to 0xFC so that we will AND with the last
three bits which will result in a possibility that the condition
will succeed.
Btrfs: use right clone root offset for compressed extents
For non compressed extents, iterate_extent_inodes() gives us offsets
that take into account the data offset from the file extent items, while
for compressed extents it doesn't. Therefore we have to adjust them before
placing them in a send clone instruction. Not doing this adjustment leads to
the receiving end requesting for a wrong a file range to the clone ioctl,
which results in different file content from the one in the original send
root.
Issue reproducible with the following excerpt from the test I made for
xfstests:
Wolfram Sang [Thu, 13 Feb 2014 20:36:29 +0000 (21:36 +0100)]
i2c: mv64xxx: refactor message start to ensure proper initialization
Because the offload mechanism can fall back to a standard transfer,
having two seperate initialization states is unfortunate. Let's just
have one state which does things consistently. This fixes a bug where
some preparation was missing when the fallback happened. And it makes
the code much easier to follow. To implement this, we put the check
if offload is possible at the top of the offload setup function.
Linus Torvalds [Sat, 15 Feb 2014 00:15:45 +0000 (16:15 -0800)]
Merge tag 'usb-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH:
"Here is a bunch of USB fixes for 3.14-rc3. Most of these are xhci
reverts, fixing a bunch of reported issues with USB 3 host controller
issues that loads of people have been hitting (with the exception of
kernel developers, all of our machines seem to be working fine, which
is why these took so long to get resolved...)
There are some other minor fixes and new device ids, as ususal. All
have been in linux-next successfully"
* tag 'usb-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (22 commits)
usb: option: blacklist ZTE MF667 net interface
Revert "usb: xhci: Link TRB must not occur within a USB payload burst"
Revert "xhci: Avoid infinite loop when sg urb requires too many trbs"
Revert "xhci: Set scatter-gather limit to avoid failed block writes."
xhci 1.0: Limit arbitrarily-aligned scatter gather.
Modpost: fixed USB alias generation for ranges including 0x9 and 0xA
usb: core: Fix potential memory leak adding dyn USBdevice IDs
USB: ftdi_sio: add Tagsys RFID Reader IDs
usb: qcserial: add Netgear Aircard 340U
usb-storage: enable multi-LUN scanning when needed
USB: simple: add Dynastream ANT USB-m Stick device support
usb-storage: add unusual-devs entry for BlackBerry 9000
usb-storage: restrict bcdDevice range for Super Top in Cypress ATACB
usb: phy: move some error messages to debug
usb: ftdi_sio: add Mindstorms EV3 console adapter
usb: dwc2: fix memory corruption in dwc2 driver
usb: dwc2: fix role switch breakage
usb: dwc2: bail out early when booting with "nousb"
Revert "xhci: replace xhci_read_64() with readq()"
Revert "xhci: replace xhci_write_64() with writeq()"
...
Linus Torvalds [Sat, 15 Feb 2014 00:15:03 +0000 (16:15 -0800)]
Merge tag 'tty-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial driver fixes from Greg KH:
"Here are a small number of tty/serial driver fixes to resolve reported
issues with 3.14-rc and earlier (in the case of the vt bugfix). Some
of these have been tested and reported by a number of people as the
tty bugfix was pretty commonly hit on some platforms.
All have been in linux-next for a while"
* tag 'tty-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
vt: Fix secure clear screen
serial: 8250: Support XR17V35x fraction divisor
n_tty: Fix stale echo output
serial: sirf: fix kernel panic caused by unpaired spinlock
serial: 8250_pci: unbreak last serial ports on NetMos 9865 cards
n_tty: Fix poll() when TIME_CHAR and MIN_CHAR == 0
serial: omap: fix rs485 probe on defered pinctrl
serial: 8250_dw: fix compilation warning when !CONFIG_PM_SLEEP
serial: omap-serial: Move info message to probe function
tty: Set correct tty name in 'active' sysfs attribute
tty: n_gsm: Fix for modems with brk in modem status control
drivers/tty/hvc: don't use module_init in non-modular hyp. console code
Linus Torvalds [Sat, 15 Feb 2014 00:14:11 +0000 (16:14 -0800)]
Merge tag 'staging-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver fixes from Greg KH:
"Here are a number (lots, I know) of fixes for staging drivers to
resolve a bunch of reported issues.
The largest patches here is one revert of a patch that is in 3.14-rc1
to fix reported problems, and a sync of a usb host driver that
required some ARM patches to go in before it could be accepted (which
is why it missed -rc1)
All of these have been in linux-next for a while with no reported
issues"
* tag 'staging-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (56 commits)
staging/rtl8821ae: fix build, depends on MAC80211
iio: max1363: Use devm_regulator_get_optional for optional regulator
iio:accel:bma180: Use modifier instead of index in channel specification
iio: adis16400: Set timestamp as the last element in chan_spec
iio: ak8975: Fix calculation formula for convert micro tesla to gauss unit
staging:iio:ad799x fix typo in ad799x_events[]
iio: mxs-lradc: remove useless scale_available files
iio: mxs-lradc: fix buffer overflow
iio:magnetometer:mag3110: Fix output of decimal digits in show_int_plus_micros()
iio:magnetometer:mag3110: Report busy in _read_raw() / write_raw() when buffer is enabled
wlags49_h2: Fix overflow in wireless_set_essid()
xlr_net: Fix missing trivial allocation check
staging: r8188eu: overflow in rtw_p2p_get_go_device_address()
staging: r8188eu: array overflow in rtw_mp_ioctl_hdl()
staging: r8188eu: Fix typo in USB_DEVICE list
usbip/userspace/libsrc/names.c: memory leak
gpu: ion: dereferencing an ERR_PTR
staging: comedi: usbduxsigma: fix unaligned dereferences
staging: comedi: fix too early cleanup in comedi_auto_config()
staging: android: ion: dummy: fix an error code
...
Linus Torvalds [Sat, 15 Feb 2014 00:13:00 +0000 (16:13 -0800)]
Merge tag 'char-misc-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc fixes from Greg KH:
"Here are some small char/misc driver fixes, along with some
documentation updates, for 3.14-rc3. Nothing major, just a number of
fixes for reported issues"
* tag 'char-misc-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
Revert "misc: eeprom: sunxi: Add new compatibles"
Revert "ARM: sunxi: dt: Convert to the new SID compatibles"
misc: mic: fix possible signed underflow (undefined behavior) in userspace API
ARM: sunxi: dt: Convert to the new SID compatibles
misc: eeprom: sunxi: Add new compatibles
misc: genwqe: Fix potential memory leak when pinning memory
Documentation:Update Documentation/zh_CN/arm64/memory.txt
Documentation:Update Documentation/zh_CN/arm64/booting.txt
Documentation:Chinese translation of Documentation/arm64/tagged-pointers.txt
raw: set range for MAX_RAW_DEVS
raw: test against runtime value of max_raw_minors
Drivers: hv: vmbus: Don't timeout during the initial connection with host
Drivers: hv: vmbus: Specify the target CPU that should receive notification
VME: Correct read/write alignment algorithm
mei: don't unset read cb ptr on reset
mei: clear write cb from waiting list on reset
Josef Bacik [Fri, 14 Feb 2014 18:43:48 +0000 (13:43 -0500)]
Btrfs: unset DCACHE_DISCONNECTED when mounting default subvol
A user was running into errors from an NFS export of a subvolume that had a
default subvol set. When we mount a default subvol we will use d_obtain_alias()
to find an existing dentry for the subvolume in the case that the root subvol
has already been mounted, or a dummy one is allocated in the case that the root
subvol has not already been mounted. This allows us to connect the dentry later
on if we wander into the path. However if we don't ever wander into the path we
will keep DCACHE_DISCONNECTED set for a long time, which angers NFS. It doesn't
appear to cause any problems but it is annoying nonetheless, so simply unset
DCACHE_DISCONNECTED in the get_default_root case and switch btrfs_lookup() to
use d_materialise_unique() instead which will make everything play nicely
together and reconnect stuff if we wander into the defaul subvol path from a
different way. With this patch I'm no longer getting the NFS errors when
exporting a volume that has been mounted with a default subvol set. Thanks,
cc: bfields@fieldses.org
cc: ebiederm@xmission.com Signed-off-by: Josef Bacik <jbacik@fb.com> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Chris Mason <clm@fb.com>
Mitch Harder [Thu, 13 Feb 2014 15:13:16 +0000 (09:13 -0600)]
Btrfs: fix max_inline mount option
Currently, the only mount option for max_inline that has any effect is
max_inline=0. Any other value that is supplied to max_inline will be
adjusted to a minimum of 4k. Since max_inline has an effective maximum
of ~3900 bytes due to page size limitations, the current behaviour
only has meaning for max_inline=0.
This patch will allow the the max_inline mount option to accept non-zero
values as indicated in the documentation.
Signed-off-by: Mitch Harder <mitch.harder@sabayonlinux.org> Signed-off-by: Chris Mason <clm@fb.com>
David Sterba found a different way to provide these features without adding a new
ioctl. We haven't released any progs with this ioctl yet, so I'm taking this out
for now until we finalize things.
Signed-off-by: Chris Mason <clm@fb.com> Signed-off-by: David Sterba <dsterba@suse.cz> CC: Jeff Mahoney <jeffm@suse.com>
Linus Torvalds [Fri, 14 Feb 2014 20:48:16 +0000 (12:48 -0800)]
Merge tag 'md/3.14-fixes' of git://neil.brown.name/md
Pull md fixes from Neil Brown:
"Two bugfixes for md
both tagged for -stable"
* tag 'md/3.14-fixes' of git://neil.brown.name/md:
md/raid5: Fix CPU hotplug callback registration
md/raid1: restore ability for check and repair to fix read errors.
Kevin Hao [Fri, 14 Feb 2014 05:22:45 +0000 (13:22 +0800)]
Revert "OF: base: match each node compatible against all given matches first"
This reverts commit 105353145eafb3ea919f5cdeb652a9d8f270228e.
Stephen Chivers reported this is broken as we will get a match
entry '.type = "serial"' instead of the '.compatible = "ns16550"'
in the following scenario:
serial0: serial@4500 {
compatible = "fsl,ns16550", "ns16550";
}
So just revert this patch, we will use another implementation to find
the best compatible match in a follow-on patch.
Reported-by: Stephen N Chivers <schivers@csc.com.au> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
Linus Torvalds [Fri, 14 Feb 2014 19:10:49 +0000 (11:10 -0800)]
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM fixes from Paolo Bonzini:
"A small error handling problem and a compile breakage for ARM64"
* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
arm64: KVM: Add VGIC device control for arm64
KVM: return an error code in kvm_vm_ioctl_register_coalesced_mmio()
Linus Torvalds [Fri, 14 Feb 2014 19:09:11 +0000 (11:09 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Peter Anvin:
"A collection of small fixes:
- There still seem to be problems with asm goto which requires the
empty asm hack.
- If SMAP is disabled at compile time, don't enable it nor try to
interpret a page fault as an SMAP violation.
- Fix a case of unbounded recursion while tracing"
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, smap: smap_violation() is bogus if CONFIG_X86_SMAP is off
x86, smap: Don't enable SMAP if CONFIG_X86_SMAP is disabled
compiler/gcc4: Make quirk for asm_volatile_goto() unconditional
x86: Use preempt_disable_notrace() in cycles_2_ns()
Linus Torvalds [Fri, 14 Feb 2014 19:07:29 +0000 (11:07 -0800)]
Merge tag 'pm+acpi-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI and power management fixes from Rafael Wysocki:
"These include a fix for a recent intel_pstate regression, a fix for a
regression in the ACPI-based PCI hotplug (ACPIPHP) code introduced
during the 3.12 cycle, fixes for two bugs in the ACPI core introduced
recently and a MAINTAINERS update related to cpufreq.
Specifics:
- Fix for a recent regression in the intel_pstate driver that
introduced a race condition causing systems to crash during
initialization in some situations. This removes the affected code
altogether. From Dirk Brandewie.
- ACPIPHP fix for a regression introduced during the 3.12 cycle
causing devices to be dropped as a result of bus check
notifications after system resume on some systems due to the way
ACPIPHP interprets _STA return values (arguably incorrectly). From
Mika Westerberg.
- ACPI dock driver fix for a problem causing docking to fail due to a
check that always fails after recent ACPI core changes (found by
code inspection).
- ACPI container driver fix to prevent memory from being leaked in an
error code path after device_register() failures.
- Update of the arm_big_little cpufreq driver maintainer's e-mail
address"
* tag 'pm+acpi-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
MAINTAINERS / cpufreq: update Sudeep's email address
intel_pstate: Remove energy reporting from pstate_sample tracepoint
ACPI / container: Fix error code path in container_device_attach()
ACPI / hotplug / PCI: Relax the checking of _STA return values
ACPI / dock: Use acpi_device_enumerated() to check if dock is present
Linus Torvalds [Fri, 14 Feb 2014 19:05:41 +0000 (11:05 -0800)]
Merge tag 'edac_for_3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
Pull EDAC fixes from Borislav Petkov:
"Fix polling timeout setting through sysfs.
You're surely wondering why the patches are not based on an rc. Well,
Andrew sent you 79040cad3f82 ("drivers/edac/edac_mc_sysfs.c: poll
timeout cannot be zero sent you") already (it got in in -rc2) but it
is not enough as a fix because for one, setting too low polling
intervals (< 1sec) don't make any sense and cause unnecessary polling
load on the system.
Then, even if we set some interval, we explode with
[ 4143.094342] WARNING: CPU: 1 PID: 0 at kernel/workqueue.c:1393 __queue_work+0x1d7/0x340()
because the workqueue setup path is used also for the timeout period
resetting and we're doing INIT_DELAYED_WORK() on an already active
workqueue. Which is total bollocks. So this is taken care of by the
second patch.
I've CCed stable for those two"
* tag 'edac_for_3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
EDAC: Correct workqueue setup path
EDAC: Poll timeout cannot be zero, p2
Linus Torvalds [Fri, 14 Feb 2014 18:45:18 +0000 (10:45 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block IO fixes from Jens Axboe:
"Second round of updates and fixes for 3.14-rc2. Most of this stuff
has been queued up for a while. The notable exception is the blk-mq
changes, which are naturally a bit more in flux still.
The pull request contains:
- Two bug fixes for the new immutable vecs, causing crashes with raid
or swap. From Kent.
- Various blk-mq tweaks and fixes from Christoph. A fix for
integrity bio's from Nic.
- A few bcache fixes from Kent and Darrick Wong.
- xen-blk{front,back} fixes from David Vrabel, Matt Rushton, Nicolas
Swenson, and Roger Pau Monne.
- Fix for a vec miscount with integrity vectors from Martin.
- Minor annotations or fixes from Masanari Iida and Rashika Kheria.
- Tweak to null_blk to do more normal FIFO processing of requests
from Shlomo Pongratz.
- Elevator switching bypass fix from Tejun.
- Softlockup in blkdev_issue_discard() fix when !CONFIG_PREEMPT from
me"
* 'for-linus' of git://git.kernel.dk/linux-block: (31 commits)
block: add cond_resched() to potentially long running ioctl discard loop
xen-blkback: init persistent_purge_work work_struct
blk-mq: pair blk_mq_start_request / blk_mq_requeue_request
blk-mq: dont assume rq->errors is set when returning an error from ->queue_rq
block: Fix cloning of discard/write same bios
block: Fix type mismatch in ssize_t_blk_mq_tag_sysfs_show
blk-mq: rework flush sequencing logic
null_blk: use blk_complete_request and blk_mq_complete_request
virtio_blk: use blk_mq_complete_request
blk-mq: rework I/O completions
fs: Add prototype declaration to appropriate header file include/linux/bio.h
fs: Mark function as static in fs/bio-integrity.c
block/null_blk: Fix completion processing from LIFO to FIFO
block: Explicitly handle discard/write same segments
block: Fix nr_vecs for inline integrity vectors
blk-mq: Add bio_integrity setup to blk_mq_make_request
blk-mq: initialize sg_reserved_size
blk-mq: handle dma_drain_size
blk-mq: divert __blk_put_request for MQ ops
blk-mq: support at_head inserations for blk_execute_rq
...
Linus Torvalds [Fri, 14 Feb 2014 18:34:30 +0000 (10:34 -0800)]
Merge tag 'sound-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Again only fixes for HD-audio:
- regression fixes due to the modularization
- a few fixups for Dell, Sony and HP laptops
- a revert of the previous fix as it leads to another regression"
* tag 'sound-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: Revert "ALSA: hda/realtek - Avoid invalid COEFs for ALC271X"
ALSA: hda - Fix undefined symbol due to builtin/module mixup
ALSA: hda - Fix mic capture on Sony VAIO Pro 11
ALSA: hda - Add a headset quirk for Dell XPS 13
ALSA: hda - Fix inconsistent Mic mute LED
ALSA: hda - Fix leftover ifdef checks after modularization
Linus Torvalds [Fri, 14 Feb 2014 18:33:45 +0000 (10:33 -0800)]
Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
Pull RDMA/InfiniBand fixes from Roland Dreier:
- Fix some rough edges from the "IP addressing for IBoE" merge
- Other misc fixes, mostly to hardware drivers
* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (21 commits)
RDMA/ocrdma: Fix load time panic during GID table init
RDMA/ocrdma: Fix traffic class shift
IB/iser: Fix use after free in iser_snd_completion()
IB/iser: Avoid dereferencing iscsi_iser conn object when not bound to iser connection
IB/usnic: Fix smatch endianness error
IB/mlx5: Remove dependency on X86
mlx5: Add include of <linux/slab.h> because of kzalloc()/kfree() use
IB/qib: Add missing serdes init sequence
RDMA/cxgb4: Add missing neigh_release in LE-Workaround path
IB: Report using RoCE IP based gids in port caps
IB/mlx4: Build the port IBoE GID table properly under bonding
IB/mlx4: Do IBoE GID table resets per-port
IB/mlx4: Do IBoE locking earlier when initializing the GID table
IB/mlx4: Move rtnl locking to the right place
IB/mlx4: Make sure GID index 0 is always occupied
IB/mlx4: Don't allocate range of steerable UD QPs for Ethernet-only device
RDMA/amso1100: Fix error return code
RDMA/nes: Fix error return code
IB/mlx5: Don't set "block multicast loopback" capability
IB/mlx5: Fix binary compatibility with libmlx5
...
Linus Torvalds [Fri, 14 Feb 2014 18:32:28 +0000 (10:32 -0800)]
Merge tag 'for-v3.14-fixes' of git://git.infradead.org/battery-2.6
Pull battery fixes from Dmitry Eremin-Solenikov:
- Fix NULL pointer dereference in max17040 driver
- Add bq2415x dts bindings documentation
- Fix misleading comment in ds2782 driver
- Remove useless check in isp1704 charger driver.
* tag 'for-v3.14-fixes' of git://git.infradead.org/battery-2.6:
power: max17040: Fix NULL pointer dereference when there is no platform_data
dt: binding documentation for bq2415x charger
isp1704_charger: remove useless check in isp1704_charger_probe()
power: ds2782_battery: Typo in comment
Dan Carpenter [Wed, 29 Jan 2014 13:18:51 +0000 (16:18 +0300)]
IB/iser: Fix use after free in iser_snd_completion()
We use "tx_desc" again after we free it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Roi Dayan [Tue, 4 Feb 2014 14:54:54 +0000 (16:54 +0200)]
IB/iser: Avoid dereferencing iscsi_iser conn object when not bound to iser connection
Fix a possible NULL pointer dereference in disconnection flow. This
can happen if the target disconnected/rejected the connection request,
e.g before the binding stage between iscsi connection to the transport
connection.
Signed-off-by: Alex Tabachnik <alext@mellanox.com> Signed-off-by: Roi Dayan <roid@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Mark Asselstine [Thu, 13 Feb 2014 02:47:56 +0000 (21:47 -0500)]
staging: usbip: prevent possible buffer overflow reading port records
To avoid buffer overflow while reading a corrupted or possibly
modified port file we validate the length of each part of the port
record to ensure it doesn't exceed the length of the destination
buffer.
https://bugzilla.kernel.org/show_bug.cgi?id=69931
Signed-off-by: Mark Asselstine <asselsm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das800: trigger sources are validated in (*do_cmdtest)
The trigger sources were already validataed in the (*do_cmdtest) before the
(*do_cmd) is called. Refactor the code in das800_ai_do_cmd() to use if/else
instead of the switch since the default cases can never be reached.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: comedi_test: trigger sources are validated in (*do_cmdtest)
The trigger sources were already validataed in the (*do_cmdtest) before the
(*do_cmd) is called. Refactor the code in waveform_ai_cmd() to remove the
final else which can never be reached.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: cb_pcidas: trigger sources are validated in (*do_cmdtest)
The trigger sources were already validataed in the (*do_cmdtest) before the
(*do_cmd) is called. Refactor the code in cb_pcidas_ai_cmd() to remove the
final else which can never be reached.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>