aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-02-27Merge tag 'arm64-fixes' of ↵Linus Torvalds16-71/+68
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: "Various arm64 fixes: - ftrace branch generation fix - branch instruction encoding fix - include files, guards and unused prototypes clean-up - minor VDSO ABI fix (clock_getres) - PSCI functions moved to .S to avoid compilation error with gcc 5 - pte_modify fix to not ignore the mapping type - crypto: AES interleaved increased to 4x (for performance reasons) - text patching fix for modules - swiotlb increased back to 64MB - copy_siginfo_to_user32() fix for big endian" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: cpuidle: add asm/proc-fns.h inclusion arm64: compat Fix siginfo_t -> compat_siginfo_t conversion on big endian arm64: Increase the swiotlb buffer size 64MB arm64: Fix text patching logic when using fixmap arm64: crypto: increase AES interleave to 4x arm64: enable PTE type bit in the mask for pte_modify arm64: mm: remove unused functions and variable protoypes arm64: psci: move psci firmware calls out of line arm64: vdso: minor ABI fix for clock_getres arm64: guard asm/assembler.h against multiple inclusions arm64: insn: fix compare-and-branch encodings arm64: ftrace: fix ftrace_modify_graph_caller for branch replace
2015-02-27Merge tag 'renesas-sh-drivers-for-v4.0' of ↵Linus Torvalds1-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas Pull SH driver fix from Simon Horman: "Disable PM runtime for multi-platform r8a7740 with genpd" * tag 'renesas-sh-drivers-for-v4.0' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: drivers: sh: Disable PM runtime for multi-platform r8a7740 with genpd
2015-02-28PCI: versatile: Update for list_for_each_entry() API changeJoachim Nilsson1-1/+1
In Linux 4.0-rc1 ARM Versatile PCI build fails to build due to what appears to be an API update. This patch is a very simple correction, merely posted as a heads-up to the maintainers. Hopefully a better fix can be forwarded to Linus. [ arnd: the patch actually looks correct, so let's take this version ] Signed-off-by: Joachim Nilsson <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2015-02-27rhashtable: use cond_resched()Eric Dumazet1-0/+4
If a hash table has 128 slots and 16384 elems, expand to 256 slots takes more than one second. For larger sets, a soft lockup is detected. Holding cpu for that long, even in a work queue is a show stopper for non preemptable kernels. cond_resched() at strategic points to allow process scheduler to reschedule us. Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-02-27Merge branch 'master' of ↵David S. Miller9-76/+280
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2015-02-26 This series contains fixes for i40e and i40evf only. Alexey Khoroshilov found a possible leak of 'cmd_buf' when copy_from_user() failed in i40e_dbg_command_write(), so resolved by calling kfree(). Shannon provides a fix to ensure the shift and bitwise precedences do not work backwards for us by adding parans. Fixed the driver by preventing the driver from allowing stray interrupts or causing system logs from un-handled interrupts by combining the ICR0 shutdown with the standard interrupt shutdown and add the interrupt clearing to the PCI shutdown path. Fixed an issue where a NVM write times out before a transaction can complete, so Shannon added logic to make another attempt by reacquiring the semaphore, then retry the write, if the one retry fails, we will then give up. Adds checks to pointers before their use to ensure we do not try to dereference NULL pointers when returning values from the AdminQ calls. Akeem adds a check to bail out if the device is already down when checking for Tx hang subtask. Anjali fixes TSO with more than 8 frags per segment issue. The hardware has some limitations which the driver needs to adhere to: 1) no more than 8 descriptors per packet on the wire 2) no header can span more than 3 descriptors If one of these events happens, the hardware will generate an internal error and freeze the Tx queue, so Anjali fixes this by linearizes the skb to avoid these situations. Fixed an issue where the per Traffic Class queue count was higher than queues enabled, which will fix a warning with multiple function mode where systems regularly have more cores than vectors. Fixed TCP/IPv6 over VXLAN Tx checksum offload, where we were checking the outer protocol flags and deciding the flow for the inner header. Jesse fixes a race condition in the transmit hang detection. Before we were having issues of false Tx hang detection, no the driver makes more direct with the checks for progress forward by directly checking the head write back address and tail register when determining progress. This avoids Tx hangs where the software gets behind, because we are directly checking hardware state when determining a hang state. Neerav fixes the transmit ring Qset handle when DCB reconfigures. The issue was when DCB is reconfigured to a single traffic class (TC) and the driver did not reset the Tx ring Qset handle to correct the mapping, which caused the Tx queue to disable timeouts. Also as part of DCB reconfiguration flow if the Tx queue disable times out, then issue a PF reset to do some level of recovery. Mitch stops flow director on shutdown because, in some cases, the hardware would continue to try to access the FDIR ring after entering D3Hot state, which would cause either PCIe errors or NMIs, depending upon the system configuration. * NOTE * I have verified that this series of patches for net will not cause any merge issues when you sync up your net tree with your net-next tree. ==================== Signed-off-by: David S. Miller <[email protected]>
2015-02-27amd-xgbe: Request IRQs only after driver is fully setupLendacky, Thomas1-82/+93
It is possible that the hardware may not have been properly shutdown before this driver gets control, through use by firmware, for example. Until the driver is loaded, interrupts associated with the hardware could go pending. When the IRQs are requested napi support has not been initialized yet, but the ISR will get control and schedule napi processing resulting in a kernel panic because the poll routine has not been set. Adjust the code so that the driver is fully ready to handle and process interrupts as soon as the IRQs are requested. This involves requesting and freeing IRQs during start and stop processing and ordering the napi add and delete calls appropriately. Also adjust the powerup and powerdown routines to match the start and stop routines in regards to the ordering of tasks, including napi related calls. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-02-27net: asix: add support for the Sitecom LN-028 USB adapterLuca Ceresoli2-0/+5
Just another AX88178-based 10/100/1000 USB-to-Ethernet dongle. This one shows up in lsusb as: "Sitecom Europe B.V. LN-028 Network USB 2.0 Adapter". Signed-off-by: Luca Ceresoli <[email protected]> Cc: Francois Romieu <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2015-02-27NFSv4: nfs4_open_recover_helper() must set share accessTrond Myklebust1-0/+3
The share access mode is now specified as an argument in the nfs4_opendata, and so nfs4_open_recover_helper() needs to call nfs4_map_atomic_open_share() in order to set it. Fixes: 6ae373394c42 ("NFSv4.1: Ask for no delegation on OPEN if using O_DIRECT") Signed-off-by: Trond Myklebust <[email protected]>
2015-02-27Merge branch 'rhashtable'David S. Miller6-61/+19
Daniel Borkmann says: ==================== rhashtable updates As discussed, I'm sending out rhashtable fixups for -net. I have a couple of more patches I was working on last week pending, i.e. to get rid of ht->nelems and ht->shift atomic operations which speed-up pure insertions/deletions, e.g. on my laptop I have 2 threads, inserting 7M entries each, that will reduce insertion time from ~1,450 ms to 865 ms (performance should even be better after removing the grow/shrink indirections). I guess that however is rather something for net-next. ==================== Signed-off-by: David S. Miller <[email protected]>
2015-02-27rhashtable: remove indirection for grow/shrink decision functionsDaniel Borkmann6-58/+18
Currently, all real users of rhashtable default their grow and shrink decision functions to rht_grow_above_75() and rht_shrink_below_30(), so that there's currently no need to have this explicitly selectable. It can/should be generic and private inside rhashtable until a real use case pops up. Since we can make this private, we'll save us this additional indirection layer and can improve insertion/deletion time as well. Reference: http://patchwork.ozlabs.org/patch/443040/ Suggested-by: David S. Miller <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-02-27rhashtable: unconditionally grow when max_shift is not specifiedDaniel Borkmann2-3/+1
While commit c0c09bfdc415 ("rhashtable: avoid unnecessary wakeup for worker queue") rightfully moved part of the decision making of whether we should expand or shrink from the expand/shrink functions themselves into insert/delete functions in order to avoid unnecessary worker wake-ups, it however introduced a regression by doing so. Before that change, if no max_shift was specified (= 0) on rhashtable initialization, rhashtable_expand() would just grow unconditionally and lets the available memory be the limiting factor. After that change, if no max_shift was specified, there would be _no_ expansion step at all. Given that netlink and tipc have a max_shift specified, it was not visible there, but Josh Hunt reported that if nft that starts out with a default element hint of 3 if not otherwise provided, would slow i.e. inserts down trememdously as it cannot grow larger to relax table occupancy. Given that the test case verifies shrinks/expands manually, we also must remove pointer to the helper functions to explicitly avoid parallel resizing on insertions/deletions. test_bucket_stats() and test_rht_lookup() could also be wrapped around rhashtable mutex to explicitly synchronize a walk from resizing, but I think that defeats the actual test case which intended to have explicit test steps, i.e. 1) inserts, 2) expands, 3) shrinks, 4) deletions, with object verification after each stage. Reported-by: Josh Hunt <[email protected]> Fixes: c0c09bfdc415 ("rhashtable: avoid unnecessary wakeup for worker queue") Signed-off-by: Daniel Borkmann <[email protected]> Cc: Ying Xue <[email protected]> Cc: Josh Hunt <[email protected]> Acked-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-02-27vhost: drop hard-coded num_buffers sizeMichael S. Tsirkin1-1/+2
The 2 that we use for copy_to_iter comes from sizeof(u16), it used to be that way before the iov iter update. Fix it up, making it obvious the size of stack access is right. Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-02-27vhost: cleanup iterator update logicMichael S. Tsirkin1-10/+12
Recent iterator-related changes in vhost made it harder to follow the logic fixing up the header. In fact, the fixup always happens at the same offset: sizeof(virtio_net_hdr): sometimes the fixup iterator is updated by copy_to_iter, sometimes-by iov_iter_advance. Rearrange code to make this obvious. Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-02-27rocker: silence shift wrapping warningDan Carpenter1-2/+2
"val" is declared as a u64 so static checkers complain that this shift can wrap. I don't have the hardware but probably it's doesn't have over 31 ports. Still we may as well silence the warning even if it's not a real bug. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Jiri Pirko <[email protected]> Acked-by: Scott Feldman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-02-27rocker: add a check for NULL in rocker_probe_ports()Dan Carpenter1-0/+2
Make sure kmalloc() succeeds. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Scott Feldman <[email protected]> Acked-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-02-27cxgb4: Fix PCI-E Memory window interface for big-endian systemsHariprasad Shenai2-11/+45
When doing reads and writes to adapter memory via the PCI-E Memory Window interface, data gets swizzled on 4-byte boundaries on Big-Endian systems because we need to account for the register read/write interface which incorporates a swizzle onto the Little-Endian PCI-E Bus. Based on original work by Casey Leedom <[email protected]> Signed-off-by: Hariprasad Shenai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-02-27enic: do notify_check before returning creditsSujith Sankar1-2/+2
We should complete notify_check before returning the credits. Once we return the credits, adaptor may access the notify data. Signed-off-by: Sujith Sankar <[email protected]> Signed-off-by: Govindarajulu Varadarajan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-02-27Code of ConflictGreg Kroah-Hartman1-0/+27
This file provides a basic guide for how to handle conflict resolution when it comes up in the development process. Acked-by: Alex Deucher <[email protected]> Acked-by: Arjan van de Ven <[email protected]> Acked-by: Arnaldo Carvalho de Melo <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Acked-by: Chris Ball <[email protected]> Acked-by: Chris Mason <[email protected]> Acked-by: Chris Metcalf <[email protected]> Acked-by: Dan Carpenter <[email protected]> Acked-by: Daniel Vetter <[email protected]> Acked-by: Dave Airlie <[email protected]> Acked-by: David Herrmann <[email protected]> Acked-by: Fabio Estevam <[email protected]> Acked-by: Felipe Balbi <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Acked-by: Gerd Hoffmann <[email protected]> Acked-by: Grant Likely <[email protected]> Acked-by: Guenter Roeck <[email protected]> Acked-by: H Hartley Sweeten <[email protected]> Acked-by: Hannes Reinecke <[email protected]> Acked-by: Hans Verkuil <[email protected]> Acked-by: Hans de Goede <[email protected]> Acked-by: Hugh Dickins <[email protected]> Acked-by: Ingo Molnar <[email protected]> Acked-by: Jaegeuk Kim <[email protected]> Acked-by: James Bottomley <[email protected]> Acked-by: Jens Axboe <[email protected]> Acked-by: Jes Sorensen <[email protected]> Acked-by: Johan Hedberg <[email protected]> Acked-by: Johan Hovold <[email protected]> Acked-by: Johannes Berg <[email protected]> Acked-by: John W. Linville <[email protected]> Acked-by: Jonathan Corbet <[email protected]> Acked-by: Josh Triplett <[email protected]> Acked-by: Julia Lawall <[email protected]> Acked-by: Kees Cook <[email protected]> Acked-by: Kevin Hilman <[email protected]> Acked-by: Konrad Rzeszutek Wilk <[email protected]> Acked-by: Kristen Carlson Accardi <[email protected]> Acked-by: Kyungmin Park <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Luis R. Rodriguez <[email protected]> Acked-by: Magnus Damm <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Maxime Ripard <[email protected]> Acked-by: Mimi Zohar <[email protected]> Acked-by: NeilBrown <[email protected]> Acked-by: Olof Johansson <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Acked-by: Rik van Riel <[email protected]> Acked-by: Sachin Prabhu <[email protected]> Acked-by: Shuah Khan <[email protected]> Acked-by: Simon Horman <[email protected]> Acked-by: Stephen Rothwell <[email protected]> Acked-by: Stephen Warren <[email protected]> Acked-by: Steven Rostedt <[email protected]> Acked-by: Takashi Iwai <[email protected]> Acked-by: Tejun Heo <[email protected]> Acked-by: Theodore Ts'o <[email protected]> Acked-by: Tony Luck <[email protected]> Acked-by: Will Deacon <[email protected]> Acked-by: Willy Tarreau <[email protected]> Acked-by: Zefan Li <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-02-27arm64: cpuidle: add asm/proc-fns.h inclusionLorenzo Pieralisi1-0/+2
ARM64 CPUidle driver requires the cpu_do_idle function so that it can be used to enter the shallowest idle state, and it is declared in asm/proc-fns.h. The current ARM64 CPUidle driver does not include asm/proc-fns.h explicitly and it has so far relied on implicit inclusion from other header files. Owing to some header dependencies reshuffling this currently triggers build failures when CONFIG_ARM64_64K_PAGES=y: drivers/cpuidle/cpuidle-arm64.c: In function "arm64_enter_idle_state" drivers/cpuidle/cpuidle-arm64.c:42:3: error: implicit declaration of function "cpu_do_idle" [-Werror=implicit-function-declaration] cpu_do_idle(); ^ This patch adds the explicit inclusion of the asm/proc-fns.h header file in the arm64 asm/cpuidle.h header file, so that the build breakage is fixed and the required header inclusion is added to the appropriate arch back-end CPUidle header, already included by the CPUidle arm64 driver, where CPUidle arch related function declarations belong. Reported-by: Laura Abbott <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Acked-by: Will Deacon <[email protected]> Tested-by: Mark Rutland <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
2015-02-27arm64: compat Fix siginfo_t -> compat_siginfo_t conversion on big endianCatalin Marinas1-3/+2
The native (64-bit) sigval_t union contains sival_int (32-bit) and sival_ptr (64-bit). When a compat application invokes a syscall that takes a sigval_t value (as part of a larger structure, e.g. compat_sys_mq_notify, compat_sys_timer_create), the compat_sigval_t union is converted to the native sigval_t with sival_int overlapping with either the least or the most significant half of sival_ptr, depending on endianness. When the corresponding signal is delivered to a compat application, on big endian the current (compat_uptr_t)sival_ptr cast always returns 0 since sival_int corresponds to the top part of sival_ptr. This patch fixes copy_siginfo_to_user32() so that sival_int is copied to the compat_siginfo_t structure. Cc: <[email protected]> Reported-by: Bamvor Jian Zhang <[email protected]> Tested-by: Bamvor Jian Zhang <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
2015-02-27arm64: Increase the swiotlb buffer size 64MBCatalin Marinas3-19/+14
With commit 3690951fc6d4 (arm64: Use swiotlb late initialisation), the swiotlb buffer size is limited to MAX_ORDER_NR_PAGES. However, there are platforms with 32-bit only devices that require bounce buffering via swiotlb. This patch changes the swiotlb initialisation to an early 64MB memblock allocation. In order to get the swiotlb buffer correctly allocated (via memblock_virt_alloc_low_nopanic), this patch also defines ARCH_LOW_ADDRESS_LIMIT to the maximum physical address capable of 32-bit DMA. Reported-by: Kefeng Wang <[email protected]> Tested-by: Kefeng Wang <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
2015-02-27ALSA: oxfw: fix a condition and return code in start_stream()Takashi Sakamoto1-2/+3
The amdtp_stream_wait_callback() doesn't return minus value and the return code is not for error code. This commit fixes with a propper condition and an error code. Fixes: f3699e2c7745 ('ALSA: oxfw: Change the way to start stream') Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Takashi Sakamoto <[email protected]> Cc: <[email protected]> # 3.19+ Signed-off-by: Takashi Iwai <[email protected]>
2015-02-27USB: serial: cp210x: Adding Seletek device id'sMichiel vd Garde1-0/+2
These device ID's are not associated with the cp210x module currently, but should be. This patch allows the devices to operate upon connecting them to the usb bus as intended. Signed-off-by: Michiel van de Garde <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2015-02-27ARC: Fix thread_saved_pc()Vineet Gupta2-26/+2
The old implementation assumed that SP at the time of __switch_to() is right above pt_regs which is almost certainly not the case as there will be some stack build up between entry into kernel and leading up to __switch_to Signed-off-by: Vineet Gupta <[email protected]>
2015-02-27ARC: Fix KSTK_ESP()Vineet Gupta2-7/+8
/proc/<pid>/maps currently don't annotate stack vma with "[stack]" This is because KSTK_ESP ie expected to return usermode SP of tsk while currently it returns the kernel mode SP of a sleeping tsk. While the fix is trivial, we also need to adjust the ARC kernel stack unwinder to not use KSTK_SP and friends any more. Cc: <[email protected]> Reported-and-suggested-by: Alexey Brodkin <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
2015-02-27ARC: perf: Enable generic software eventsVineet Gupta2-2/+12
Signed-off-by: Vineet Gupta <[email protected]>
2015-02-27ARC: Make arc_unwind_core accessible externallyVineet Gupta2-1/+51
The arc unwinder can also be used for perf callchains. Signed-off-by: Mischa Jonker <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
2015-02-27Merge branch 'drm-atmel-hlcdc-fixes' of ↵Dave Airlie3-4/+3
git://github.com/bbrezillon/linux-at91 into drm-fixes minor atmel hclcdc fixes. * 'drm-atmel-hlcdc-fixes' of git://github.com/bbrezillon/linux-at91: drm: atmel-hlcdc: remove clock polarity from crtc driver drm: atmel-hlcdc: remove useless pm_runtime_put_sync in probe drm: atmel-hlcdc: reset layer A2Q and UPDATE bits when disabling it
2015-02-27Merge tag 'drm-intel-fixes-2015-02-26' of ↵Dave Airlie8-25/+73
git://anongit.freedesktop.org/drm-intel into drm-fixes First batch of fixes for v4.0-rc, plenty of cc: stable material. * tag 'drm-intel-fixes-2015-02-26' of git://anongit.freedesktop.org/drm-intel: drm/i915: Fix frontbuffer false positve. drm/i915: Align initial plane backing objects correctly drm/i915: avoid processing spurious/shared interrupts in low-power states drm/i915: Check obj->vma_list under the struct_mutex drm/i915: Fix a use after free, and unbalanced refcounting drm/i915: Dell Chromebook 11 has PWM backlight drm/i915/skl: handle all pixel formats in skylake_update_primary_plane() drm/i915/bdw: PCI IDs ending in 0xb are ULT.
2015-02-27Merge branch 'drm-fixes-4.0' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie14-20/+98
into drm-fixes misc radeon fixes. * 'drm-fixes-4.0' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: only enable DP audio if the monitor supports it drm/radeon: fix atom aux payload size check for writes (v2) drm/radeon: fix 1 RB harvest config setup for TN/RL drm/radeon: enable SRBM timeout interrupt on EG/NI drm/radeon: enable SRBM timeout interrupt on SI drm/radeon: enable SRBM timeout interrupt on CIK v2 drm/radeon: dump full IB if we hit a packet error drm/radeon: disable mclk switching with 120hz+ monitors drm/radeon: use drm_mode_vrefresh() rather than mode->vrefresh drm/radeon: enable native backlight control on old macs
2015-02-26Merge tag 'hwmon-for-linus-v4.0-rc2' of ↵Linus Torvalds1-0/+3
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fix from Guenter Roeck: "Add missing return value check to ads7828 driver" * tag 'hwmon-for-linus-v4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (ads7828) Check return value of devm_regmap_init_i2c
2015-02-26sunrpc: integer underflow in rsc_parse()Dan Carpenter1-0/+2
If we call groups_alloc() with invalid values then it's might lead to memory corruption. For example, with a negative value then we might not allocate enough for sizeof(struct group_info). (We're doing this in the caller for consistency with other callers of groups_alloc(). The other alternative might be to move the check out of all the callers into groups_alloc().) Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Simo Sorce <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2015-02-26nfsd: fix clp->cl_revoked list deletion causing softlock in nfsdAndrew Elble1-1/+1
commit 2d4a532d385f ("nfsd: ensure that clp->cl_revoked list is protected by clp->cl_lock") removed the use of the reaplist to clean out clp->cl_revoked. It failed to change list_entry() to walk clp->cl_revoked.next instead of reaplist.next Fixes: 2d4a532d385f ("nfsd: ensure that clp->cl_revoked list is protected by clp->cl_lock") Cc: [email protected] Reported-by: Eric Meddaugh <[email protected]> Tested-by: Eric Meddaugh <[email protected]> Signed-off-by: Andrew Elble <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2015-02-26mac80211: Send EAPOL frames at lowest rateJouni Malinen1-0/+1
The current minstrel_ht rate control behavior is somewhat optimistic in trying to find optimum TX rate. While this is usually fine for normal Data frames, there are cases where a more conservative set of retry parameters would be beneficial to make the connection more robust. EAPOL frames are critical to the authentication and especially the EAPOL-Key message 4/4 (the last message in the 4-way handshake) is important to get through to the AP. If that message is lost, the only recovery mechanism in many cases is to reassociate with the AP and start from scratch. This can often be avoided by trying to send the frame with more conservative rate and/or with more link layer retries. In most cases, minstrel_ht is currently using the initial EAPOL-Key frames for probing higher rates and this results in only five link layer transmission attempts (one at high(ish) MCS and four at MCS0). While this works with most APs, it looks like there are some deployed APs that may have issues with the EAPOL frames using HT MCS immediately after association. Similarly, there may be issues in cases where the signal strength or radio environment is not good enough to be able to get frames through even at couple of MCS 0 tries. The best approach for this would likely to be to reduce the TX rate for the last rate (3rd rate parameter in the set) to a low basic rate (say, 6 Mbps on 5 GHz and 2 or 5.5 Mbps on 2.4 GHz), but doing that cleanly requires some more effort. For now, we can start with a simple one-liner that forces the minimum rate to be used for EAPOL frames similarly how the TX rate is selected for the IEEE 802.11 Management frames. This does result in a small extra latency added to the cases where the AP would be able to receive the higher rate, but taken into account how small number of EAPOL frames are used, this is likely to be insignificant. A future optimization in the minstrel_ht design can also allow this patch to be reverted to get back to the more optimized initial TX rate. It should also be noted that many drivers that do not use minstrel as the rate control algorithm are already doing similar workarounds by forcing the lowest TX rate to be used for EAPOL frames. Cc: [email protected] Reported-by: Linus Torvalds <[email protected]> Tested-by: Linus Torvalds <[email protected]> Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2015-02-26Merge tag 'sound-4.0-rc2' of ↵Linus Torvalds13-61/+106
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Most of changes in this pull request are about the fixes of crash of FireWire drivers at hot-unplugging. In addition, there are a few HD-audio fixes (removal of wrong static, a pin quirk for an ASUS mobo, a regression fix for runtime PM on Panther Point) and a long-standing (but fairly minor) bug of PCM core" * tag 'sound-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Disable runtime PM for Panther Point again ALSA: hda: controller code - do not export static functions ALSA: pcm: Don't leave PREPARED state after draining ALSA: fireworks/bebob/dice/oxfw: make it possible to shutdown safely ALSA: fireworks/bebob/dice/oxfw: allow stream destructor after releasing runtime ALSA: firewire-lib: remove reference counting ALSA: fireworks/bebob/dice/oxfw: add reference-counting for FireWire unit ALSA: hda - Add pin configs for ASUS mobo with IDT 92HD73XX codec ALSA: firewire-lib: fix an unexpected byte sequence for micro sign
2015-02-26arm64: Fix text patching logic when using fixmapMarc Zyngier1-1/+3
Patch 2f896d586610 ("arm64: use fixmap for text patching") changed the way we patch the kernel text, using a fixmap when the kernel or modules are flagged as read only. Unfortunately, a flaw in the logic makes it fall over when patching modules without CONFIG_DEBUG_SET_MODULE_RONX enabled: [...] [ 32.032636] Call trace: [ 32.032716] [<fffffe00003da0dc>] __copy_to_user+0x2c/0x60 [ 32.032837] [<fffffe0000099f08>] __aarch64_insn_write+0x94/0xf8 [ 32.033027] [<fffffe000009a0a0>] aarch64_insn_patch_text_nosync+0x18/0x58 [ 32.033200] [<fffffe000009c3ec>] ftrace_modify_code+0x58/0x84 [ 32.033363] [<fffffe000009c4e4>] ftrace_make_nop+0x3c/0x58 [ 32.033532] [<fffffe0000164420>] ftrace_process_locs+0x3d0/0x5c8 [ 32.033709] [<fffffe00001661cc>] ftrace_module_init+0x28/0x34 [ 32.033882] [<fffffe0000135148>] load_module+0xbb8/0xfc4 [ 32.034044] [<fffffe0000135714>] SyS_finit_module+0x94/0xc4 [...] This is triggered by the use of virt_to_page() on a module address, which ends to pointing to Nowhereland if you're lucky, or corrupt your precious data if not. This patch fixes the logic by mimicking what is done on arm: - If we're patching a module and CONFIG_DEBUG_SET_MODULE_RONX is set, use vmalloc_to_page(). - If we're patching the kernel and CONFIG_DEBUG_RODATA is set, use virt_to_page(). - Otherwise, use the provided address, as we can write to it directly. Tested on 4.0-rc1 as a KVM guest. Reported-by: Richard W.M. Jones <[email protected]> Reviewed-by: Kees Cook <[email protected]> Acked-by: Mark Rutland <[email protected]> Acked-by: Laura Abbott <[email protected]> Tested-by: Richard W.M. Jones <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
2015-02-26Merge branch 'for-linus' of ↵Linus Torvalds1-1/+8
git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fix from Chris Mason: "I'm still testing more fixes, but I wanted to get out the fix for the btrfs raid5/6 memory corruption I mentioned in my merge window pull" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix allocation size calculations in alloc_btrfs_bio
2015-02-26arm64: crypto: increase AES interleave to 4xArd Biesheuvel1-1/+1
This patch increases the interleave factor for parallel AES modes to 4x. This improves performance on Cortex-A57 by ~35%. This is due to the 3-cycle latency of AES instructions on the A57's relatively deep pipeline (compared to Cortex-A53 where the AES instruction latency is only 2 cycles). At the same time, disable inline expansion of the core AES functions, as the performance benefit of this feature is negligible. Measured on AMD Seattle (using tcrypt.ko mode=500 sec=1): Baseline (2x interleave, inline expansion) ------------------------------------------ testing speed of async cbc(aes) (cbc-aes-ce) decryption test 4 (128 bit key, 8192 byte blocks): 95545 operations in 1 seconds test 14 (256 bit key, 8192 byte blocks): 68496 operations in 1 seconds This patch (4x interleave, no inline expansion) ----------------------------------------------- testing speed of async cbc(aes) (cbc-aes-ce) decryption test 4 (128 bit key, 8192 byte blocks): 124735 operations in 1 seconds test 14 (256 bit key, 8192 byte blocks): 92328 operations in 1 seconds Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
2015-02-26arm64: enable PTE type bit in the mask for pte_modifyFeng Kan1-1/+1
Caught during Trinity testing. The pte_modify does not allow modification for PTE type bit. This cause the test to hang the system. It is found that the PTE can't transit from an inaccessible page (b00) to a valid page (b11) because the mask does not allow it. This happens when a big block of mmaped memory is set the PROT_NONE, then the a small piece is broken off and set to PROT_WRITE | PROT_READ cause a huge page split. Signed-off-by: Feng Kan <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
2015-02-26arm64: mm: remove unused functions and variable protoypesYingjoe Chen1-5/+0
The functions __cpu_flush_user_tlb_range and __cpu_flush_kern_tlb_range were removed in commit fa48e6f780 'arm64: mm: Optimise tlb flush logic where we have >4K granule'. Global variable cpu_tlb was never used in arm64. Remove them. Signed-off-by: Yingjoe Chen <[email protected]> Acked-by: Will Deacon <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
2015-02-26arm64: psci: move psci firmware calls out of lineWill Deacon3-36/+34
An arm64 allmodconfig fails to build with GCC 5 due to __asmeq assertions in the PSCI firmware calling code firing due to mcount preambles breaking our assumptions about register allocation of function arguments: /tmp/ccDqJsJ6.s: Assembler messages: /tmp/ccDqJsJ6.s:60: Error: .err encountered /tmp/ccDqJsJ6.s:61: Error: .err encountered /tmp/ccDqJsJ6.s:62: Error: .err encountered /tmp/ccDqJsJ6.s:99: Error: .err encountered /tmp/ccDqJsJ6.s:100: Error: .err encountered /tmp/ccDqJsJ6.s:101: Error: .err encountered This patch fixes the issue by moving the PSCI calls out-of-line into their own assembly files, which are safe from the compiler's meddling fingers. Reported-by: Andy Whitcroft <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
2015-02-26arm64: vdso: minor ABI fix for clock_getresNathan Lynch1-2/+1
The vdso implementation of clock_getres currently returns 0 (success) whenever a null timespec is provided by the caller, regardless of the clock id supplied. This behavior is incorrect. It should fall back to syscall when an unrecognized clock id is passed, even when the timespec argument is null. This ensures that clock_getres always returns an error for invalid clock ids. Signed-off-by: Nathan Lynch <[email protected]> Acked-by: Will Deacon <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
2015-02-26USB: pl2303: disable break on shutdownJohan Hovold1-5/+13
Currently an enabled break state is not disabled on final close nor on re-open and has to be disabled manually. Fix this by disabling break on port shutdown. Reported-by: Jari Ruusu <[email protected]> Tested-by: Jari Ruusu <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2015-02-26USB: mxuport: fix null deref when used as a consoleJohan Hovold1-1/+2
Fix null-pointer dereference at probe when the device is used as a console, in which case the tty argument to open will be NULL. Fixes: ee467a1f2066 ("USB: serial: add Moxa UPORT 12XX/14XX/16XX driver") Cc: stable <[email protected]> # v3.14 Signed-off-by: Johan Hovold <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]>
2015-02-26USB: serial: clean up bus probe error handlingJohan Hovold1-11/+14
Clean up bus probe error handling by separating success and error paths. Signed-off-by: Johan Hovold <[email protected]>
2015-02-26USB: serial: fix port attribute-creation raceJohan Hovold2-19/+16
Fix attribute-creation race with userspace by using the port device groups field to create the port attributes. Also use %u when printing the port number, which is unsigned, even though we do not currently support more than 128 ports per device. Reported-by: Takashi Iwai <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]>
2015-02-26USB: serial: fix tty-device error handling at probeJohan Hovold1-1/+10
Add missing error handling when registering the tty device at port probe. This avoids trying to remove an uninitialised character device when the port device is removed. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Takashi Iwai <[email protected]> Cc: stable <[email protected]> # v2.6.12 Signed-off-by: Johan Hovold <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]>
2015-02-26USB: serial: fix potential use-after-free after failed probeJohan Hovold1-1/+1
Fix return value in probe error path, which could end up returning success (0) on errors. This could in turn lead to use-after-free or double free (e.g. in port_remove) when the port device is removed. Fixes: c706ebdfc895 ("USB: usb-serial: call port_probe and port_remove at the right times") Cc: stable <[email protected]> # v2.6.31 Signed-off-by: Johan Hovold <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]>
2015-02-26USB: console: add dummy __module_getJohan Hovold1-0/+2
Add call to __module_get when initialising the fake tty in usb_console_setup to match the module_put in release_one_tty. Note that the tty-driver (i.e. usb-serial core) must be compiled-in to enable the usb console so the __module_get is essentially a noop as driver->owner will be null. Reported-by: Ben Hutchings <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2015-02-26USB: ftdi_sio: add PIDs for Actisense USB devicesMark Glover2-0/+37
These product identifiers (PID) all deal with marine NMEA format data used on motor boats and yachts. We supply the programmed devices to Chetco, for use inside their equipment. The PIDs are a direct copy of our Windows device drivers (FTDI drivers with altered PIDs). Signed-off-by: Mark Glover <[email protected]> Cc: stable <[email protected]> [johan: edit commit message slightly ] Signed-off-by: Johan Hovold <[email protected]>