Linux 4.14.139
Greg KH
maintainerI'm announcing the release of the 4.14.139 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/mach-davinci/sleep.S | 1 arch/powerpc/kvm/powerpc.c | 5 arch/x86/include/asm/kvm_host.h | 1 arch/x86/kvm/svm.c | 6 + arch/x86/kvm/vmx.c | 6 + arch/x86/kvm/x86.c | 16 +++ arch/x86/mm/fault.c | 15 +- drivers/acpi/arm64/iort.c | 4 drivers/block/drbd/drbd_receiver.c | 14 ++ drivers/block/loop.c | 2 drivers/cpufreq/pasemi-cpufreq.c | 23 +--- drivers/crypto/ccp/ccp-crypto-aes-galois.c | 14 ++ drivers/crypto/ccp/ccp-ops.c | 139 +++++++++++++++++++-------- drivers/firmware/Kconfig | 5 drivers/firmware/iscsi_ibft.c | 4 drivers/gpu/drm/drm_framebuffer.c | 2 drivers/gpu/drm/i915/intel_dsi_pll.c | 4 drivers/hid/hid-sony.c | 15 ++ drivers/hwmon/nct6775.c | 3 drivers/hwmon/nct7802.c | 6 - drivers/iio/adc/max9611.c | 2 drivers/input/mouse/synaptics.c | 1 drivers/misc/Makefile | 3 drivers/mmc/host/cavium.c | 4 drivers/net/can/rcar/rcar_canfd.c | 9 - drivers/net/can/usb/peak_usb/pcan_usb_core.c | 8 - drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 2 drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 2 drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 29 ++++- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 2 drivers/net/wireless/marvell/mwifiex/main.h | 1 drivers/net/wireless/marvell/mwifiex/scan.c | 3 drivers/s390/cio/qdio_main.c | 12 +- drivers/s390/cio/vfio_ccw_cp.c | 4 drivers/scsi/device_handler/scsi_dh_alua.c | 7 + drivers/scsi/ibmvscsi/ibmvfc.c | 2 drivers/scsi/megaraid/megaraid_sas_base.c | 3 drivers/tty/tty_ldsem.c | 5 drivers/usb/core/devio.c | 2 drivers/usb/host/xhci-rcar.c | 9 + drivers/usb/misc/iowarrior.c | 7 - drivers/usb/misc/yurex.c | 2 fs/cifs/smb2pdu.c | 7 + fs/nfs/nfs4proc.c | 12 +- include/linux/ccp.h | 2 include/linux/kvm_host.h | 1 include/net/tcp.h | 3 include/sound/compress_driver.h | 5 kernel/events/core.c | 2 lib/test_firmware.c | 5 mm/vmalloc.c | 9 + net/ipv4/netfilter/ipt_rpfilter.c | 1 net/ipv6/netfilter/ip6t_rpfilter.c | 8 + net/mac80211/driver-ops.c | 13 +- net/mac80211/mlme.c | 10 + net/netfilter/nfnetlink.c | 2 net/netfilter/nft_hash.c | 2 scripts/sphinx-pre-install | 2 sound/core/compress_offload.c | 60 +++++++++-- sound/firewire/packets-buffer.c | 2 sound/pci/hda/hda_controller.c | 13 +- sound/pci/hda/hda_controller.h | 2 sound/pci/hda/hda_intel.c | 63 ++++++++++++ sound/sound_core.c | 3 tools/perf/arch/s390/util/machine.c | 31 +++++- tools/perf/builtin-probe.c | 10 + tools/perf/util/header.c | 2 tools/perf/util/machine.c | 3 tools/perf/util/machine.h | 2 tools/perf/util/symbol.c | 7 + tools/perf/util/symbol.h | 1 tools/perf/util/thread.c | 12 ++ virt/kvm/kvm_main.c | 25 ++++ 74 files changed, 557 insertions(+), 169 deletions(-)
Adrian Hunter (1):
perf db-export: Fix thread__exec_comm()
Arnaldo Carvalho de Melo (1):
perf probe: Avoid calling freeing routine multiple times for same pointer
Arnd Bergmann (2):
drbd: dynamically allocate shash descriptor
ARM: davinci: fix sleep.S build error on ARMv4
Ben Hutchings (1):
tcp: Clear sk_send_head after purging the write queue
Björn Gerhart (1):
hwmon: (nct6775) Fix register address and added missed tolerance for nct6106
Brian Norris (3):
mac80211: don't warn about CW params when not using them
mac80211: don't WARN on short WMM parameters from AP
mwifiex: fix 802.11n/WPA detection
Charles Keepax (4):
ALSA: compress: Fix regression on compressed capture streams
ALSA: compress: Prevent bypasses of set_params
ALSA: compress: Don't allow paritial drain operations on capture streams
ALSA: compress: Be more restrictive about when a drain is allowed
Dmitry Torokhov (1):
Input: synaptics - enable RMI mode for HP Spectre X360
Emmanuel Grumbach (2):
iwlwifi: don't unmap as page memory that was mapped as single
iwlwifi: mvm: fix an out-of-bound access
Farhan Ali (1):
vfio-ccw: Set pa_nr to 0 if memory allocation fails for pa_iova_pfn
Florian Westphal (1):
netfilter: nfnetlink: avoid deadlock due to synchronous request_module
Gary R Hook (4):
crypto: ccp - Fix oops by properly managing allocated structures
crypto: ccp - Ignore tag length when decrypting GCM ciphertext
crypto: ccp - Validate buffer lengths for copy operations
crypto: ccp - Add support for valid authsize values less than 16
Gavin Li (1):
usb: usbfs: fix double-free of usb memory upon submiturb error
Greg Kroah-Hartman (1):
Linux 4.14.139
Guenter Roeck (1):
hwmon: (nct7802) Fix wrong detection of in4 presence
Hannes Reinecke (1):
scsi: scsi_dh_alua: always use a 2 second delay before retrying RTPG
Jiri Olsa (1):
perf tools: Fix proper buffer size for feature processing
Joe Perches (1):
iio: adc: max9611: Fix misuse of GENMASK macro
Joerg Roedel (3):
x86/mm: Check for pfn instead of page in vmalloc_sync_one() x86/mm: Sync also unmappings in vmalloc_sync_all() mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()
Julian Wiedmann (1):
s390/qdio: add sanity checks to the fast-requeue path
Junxiao Bi (1):
scsi: megaraid_sas: fix panic on loading firmware crashdump
Kevin Hao (2):
mmc: cavium: Set the correct dma max segment size for mmc_host
mmc: cavium: Add the missing dma unmap when the dma has finished.
Laura Garcia Liebana (1):
netfilter: nft_hash: fix symhash with modulus one
Leonard Crestez (1):
perf/core: Fix creating kernel counters for PMUs that override event->cpu
Lorenzo Pieralisi (1):
ACPI/IORT: Fix off-by-one check in iort_dev_find_its_id()
Luca Coelho (2):
iwlwifi: mvm: don't send GEO_TX_POWER_LIMIT on version < 41
iwlwifi: mvm: fix version check for GEO_TX_POWER_LIMIT support
Mauro Carvalho Chehab (1):
scripts/sphinx-pre-install: fix script for RHEL/CentOS
Miaohe Lin (1):
netfilter: Fix rpfilter dropping vrf packets by mistake
Mikulas Patocka (1):
loop: set PF_MEMALLOC_NOIO for the worker thread
Nick Desaulniers (1):
lkdtm: support llvm-objcopy
Nikita Yushchenko (1):
can: rcar_canfd: fix possible IRQ storm on high load
Oliver Neukum (1):
usb: iowarrior: fix deadlock on disconnect
Pavel Shilovsky (1):
SMB3: Fix deadlock in validate negotiate hits reconnect
Peter Zijlstra (1):
tty/ldsem, locking/rwsem: Add missing ACQUIRE to read_failed sleep loop
Qian Cai (1):
drm: silence variable 'conn' set but not used
Roderick Colenbrander (1):
HID: sony: Fix race condition between rumble and device remove.
Stanislav Lisovskiy (1):
drm/i915: Fix wrong escape clock divisor init for GLK
Stephane Grosjean (1):
can: peak_usb: fix potential double kfree_skb()
Steve French (1):
smb3: send CAP_DFS capability during session setup
Suzuki K Poulose (1):
usb: yurex: Fix use-after-free in yurex_delete
Takashi Iwai (2):
ALSA: hda - Don't override global PCM hw info flag
ALSA: hda - Workaround for crackled sound on AMD controller (1022:1457)
Thomas Richter (2):
perf annotate: Fix s390 gap between kernel end and module start perf record: Fix module size on s390
Thomas Tai (1):
iscsi_ibft: make ISCSI_IBFT dependson ACPI instead of ISCSI_IBFT_FIND
Tomas Bortoli (2):
can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices
can: peak_usb: pcan_usb_fd: Fix info-leaks to USB devices
Trond Myklebust (2):
NFSv4: Only pass the delegation to setattr if we're sending a truncate
NFSv4: Fix an Oops in nfs4_do_setattr
Tyrel Datwyler (1):
scsi: ibmvfc: fix WARN_ON during event pool release
Wanpeng Li (1):
KVM: Fix leak vCPU's VMCS value into other pCPU
Wen Yang (1):
cpufreq/pasemi: fix use-after-free in pas_cpufreq_cpu_init()
Wenwen Wang (3):
sound: fix a memory leak bug
test_firmware: fix a memory leak bug
ALSA: firewire: fix a memory leak bug
Yoshihiro Shimoda (1):
usb: host: xhci-rcar: Fix timeout in xhci_suspend()
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 138 +SUBLEVEL = 139 EXTRAVERSION = NAME = Petit Gorille
arch/arm/mach-davinci/sleep.S +1 -0
@@ -37,6 +37,7 @@ #define DEEPSLEEP_SLEEPENABLE_BIT BIT(31) .text + .arch armv5te /* * Move DaVinci into deep sleep state *
arch/powerpc/kvm/powerpc.c +5 -0
@@ -58,6 +58,11 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *v)return !!(v->arch.pending_exceptions) ||kvm_request_pending (v); } +bool kvm_arch_dy_runnable (struct kvm_vcpu *vcpu) +{ +return kvm_arch_vcpu_runnable (vcpu); +} +bool kvm_arch_vcpu_in_kernel (struct kvm_vcpu *vcpu) {return false;
arch/x86/include/asm/kvm_host.h +1 -0
@@ -1077,6 +1077,7 @@ struct kvm_x86_ops {int (*update_pi_irte)(struct kvm *kvm,unsigned int host_irq,uint32_t guest_irq,bool set);void (*apicv_post_state_restore)(struct kvm_vcpu *vcpu); +bool (*dy_apicv_has_pending_interrupt)(struct kvm_vcpu *vcpu);int (*set_hv_timer)(struct kvm_vcpu *vcpu,u64 guest_deadline_tsc);void (*cancel_hv_timer)(struct kvm_vcpu *vcpu);
arch/x86/kvm/svm.c +6 -0
@@ -4637,6 +4637,11 @@ static void svm_deliver_avic_intr(struct kvm_vcpu *vcpu, int vec)kvm_vcpu_wake_up (vcpu); } +static bool svm_dy_apicv_has_pending_interrupt (struct kvm_vcpu *vcpu) +{ +return false; +} +static void svm_ir_list_del (struct vcpu_svm *svm,struct amd_iommu_pi_data *pi) {unsigned long flags;
@@ -5746,6 +5751,7 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = { .pmu_ops = &amd_pmu_ops, .deliver_posted_interrupt = svm_deliver_avic_intr, + .dy_apicv_has_pending_interrupt = svm_dy_apicv_has_pending_interrupt, .update_pi_irte = svm_update_pi_irte, .setup_mce = svm_setup_mce, };
arch/x86/kvm/vmx.c +6 -0
@@ -9431,6 +9431,11 @@ static int vmx_sync_pir_to_irr(struct kvm_vcpu *vcpu)return max_irr; } +static bool vmx_dy_apicv_has_pending_interrupt (struct kvm_vcpu *vcpu) +{ +return pi_test_on (vcpu_to_pi_desc (vcpu)); +} +static void vmx_load_eoi_exitmap (struct kvm_vcpu *vcpu,u64 *eoi_exit_bitmap) {if (!kvm_vcpu_apicv_active (vcpu))
@@ -12756,6 +12761,7 @@ static struct kvm_x86_ops vmx_x86_ops __ro_after_init = { .hwapic_isr_update = vmx_hwapic_isr_update, .sync_pir_to_irr = vmx_sync_pir_to_irr, .deliver_posted_interrupt = vmx_deliver_posted_interrupt, + .dy_apicv_has_pending_interrupt = vmx_dy_apicv_has_pending_interrupt, .set_tss_addr = vmx_set_tss_addr, .get_tdp_level = get_ept_level,
arch/x86/kvm/x86.c +16 -0
@@ -8711,6 +8711,22 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)return kvm_vcpu_running (vcpu) ||kvm_vcpu_has_events (vcpu); } +bool kvm_arch_dy_runnable (struct kvm_vcpu *vcpu) +{ +if (READ_ONCE (vcpu->arch.pv.pv_unhalted)) +return true; + +if (kvm_test_request (KVM_REQ_NMI , vcpu) || +kvm_test_request (KVM_REQ_SMI , vcpu) || +kvm_test_request (KVM_REQ_EVENT , vcpu)) +return true; + +if (vcpu->arch.apicv_active && kvm_x86_ops->dy_apicv_has_pending_interrupt (vcpu)) +return true; + +return false; +} +bool kvm_arch_vcpu_in_kernel (struct kvm_vcpu *vcpu) {return vcpu->arch.preempted_in_kernel;
arch/x86/mm/fault.c +6 -9
@@ -260,13 +260,14 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address) pmd =pmd_offset (pud, address); pmd_k =pmd_offset (pud_k, address); -if (!pmd_present (*pmd_k)) -return NULL ; -if (!pmd_present (*pmd)) +if (pmd_present (*pmd) !=pmd_present (*pmd_k))set_pmd (pmd, *pmd_k); + +if (!pmd_present (*pmd_k)) +return NULL ;else -BUG_ON (pmd_page (*pmd) !=pmd_page (*pmd_k)); +BUG_ON (pmd_pfn (*pmd) !=pmd_pfn (*pmd_k));return pmd_k; }
@@ -286,17 +287,13 @@ void vmalloc_sync_all(void)spin_lock (&pgd_lock);list_for_each_entry (page, &pgd_list, lru) {spinlock_t *pgt_lock; -pmd_t *ret;/* the pgt_lock only for Xen */ pgt_lock = &pgd_page_get_mm (page)->page_table_lock;spin_lock (pgt_lock); - ret =vmalloc_sync_one (page_address (page), address); +vmalloc_sync_one (page_address (page), address);spin_unlock (pgt_lock); - -if (!ret) -break ; }spin_unlock (&pgd_lock); }
drivers/acpi/arm64/iort.c +2 -2
@@ -506,8 +506,8 @@ static int iort_dev_find_its_id(struct device *dev, u32 req_id,/* Move to ITS specific data */ its = (struct acpi_iort_its_group *)node->node_data; -if (idx > its->its_count) { -dev_err (dev,"requested ITS ID index [%d] is greater than available [%d]\n" , +if (idx >= its->its_count) { +dev_err (dev,"requested ITS ID index [%d] overruns ITS entries [%d]\n" , idx, its->its_count);return -ENXIO ; }
drivers/block/drbd/drbd_receiver.c +12 -2
@@ -5237,7 +5237,7 @@ static int drbd_do_auth(struct drbd_connection *connection)unsigned int key_len;char secret[SHARED_SECRET_MAX ];/* 64 byte */ unsigned int resp_size; -SHASH_DESC_ON_STACK (desc, connection->cram_hmac_tfm); +struct shash_desc *desc;struct packet_info pi;struct net_conf *nc;int err, rv;
@@ -5250,6 +5250,13 @@ static int drbd_do_auth(struct drbd_connection *connection)memcpy (secret, nc->shared_secret, key_len);rcu_read_unlock (); + desc =kmalloc (sizeof (struct shash_desc ) + +crypto_shash_descsize (connection->cram_hmac_tfm), +GFP_KERNEL ); +if (!desc) { + rv =-1 ; + goto fail; + } desc->tfm = connection->cram_hmac_tfm; desc->flags =0 ;
@@ -5392,7 +5399,10 @@ static int drbd_do_auth(struct drbd_connection *connection)kfree (peers_ch);kfree (response);kfree (right_response); -shash_desc_zero (desc); +if (desc) { +shash_desc_zero (desc); +kfree (desc); + }return rv; }
drivers/block/loop.c +1 -1
@@ -857,7 +857,7 @@ static void loop_unprepare_queue(struct loop_device *lo)static int loop_kthread_worker_fn (void *worker_ptr) { - current->flags |=PF_LESS_THROTTLE ; + current->flags |=PF_LESS_THROTTLE |PF_MEMALLOC_NOIO ;return kthread_worker_fn (worker_ptr); }
drivers/cpufreq/pasemi-cpufreq.c +9 -14
@@ -145,10 +145,18 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy)int err = -ENODEV ; cpu =of_get_cpu_node (policy->cpu,NULL ); +if (!cpu) + goto out; + max_freqp =of_get_property (cpu,"clock-frequency" ,NULL );of_node_put (cpu); -if (!cpu) +if (!max_freqp) { + err = -EINVAL ; goto out; + } + +/* we need the freq in kHz */ + max_freq = *max_freqp /1000 ; dn =of_find_compatible_node (NULL ,NULL ,"1682m-sdc" );if (!dn)
@@ -185,16 +193,6 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy) }pr_debug ("init cpufreq on CPU %d\n" , policy->cpu); - - max_freqp =of_get_property (cpu,"clock-frequency" ,NULL ); -if (!max_freqp) { - err = -EINVAL ; - goto out_unmap_sdcpwr; - } - -/* we need the freq in kHz */ - max_freq = *max_freqp /1000 ; -pr_debug ("max clock-frequency is at %u kHz\n" , max_freq);pr_debug ("initializing frequency table\n" );
@@ -212,9 +210,6 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy)return cpufreq_generic_init (policy, pas_freqs,get_gizmo_latency ()); -out_unmap_sdcpwr: -iounmap (sdcpwr_mapbase); - out_unmap_sdcasr:iounmap (sdcasr_mapbase); out:
drivers/crypto/ccp/ccp-crypto-aes-galois.c +14 -0
@@ -63,6 +63,19 @@ static int ccp_aes_gcm_setkey(struct crypto_aead *tfm, const u8 *key,static int ccp_aes_gcm_setauthsize (struct crypto_aead *tfm,unsigned int authsize) { +switch (authsize) { +case 16 : +case 15 : +case 14 : +case 13 : +case 12 : +case 8 : +case 4 : +break ; +default : +return -EINVAL ; + } +return 0 ; }
@@ -109,6 +122,7 @@ static int ccp_aes_gcm_crypt(struct aead_request *req, bool encrypt)memset (&rctx->cmd,0 ,sizeof (rctx->cmd));INIT_LIST_HEAD (&rctx->cmd.entry); rctx->cmd.engine =CCP_ENGINE_AES ; + rctx->cmd.u.aes.authsize =crypto_aead_authsize (tfm); rctx->cmd.u.aes.type = ctx->u.aes.type; rctx->cmd.u.aes.mode = ctx->u.aes.mode; rctx->cmd.u.aes.action = encrypt;
drivers/crypto/ccp/ccp-ops.c +101 -38
293 lines not on this page · raw message
drivers/firmware/Kconfig +3 -2
@@ -156,7 +156,7 @@ config DMI_SCAN_MACHINE_NON_EFI_FALLBACK config ISCSI_IBFT_FIND bool "iSCSI Boot Firmware Table Attributes" - depends on X86 && ACPI + depends on X86 && ISCSI_IBFT default n help This option enables the kernel to find the region of memory
@@ -167,7 +167,8 @@ config ISCSI_IBFT_FIND config ISCSI_IBFT tristate "iSCSI Boot Firmware Table Attributes module" select ISCSI_BOOT_SYSFS - depends on ISCSI_IBFT_FIND && SCSI && SCSI_LOWLEVEL + select ISCSI_IBFT_FIND if X86 + depends on ACPI && SCSI && SCSI_LOWLEVEL default n help This option enables support for detection and exposing of iSCSI
drivers/firmware/iscsi_ibft.c +4 -0
@@ -93,6 +93,10 @@ MODULE_DESCRIPTION("sysfs interface to BIOS iBFT information");MODULE_LICENSE ("GPL" );MODULE_VERSION (IBFT_ISCSI_VERSION ); +#ifndef CONFIG_ISCSI_IBFT_FIND +struct acpi_table_ibft *ibft_addr; +#endif +struct ibft_hdr {u8 id;u8 version;
drivers/gpu/drm/drm_framebuffer.c +1 -1
@@ -773,7 +773,7 @@ static int atomic_remove_fb(struct drm_framebuffer *fb)struct drm_device *dev = fb->dev;struct drm_atomic_state *state;struct drm_plane *plane; -struct drm_connector *conn; +struct drm_connector *conn__maybe_unused ;struct drm_connector_state *conn_state;int i, ret =0 ;unsigned plane_mask;
drivers/gpu/drm/i915/intel_dsi_pll.c +2 -2
@@ -422,8 +422,8 @@ static void glk_dsi_program_esc_clock(struct drm_device *dev,else txesc2_div =10 ; -I915_WRITE (MIPIO_TXESC_CLK_DIV1 , txesc1_div &GLK_TX_ESC_CLK_DIV1_MASK ); -I915_WRITE (MIPIO_TXESC_CLK_DIV2 , txesc2_div &GLK_TX_ESC_CLK_DIV2_MASK ); +I915_WRITE (MIPIO_TXESC_CLK_DIV1 , (1 << (txesc1_div -1 )) &GLK_TX_ESC_CLK_DIV1_MASK ); +I915_WRITE (MIPIO_TXESC_CLK_DIV2 , (1 << (txesc2_div -1 )) &GLK_TX_ESC_CLK_DIV2_MASK ); }/* Program BXT Mipi clocks and dividers */
drivers/hid/hid-sony.c +12 -3
@@ -578,10 +578,14 @@ static void sony_set_leds(struct sony_sc *sc);static inline void sony_schedule_work (struct sony_sc *sc,enum sony_worker which) { +unsigned long flags; +switch (which) {case SONY_WORKER_STATE : -if (!sc->defer_initialization) +spin_lock_irqsave (&sc->lock, flags); +if (!sc->defer_initialization && sc->state_worker_initialized)schedule_work (&sc->state_worker); +spin_unlock_irqrestore (&sc->lock, flags);break ;case SONY_WORKER_HOTPLUG :if (sc->hotplug_worker_initialized)
@@ -2488,13 +2492,18 @@ static inline void sony_init_output_report(struct sony_sc *sc,static inline void sony_cancel_work_sync (struct sony_sc *sc) { +unsigned long flags; +if (sc->hotplug_worker_initialized)cancel_work_sync (&sc->hotplug_worker); -if (sc->state_worker_initialized) +if (sc->state_worker_initialized) { +spin_lock_irqsave (&sc->lock, flags); + sc->state_worker_initialized =0 ; +spin_unlock_irqrestore (&sc->lock, flags);cancel_work_sync (&sc->state_worker); + } } -static int sony_input_configured (struct hid_device *hdev,struct hid_input *hidinput) {
drivers/hwmon/nct6775.c +2 -1
@@ -769,7 +769,7 @@ static const u16 NCT6106_REG_TARGET[] = { 0x111, 0x121, 0x131 };static const u16 NCT6106_REG_WEIGHT_TEMP_SEL [] = {0x168 ,0x178 ,0x188 };static const u16 NCT6106_REG_WEIGHT_TEMP_STEP [] = {0x169 ,0x179 ,0x189 };static const u16 NCT6106_REG_WEIGHT_TEMP_STEP_TOL [] = {0x16a ,0x17a ,0x18a }; -static const u16 NCT6106_REG_WEIGHT_DUTY_STEP [] = {0x16b ,0x17b ,0x17c }; +static const u16 NCT6106_REG_WEIGHT_DUTY_STEP [] = {0x16b ,0x17b ,0x18b };static const u16 NCT6106_REG_WEIGHT_TEMP_BASE [] = {0x16c ,0x17c ,0x18c };static const u16 NCT6106_REG_WEIGHT_DUTY_BASE [] = {0x16d ,0x17d ,0x18d };
@@ -3592,6 +3592,7 @@ static int nct6775_probe(struct platform_device *pdev) data->REG_FAN_TIME[0 ] =NCT6106_REG_FAN_STOP_TIME ; data->REG_FAN_TIME[1 ] =NCT6106_REG_FAN_STEP_UP_TIME ; data->REG_FAN_TIME[2 ] =NCT6106_REG_FAN_STEP_DOWN_TIME ; + data->REG_TOLERANCE_H =NCT6106_REG_TOLERANCE_H ; data->REG_PWM[0 ] =NCT6106_REG_PWM ; data->REG_PWM[1 ] =NCT6106_REG_FAN_START_OUTPUT ; data->REG_PWM[2 ] =NCT6106_REG_FAN_STOP_OUTPUT ;
drivers/hwmon/nct7802.c +3 -3
@@ -768,7 +768,7 @@ static struct attribute *nct7802_in_attrs[] = { &sensor_dev_attr_in3_alarm.dev_attr.attr, &sensor_dev_attr_in3_beep.dev_attr.attr, - &sensor_dev_attr_in4_input.dev_attr.attr,/* 17 */ + &sensor_dev_attr_in4_input.dev_attr.attr,/* 16 */ &sensor_dev_attr_in4_min.dev_attr.attr, &sensor_dev_attr_in4_max.dev_attr.attr, &sensor_dev_attr_in4_alarm.dev_attr.attr,
@@ -794,9 +794,9 @@ static umode_t nct7802_in_is_visible(struct kobject *kobj,if (index >=6 && index <11 && (reg &0x03 ) !=0x03 )/* VSEN1 */ return 0 ; -if (index >=11 && index <17 && (reg &0x0c ) !=0x0c )/* VSEN2 */ +if (index >=11 && index <16 && (reg &0x0c ) !=0x0c )/* VSEN2 */ return 0 ; -if (index >=17 && (reg &0x30 ) !=0x30 )/* VSEN3 */ +if (index >=16 && (reg &0x30 ) !=0x30 )/* VSEN3 */ return 0 ;return attr->mode;
drivers/iio/adc/max9611.c +1 -1
@@ -86,7 +86,7 @@#define MAX9611_TEMP_MAX_POS 0x7f80#define MAX9611_TEMP_MAX_NEG 0xff80#define MAX9611_TEMP_MIN_NEG 0xd980 -#define MAX9611_TEMP_MASK GENMASK(7, 15) +#define MAX9611_TEMP_MASK GENMASK(15, 7)#define MAX9611_TEMP_SHIFT 0x07#define MAX9611_TEMP_RAW (_r) ((_r) >> MAX9611_TEMP_SHIFT)#define MAX9611_TEMP_SCALE_NUM 1000000
drivers/input/mouse/synaptics.c +1 -0
@@ -185,6 +185,7 @@ static const char * const smbus_pnp_ids[] = {"LEN2055" ,/* E580 */ "SYN3052" ,/* HP EliteBook 840 G4 */ "SYN3221" ,/* HP 15-ay000 */ +"SYN323d" ,/* HP Spectre X360 13-w013dx */ NULL };
drivers/misc/Makefile +1 -2
@@ -69,8 +69,7 @@ KCOV_INSTRUMENT_lkdtm_rodata.o := n OBJCOPYFLAGS := OBJCOPYFLAGS_lkdtm_rodata_objcopy.o := \ - --set-section-flags .text=alloc,readonly \ - --rename-section .text=.rodata + --rename-section .text=.rodata,alloc,readonly,load targets += lkdtm_rodata.o lkdtm_rodata_objcopy.o $(obj)/lkdtm_rodata_objcopy.o: $(obj)/lkdtm_rodata.o FORCE $(call if_changed,objcopy)
drivers/mmc/host/cavium.c +3 -1
@@ -374,6 +374,7 @@ static int finish_dma_single(struct cvm_mmc_host *host, struct mmc_data *data) { data->bytes_xfered = data->blocks * data->blksz; data->error =0 ; +dma_unmap_sg (host->dev, data->sg, data->sg_len,get_dma_dir (data));return 1 ; }
@@ -1046,7 +1047,8 @@ int cvm_mmc_of_slot_probe(struct device *dev, struct cvm_mmc_host *host) mmc->max_segs =1 ;/* DMA size field can address up to 8 MB */ - mmc->max_seg_size =8 *1024 *1024 ; + mmc->max_seg_size = min_t(unsigned int, 8 * 1024 * 1024, +dma_get_max_seg_size (host->dev)); mmc->max_req_size = mmc->max_seg_size;/* External DMA is in 512 byte blocks */ mmc->max_blk_size =512 ;
drivers/net/can/rcar/rcar_canfd.c +5 -4
@@ -1512,10 +1512,11 @@ static int rcar_canfd_rx_poll(struct napi_struct *napi, int quota)/* All packets processed */ if (num_pkts < quota) { -napi_complete_done (napi, num_pkts); -/* Enable Rx FIFO interrupts */ -rcar_canfd_set_bit (priv->base,RCANFD_RFCC (ridx), -RCANFD_RFCC_RFIE ); +if (napi_complete_done (napi, num_pkts)) { +/* Enable Rx FIFO interrupts */ +rcar_canfd_set_bit (priv->base,RCANFD_RFCC (ridx), +RCANFD_RFCC_RFIE ); + } }return num_pkts; }
drivers/net/can/usb/peak_usb/pcan_usb_core.c +4 -4
@@ -594,16 +594,16 @@ static int peak_usb_ndo_stop(struct net_device *netdev) dev->state &= ~PCAN_USB_STATE_STARTED ;netif_stop_queue (netdev); +close_candev (netdev); + + dev->can.state =CAN_STATE_STOPPED ; +/* unlink all pending urbs and free used memory */ peak_usb_unlink_all_urbs (dev);if (dev->adapter->dev_stop) dev->adapter->dev_stop (dev); -close_candev (netdev); - - dev->can.state =CAN_STATE_STOPPED ; -/* can set bus off now */ if (dev->adapter->dev_set_bus) {int err = dev->adapter->dev_set_bus (dev,0 );
drivers/net/can/usb/peak_usb/pcan_usb_fd.c +1 -1
@@ -852,7 +852,7 @@ static int pcan_usb_fd_init(struct peak_usb_device *dev) goto err_out;/* allocate command buffer once for all for the interface */ - pdev->cmd_buffer_addr =kmalloc (PCAN_UFD_CMD_BUFFER_SIZE , + pdev->cmd_buffer_addr =kzalloc (PCAN_UFD_CMD_BUFFER_SIZE ,GFP_KERNEL );if (!pdev->cmd_buffer_addr) goto err_out_1;
drivers/net/can/usb/peak_usb/pcan_usb_pro.c +1 -1
@@ -500,7 +500,7 @@ static int pcan_usb_pro_drv_loaded(struct peak_usb_device *dev, int loaded)u8 *buffer;int err; - buffer =kmalloc (PCAN_USBPRO_FCT_DRVLD_REQ_LEN ,GFP_KERNEL ); + buffer =kzalloc (PCAN_USBPRO_FCT_DRVLD_REQ_LEN ,GFP_KERNEL );if (!buffer)return -ENOMEM ;
drivers/net/wireless/intel/iwlwifi/mvm/fw.c +21 -8
@@ -778,7 +778,7 @@ static int iwl_mvm_sar_get_ewrd_table(struct iwl_mvm *mvm)for (i =0 ; i < n_profiles; i++) {/* the tables start at element 3 */ -static int pos =3 ; +int pos =3 ;/* The EWRD profiles officially go from 2 to 4, but we * save them in sar_profiles[1-3] (because we don't
@@ -912,6 +912,22 @@ int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b)return iwl_mvm_send_cmd_pdu (mvm,REDUCE_TX_POWER_CMD ,0 , len, &cmd); } +static bool iwl_mvm_sar_geo_support (struct iwl_mvm *mvm) +{ +/* +* The GEO_TX_POWER_LIMIT command is not supported on earlier +* firmware versions. Unfortunately, we don't have a TLV API +* flag to rely on, so rely on the major version which is in +* the first byte of ucode_ver. This was implemented +* initially on version 38 and then backported to 36, 29 and +* 17. +*/ +return IWL_UCODE_SERIAL (mvm->fw->ucode_ver) >=38 || +IWL_UCODE_SERIAL (mvm->fw->ucode_ver) ==36 || +IWL_UCODE_SERIAL (mvm->fw->ucode_ver) ==29 || +IWL_UCODE_SERIAL (mvm->fw->ucode_ver) ==17 ; +} +int iwl_mvm_get_sar_geo_profile (struct iwl_mvm *mvm) {struct iwl_geo_tx_power_profiles_resp *resp;
@@ -927,6 +943,9 @@ int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm) .data = { &geo_cmd }, }; +if (!iwl_mvm_sar_geo_support (mvm)) +return -EOPNOTSUPP ; + ret =iwl_mvm_send_cmd (mvm, &cmd);if (ret) {IWL_ERR (mvm,"Failed to get geographic profile info %d\n" , ret);
@@ -952,13 +971,7 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)int ret, i, j;u16 cmd_wide_id =WIDE_ID (PHY_OPS_GROUP ,GEO_TX_POWER_LIMIT ); -/* -* This command is not supported on earlier firmware versions. -* Unfortunately, we don't have a TLV API flag to rely on, so -* rely on the major version which is in the first byte of -* ucode_ver. -*/ -if (IWL_UCODE_SERIAL (mvm->fw->ucode_ver) <41 ) +if (!iwl_mvm_sar_geo_support (mvm))return 0 ; ret =iwl_mvm_sar_get_wgds_table (mvm);
drivers/net/wireless/intel/iwlwifi/pcie/tx.c +2 -0
@@ -401,6 +401,8 @@ static void iwl_pcie_tfd_unmap(struct iwl_trans *trans, DMA_TO_DEVICE); } + meta->tbs =0 ; +if (trans->cfg->use_tfh) {struct iwl_tfh_tfd *tfd_fh = (void *)tfd;
drivers/net/wireless/marvell/mwifiex/main.h +1 -0
@@ -122,6 +122,7 @@ enum {#define MWIFIEX_MAX_TOTAL_SCAN_TIME (MWIFIEX_TIMER_10S - MWIFIEX_TIMER_1S) +#define WPA_GTK_OUI_OFFSET 2#define RSN_GTK_OUI_OFFSET 2#define MWIFIEX_OUI_NOT_PRESENT 0
drivers/net/wireless/marvell/mwifiex/scan.c +2 -1
@@ -181,7 +181,8 @@ mwifiex_is_wpa_oui_present(struct mwifiex_bssdescriptor *bss_desc, u32 cipher)u8 ret =MWIFIEX_OUI_NOT_PRESENT ;if (has_vendor_hdr (bss_desc->bcn_wpa_ie,WLAN_EID_VENDOR_SPECIFIC )) { - iebody = (struct ie_body *) bss_desc->bcn_wpa_ie->data; + iebody = (struct ie_body *)((u8 *)bss_desc->bcn_wpa_ie->data + +WPA_GTK_OUI_OFFSET ); oui = &mwifiex_wpa_oui[cipher][0 ]; ret =mwifiex_search_oui_in_ie (iebody, oui);if (ret)
drivers/s390/cio/qdio_main.c +6 -6
@@ -1577,13 +1577,13 @@ static int handle_outbound(struct qdio_q *q, unsigned int callflags, rc =qdio_kick_outbound_q (q, phys_aob); }else if (need_siga_sync (q)) { rc =qdio_siga_sync_q (q); + }else if (count <QDIO_MAX_BUFFERS_PER_Q && +get_buf_state (q,prev_buf (bufnr), &state,0 ) >0 && + state ==SLSB_CU_OUTPUT_PRIMED ) { +/* The previous buffer is not processed yet, tack on. */ +qperf_inc (q, fast_requeue); }else { -/* try to fast requeue buffers */ -get_buf_state (q,prev_buf (bufnr), &state,0 ); -if (state !=SLSB_CU_OUTPUT_PRIMED ) - rc =qdio_kick_outbound_q (q,0 ); -else -qperf_inc (q, fast_requeue); + rc =qdio_kick_outbound_q (q,0 ); }/* in case of SIGA errors we must process the error immediately */
drivers/s390/cio/vfio_ccw_cp.c +3 -1
@@ -119,8 +119,10 @@ static int pfn_array_alloc_pin(struct pfn_array *pa, struct device *mdev,sizeof (*pa->pa_iova_pfn) +sizeof (*pa->pa_pfn), GFP_KERNEL); -if (unlikely (!pa->pa_iova_pfn)) +if (unlikely (!pa->pa_iova_pfn)) { + pa->pa_nr =0 ;return -ENOMEM ; + } pa->pa_pfn = pa->pa_iova_pfn + pa->pa_nr; ret =pfn_array_pin (pa, mdev);
drivers/scsi/device_handler/scsi_dh_alua.c +6 -1
@@ -53,6 +53,7 @@#define ALUA_FAILOVER_TIMEOUT 60#define ALUA_FAILOVER_RETRIES 5#define ALUA_RTPG_DELAY_MSECS 5 +#define ALUA_RTPG_RETRY_DELAY 2/* device handler flags */ #define ALUA_OPTIMIZE_STPG 0x01
@@ -677,7 +678,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_port_group *pg)case SCSI_ACCESS_STATE_TRANSITIONING :if (time_before (jiffies, pg->expiry)) {/* State transition, retry */ - pg->interval =2 ; + pg->interval =ALUA_RTPG_RETRY_DELAY ; err =SCSI_DH_RETRY ; }else {struct alua_dh_data *h;
@@ -802,6 +803,8 @@ static void alua_rtpg_work(struct work_struct *work)spin_lock_irqsave (&pg->lock, flags); pg->flags &= ~ALUA_PG_RUNNING ; pg->flags |=ALUA_PG_RUN_RTPG ; +if (!pg->interval) + pg->interval =ALUA_RTPG_RETRY_DELAY ;spin_unlock_irqrestore (&pg->lock, flags);queue_delayed_work (kaluad_wq, &pg->rtpg_work, pg->interval *HZ );
@@ -813,6 +816,8 @@ static void alua_rtpg_work(struct work_struct *work)spin_lock_irqsave (&pg->lock, flags);if (err ==SCSI_DH_RETRY || pg->flags &ALUA_PG_RUN_RTPG ) { pg->flags &= ~ALUA_PG_RUNNING ; +if (!pg->interval && !(pg->flags &ALUA_PG_RUN_RTPG )) + pg->interval =ALUA_RTPG_RETRY_DELAY ; pg->flags |=ALUA_PG_RUN_RTPG ;spin_unlock_irqrestore (&pg->lock, flags); queue_delayed_work(kaluad_wq, &pg->rtpg_work,
drivers/scsi/ibmvscsi/ibmvfc.c +1 -1
@@ -4876,8 +4876,8 @@ static int ibmvfc_remove(struct vio_dev *vdev)spin_lock_irqsave (vhost->host->host_lock, flags);ibmvfc_purge_requests (vhost,DID_ERROR ); -ibmvfc_free_event_pool (vhost);spin_unlock_irqrestore (vhost->host->host_lock, flags); +ibmvfc_free_event_pool (vhost);ibmvfc_free_mem (vhost);spin_lock (&ibmvfc_driver_lock);
drivers/scsi/megaraid/megaraid_sas_base.c +3 -0
@@ -2976,6 +2976,7 @@ megasas_fw_crash_buffer_show(struct device *cdev,u32 size;unsigned long buff_addr;unsigned long dmachunk =CRASH_DMA_BUF_SIZE ; +unsigned long chunk_left_bytes;unsigned long src_addr;unsigned long flags;u32 buff_offset;
@@ -3001,6 +3002,8 @@ megasas_fw_crash_buffer_show(struct device *cdev, } size = (instance->fw_crash_buffer_size * dmachunk) - buff_offset; + chunk_left_bytes = dmachunk - (buff_offset % dmachunk); + size = (size > chunk_left_bytes) ? chunk_left_bytes : size; size = (size >=PAGE_SIZE ) ? (PAGE_SIZE -1 ) : size; src_addr = (unsigned long)instance->crash_buf[buff_offset / dmachunk] +
drivers/tty/tty_ldsem.c +2 -3
@@ -139,8 +139,7 @@ static void __ldsem_wake_readers(struct ld_semaphore *sem)list_for_each_entry_safe (waiter, next, &sem->read_wait, list) { tsk = waiter->task; -smp_mb (); - waiter->task =NULL ; +smp_store_release (&waiter->task,NULL );wake_up_process (tsk);put_task_struct (tsk); }
@@ -235,7 +234,7 @@ down_read_failed(struct ld_semaphore *sem, long count, long timeout)for (;;) {set_current_state (TASK_UNINTERRUPTIBLE ); -if (!waiter.task) +if (!smp_load_acquire (&waiter.task))break ;if (!timeout)break ;
drivers/usb/core/devio.c +0 -2
@@ -1811,8 +1811,6 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurbreturn 0 ; error: -if (as && as->usbm) -dec_usb_memory_use_count (as->usbm, &as->usbm->urb_use_count);kfree (isopkt);kfree (dr);if (as)
drivers/usb/host/xhci-rcar.c +7 -2
@@ -231,10 +231,15 @@ int xhci_rcar_init_quirk(struct usb_hcd *hcd)* pointers. So, this driver clears the AC64 bit of xhci->hcc_params * to call dma_set_coherent_mask(dev, DMA_BIT_MASK(32)) in * xhci_gen_setup(). +* +* And, since the firmware/internal CPU control the USBSTS.STS_HALT +* and the process speed is down when the roothub port enters U3, +* long delay for the handshake of STS_HALT is neeed in xhci_suspend(). */ if (xhci_rcar_is_gen2 (hcd->self.controller) || -xhci_rcar_is_gen3 (hcd->self.controller)) - xhci->quirks |=XHCI_NO_64BIT_SUPPORT ; +xhci_rcar_is_gen3 (hcd->self.controller)) { + xhci->quirks |=XHCI_NO_64BIT_SUPPORT |XHCI_SLOW_SUSPEND ; + } xhci->quirks |=XHCI_TRUST_TX_LENGTH ;return xhci_rcar_download_firmware (hcd);
drivers/usb/misc/iowarrior.c +4 -3
@@ -870,19 +870,20 @@ static void iowarrior_disconnect(struct usb_interface *interface) dev =usb_get_intfdata (interface);mutex_lock (&iowarrior_open_disc_lock);usb_set_intfdata (interface,NULL ); +/* prevent device read, write and ioctl */ + dev->present =0 ; minor = dev->minor; +mutex_unlock (&iowarrior_open_disc_lock); +/* give back our minor - this will call close() locks need to be dropped at this point*/ -/* give back our minor */ usb_deregister_dev (interface, &iowarrior_class);mutex_lock (&dev->mutex);/* prevent device read, write and ioctl */ - dev->present =0 ;mutex_unlock (&dev->mutex); -mutex_unlock (&iowarrior_open_disc_lock);if (dev->opened) {/* There is a process that holds a filedescriptor to the device ,
drivers/usb/misc/yurex.c +1 -1
@@ -96,7 +96,6 @@ static void yurex_delete(struct kref *kref)dev_dbg (&dev->interface->dev,"%s\n" , __func__); -usb_put_dev (dev->udev);if (dev->cntl_urb) {usb_kill_urb (dev->cntl_urb);kfree (dev->cntl_req);
@@ -112,6 +111,7 @@ static void yurex_delete(struct kref *kref) dev->int_buffer, dev->urb->transfer_dma);usb_free_urb (dev->urb); } +usb_put_dev (dev->udev);kfree (dev); }
fs/cifs/smb2pdu.c +6 -1
@@ -166,7 +166,7 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon)if (tcon ==NULL )return 0 ; -if (smb2_command ==SMB2_TREE_CONNECT ) +if (smb2_command ==SMB2_TREE_CONNECT || smb2_command ==SMB2_IOCTL )return 0 ;if (tcon->tidStatus == CifsExiting) {
@@ -834,7 +834,12 @@ SMB2_sess_alloc_buffer(struct SMB2_sess_data *sess_data)else req->SecurityMode =0 ; +#ifdef CONFIG_CIFS_DFS_UPCALL + req->Capabilities =cpu_to_le32 (SMB2_GLOBAL_CAP_DFS ); +#else req->Capabilities =0 ; +#endif /* DFS_UPCALL */ + req->Channel =0 ;/* MBZ */ sess_data->iov[0 ].iov_base = (char *)req;
fs/nfs/nfs4proc.c +7 -5
@@ -2954,7 +2954,6 @@ static int _nfs4_do_setattr(struct inode *inode, };struct rpc_cred *delegation_cred =NULL ;unsigned long timestamp = jiffies; -fmode_t fmode;bool truncate;int status;
@@ -2962,11 +2961,12 @@ static int _nfs4_do_setattr(struct inode *inode,/* Servers should only apply open mode checks for file size changes */ truncate = (arg->iap->ia_valid &ATTR_SIZE ) ? true : false; - fmode = truncate ?FMODE_WRITE :FMODE_READ ; +if (!truncate) + goto zero_stateid; -if (nfs4_copy_delegation_stateid (inode, fmode, &arg->stateid, &delegation_cred)) { +if (nfs4_copy_delegation_stateid (inode,FMODE_WRITE , &arg->stateid, &delegation_cred)) {/* Use that stateid */ - }else if (truncate && ctx !=NULL ) { + }else if (ctx !=NULL && ctx->state) {struct nfs_lock_context *l_ctx;if (!nfs4_valid_open_stateid (ctx->state))return -EBADF ;
@@ -2978,8 +2978,10 @@ static int _nfs4_do_setattr(struct inode *inode,nfs_put_lock_context (l_ctx);if (status == -EIO )return -EBADF ; - }else + }else { +zero_stateid:nfs4_stateid_copy (&arg->stateid, &zero_stateid); + }if (delegation_cred) msg.rpc_cred = delegation_cred;
include/linux/ccp.h +2 -0
@@ -173,6 +173,8 @@ struct ccp_aes_engine {enum ccp_aes_mode mode;enum ccp_aes_action action; +u32 authsize; +struct scatterlist *key;u32 key_len;/* In bytes */
include/linux/kvm_host.h +1 -0
@@ -808,6 +808,7 @@ void kvm_arch_check_processor_compat(void *rtn);int kvm_arch_vcpu_runnable (struct kvm_vcpu *vcpu);bool kvm_arch_vcpu_in_kernel (struct kvm_vcpu *vcpu);int kvm_arch_vcpu_should_kick (struct kvm_vcpu *vcpu); +bool kvm_arch_dy_runnable (struct kvm_vcpu *vcpu);#ifndef __KVM_HAVE_ARCH_VM_ALLOCstatic inline struct kvm *kvm_arch_alloc_vm (void )
include/net/tcp.h +3 -0
@@ -1613,6 +1613,8 @@ static inline void tcp_init_send_head(struct sock *sk) sk->sk_send_head =NULL ; } +static inline void tcp_init_send_head (struct sock *sk); +/* write queue abstraction */ static inline void tcp_write_queue_purge (struct sock *sk) {
@@ -1621,6 +1623,7 @@ static inline void tcp_write_queue_purge(struct sock *sk)tcp_chrono_stop (sk,TCP_CHRONO_BUSY );while ((skb =__skb_dequeue (&sk->sk_write_queue)) !=NULL )sk_wmem_free_skb (sk, skb); +tcp_init_send_head (sk);sk_mem_reclaim (sk);tcp_clear_all_retrans_hints (tcp_sk (sk));tcp_init_send_head (sk);
include/sound/compress_driver.h +1 -4
@@ -186,10 +186,7 @@ static inline void snd_compr_drain_notify(struct snd_compr_stream *stream)if (snd_BUG_ON (!stream))return ; -if (stream->direction ==SND_COMPRESS_PLAYBACK ) - stream->runtime->state =SNDRV_PCM_STATE_SETUP ; -else - stream->runtime->state =SNDRV_PCM_STATE_PREPARED ; + stream->runtime->state =SNDRV_PCM_STATE_SETUP ;wake_up (&stream->runtime->sleep); }
kernel/events/core.c +1 -1
@@ -10474,7 +10474,7 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu, goto err_unlock; } -perf_install_in_context (ctx, event, cpu); +perf_install_in_context (ctx, event, event->cpu);perf_unpin_context (ctx);mutex_unlock (&ctx->mutex);
lib/test_firmware.c +4 -1
@@ -895,8 +895,11 @@ static int __init test_firmware_init(void)return -ENOMEM ; rc =__test_firmware_config_init (); -if (rc) +if (rc) { +kfree (test_fw_config); +pr_err ("could not init firmware test config: %d\n" , rc);return rc; + } rc =misc_register (&test_fw_misc_device);if (rc) {
mm/vmalloc.c +9 -0
@@ -1765,6 +1765,12 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,if (!addr)return NULL ; +/* +* First make sure the mappings are removed from all page-tables +* before they are freed. +*/ +vmalloc_sync_all (); +/* * In this function, newly allocated vm_struct has VM_UNINITIALIZED * flag. It means that vm_struct is not fully initialized.
@@ -2314,6 +2320,9 @@ EXPORT_SYMBOL(remap_vmalloc_range);/* * Implement a stub for vmalloc_sync_all() if the architecture chose not to * have one. +* +* The purpose of this function is to make sure the vmalloc area +* mappings are identical in all page-tables in the system. */ void __weak vmalloc_sync_all (void ) {
net/ipv4/netfilter/ipt_rpfilter.c +1 -0
@@ -96,6 +96,7 @@ static bool rpfilter_mt(const struct sk_buff *skb, struct xt_action_param *par) flow.flowi4_mark = info->flags &XT_RPFILTER_VALID_MARK ? skb->mark :0 ; flow.flowi4_tos =RT_TOS (iph->tos); flow.flowi4_scope =RT_SCOPE_UNIVERSE ; + flow.flowi4_oif =l3mdev_master_ifindex_rcu (xt_in (par));return rpfilter_lookup_reverse (xt_net (par), &flow,xt_in (par), info->flags) ^ invert; }
net/ipv6/netfilter/ip6t_rpfilter.c +6 -2
@@ -58,7 +58,9 @@ static bool rpfilter_lookup_reverse6(struct net *net, const struct sk_buff *skb,if (rpfilter_addr_linklocal (&iph->saddr)) { lookup_flags |=RT6_LOOKUP_F_IFACE ; fl6.flowi6_oif = dev->ifindex; - }else if ((flags &XT_RPFILTER_LOOSE ) ==0 ) +/* Set flowi6_oif for vrf devices to lookup route in l3mdev domain. */ + }else if (netif_is_l3_master (dev) ||netif_is_l3_slave (dev) || + (flags &XT_RPFILTER_LOOSE ) ==0 ) fl6.flowi6_oif = dev->ifindex; rt = (void *)ip6_route_lookup (net, &fl6, lookup_flags);
@@ -73,7 +75,9 @@ static bool rpfilter_lookup_reverse6(struct net *net, const struct sk_buff *skb, goto out; } -if (rt->rt6i_idev->dev == dev || (flags &XT_RPFILTER_LOOSE )) +if (rt->rt6i_idev->dev == dev || +l3mdev_master_ifindex_rcu (rt->rt6i_idev->dev) == dev->ifindex || + (flags &XT_RPFILTER_LOOSE )) ret = true; out:ip6_rt_put (rt);
net/mac80211/driver-ops.c +9 -4
@@ -169,11 +169,16 @@ int drv_conf_tx(struct ieee80211_local *local,if (!check_sdata_in_driver (sdata))return -EIO ; -if (WARN_ONCE (params->cw_min ==0 || - params->cw_min > params->cw_max, -"%s: invalid CW_min/CW_max: %d/%d\n" , - sdata->name, params->cw_min, params->cw_max)) +if (params->cw_min ==0 || params->cw_min > params->cw_max) { +/* +* If we can't configure hardware anyway, don't warn. We may +* never have initialized the CW parameters. +*/ +WARN_ONCE (local->ops->conf_tx, +"%s: invalid CW_min/CW_max: %d/%d\n" , + sdata->name, params->cw_min, params->cw_max);return -EINVAL ; + }trace_drv_conf_tx (local, sdata, ac, params);if (local->ops->conf_tx)
net/mac80211/mlme.c +10 -0
@@ -1867,6 +1867,16 @@ static bool ieee80211_sta_wmm_params(struct ieee80211_local *local, } } +/* WMM specification requires all 4 ACIs. */ +for (ac =0 ; ac <IEEE80211_NUM_ACS ; ac++) { +if (params[ac].cw_min ==0 ) { +sdata_info (sdata, +"AP has invalid WMM params (missing AC %d), using defaults\n" , + ac); +return false; + } + } +for (ac =0 ; ac <IEEE80211_NUM_ACS ; ac++) { mlme_dbg(sdata, "WMM AC=%d acm=%d aifs=%d cWmin=%d cWmax=%d txop=%d uapsd=%d, downgraded=%d\n",
net/netfilter/nfnetlink.c +1 -1
@@ -530,7 +530,7 @@ static int nfnetlink_bind(struct net *net, int group) ss =nfnetlink_get_subsys (type <<8 );rcu_read_unlock ();if (!ss) -request_module ("nfnetlink-subsys-%d" , type); +request_module_nowait ("nfnetlink-subsys-%d" , type); return 0; }#endif
net/netfilter/nft_hash.c +1 -1
@@ -131,7 +131,7 @@ static int nft_symhash_init(const struct nft_ctx *ctx, priv->dreg =nft_parse_register (tb[NFTA_HASH_DREG ]); priv->modulus =ntohl (nla_get_be32 (tb[NFTA_HASH_MODULUS ])); -if (priv->modulus <=1 ) +if (priv->modulus <1 )return -ERANGE ;if (priv->offset + priv->modulus -1 < priv->offset)
scripts/sphinx-pre-install +1 -1
@@ -301,7 +301,7 @@ sub give_redhat_hints() # # Checks valid for RHEL/CentOS version 7.x. # - if (! $system_release =~ /Fedora/) { + if (!($system_release =~ /Fedora/)) { $map{"virtualenv"} = "python-virtualenv"; }
sound/core/compress_offload.c +49 -11
100 lines not on this page · raw message
sound/firewire/packets-buffer.c +1 -1
@@ -37,7 +37,7 @@ int iso_packets_buffer_init(struct iso_packets_buffer *b, struct fw_unit *unit, packets_per_page =PAGE_SIZE / packet_size;if (WARN_ON (!packets_per_page)) { err = -EINVAL ; - goto error; + goto err_packets; } pages =DIV_ROUND_UP (count, packets_per_page);
sound/pci/hda/hda_controller.c +9 -4
@@ -609,11 +609,9 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) } runtime->private_data = azx_dev; -if (chip->gts_present) - azx_pcm_hw.info = azx_pcm_hw.info | -SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME ; - runtime->hw = azx_pcm_hw; +if (chip->gts_present) + runtime->hw.info |=SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME ; runtime->hw.channels_min = hinfo->channels_min; runtime->hw.channels_max = hinfo->channels_max; runtime->hw.formats = hinfo->formats;
@@ -626,6 +624,13 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)20 , 178000000); +/* by some reason, the playback stream stalls on PulseAudio with +* tsched=1 when a capture stream triggers. Until we figure out the +* real cause, disable tsched mode by telling the PCM info flag. +*/ +if (chip->driver_caps &AZX_DCAPS_AMD_WORKAROUND ) + runtime->hw.info |=SNDRV_PCM_INFO_BATCH ; +if (chip->align_buffer_size)/* constrain buffer sizes to be multiple of 128 bytes. This is more efficient in terms of memory
sound/pci/hda/hda_controller.h +1 -1
@@ -40,7 +40,7 @@/* 14 unused */ #define AZX_DCAPS_CTX_WORKAROUND (1 << 15)/* X-Fi workaround */ #define AZX_DCAPS_POSFIX_LPIB (1 << 16)/* Use LPIB as default */ -/* 17 unused */ +#define AZX_DCAPS_AMD_WORKAROUND (1 << 17)/* AMD-specific workaround */ #define AZX_DCAPS_NO_64BIT (1 << 18)/* No 64bit address */ #define AZX_DCAPS_SYNC_WRITE (1 << 19)/* sync each cmd write */ #define AZX_DCAPS_OLD_SSYNC (1 << 20)/* Old SSYNC reg for ICH */
sound/pci/hda/hda_intel.c +62 -1
117 lines not on this page · raw message
sound/sound_core.c +2 -1
@@ -287,7 +287,8 @@ static int sound_insert_unit(struct sound_unit **list, const struct file_operati goto retry; }spin_unlock (&sound_loader_lock); -return -EBUSY ; + r = -EBUSY ; + goto fail; } }
tools/perf/arch/s390/util/machine.c +30 -1
@@ -6,8 +6,9 @@#include "machine.h" #include "api/fs/fs.h" #include "debug.h" +#include "symbol.h" -int arch__fix_module_text_start (u64 *start,const char *name) +int arch__fix_module_text_start (u64 *start,u64 *size,const char *name) {u64 m_start = *start;char path[PATH_MAX ];
@@ -17,7 +18,35 @@ int arch__fix_module_text_start(u64 *start, const char *name)if (sysfs__read_ull (path, (unsigned long long *)start) <0 ) {pr_debug2 ("Using module %s start:%#lx\n" , path, m_start); *start = m_start; + }else { +/* Successful read of the modules segment text start address. +* Calculate difference between module start address +* in memory and module text segment start address. +* For example module load address is 0x3ff8011b000 +* (from /proc/modules) and module text segment start +* address is 0x3ff8011b870 (from file above). +* +* Adjust the module size and subtract the GOT table +* size located at the beginning of the module. +*/ + *size -= (*start - m_start); }return 0 ; } + +/* On s390 kernel text segment start is located at very low memory addresses, +* for example 0x10000. Modules are located at very high memory addresses, +* for example 0x3ff xxxx xxxx. The gap between end of kernel text segment +* and beginning of first module's text segment is very big. +* Therefore do not fill this gap and do not assign it to the kernel dso map. +*/ +void arch__symbols__fixup_end (struct symbol *p,struct symbol *c) +{ +if (strchr (p->name,'[' ) ==NULL &&strchr (c->name,'[' )) +/* Last kernel symbol mapped to end of page */ + p->end =roundup (p->end, page_size); +else + p->end = c->start; +pr_debug4 ("%s sym:%s end:%#lx\n" , __func__, p->name, p->end); +}
tools/perf/builtin-probe.c +10 -0
@@ -712,6 +712,16 @@ __cmd_probe(int argc, const char **argv) ret =perf_add_probe_events (params.events, params.nevents);if (ret <0 ) { + +/* +* When perf_add_probe_events() fails it calls +* cleanup_perf_probe_events(pevs, npevs), i.e. +* cleanup_perf_probe_events(params.events, params.nevents), which +* will call clear_perf_probe_event(), so set nevents to zero +* to avoid cleanup_params() to call clear_perf_probe_event() again +* on the same pevs. +*/ + params.nevents =0 ;pr_err_with_code (" Error: Failed to add events." , ret);return ret; }
tools/perf/util/header.c +1 -1
@@ -3081,7 +3081,7 @@ int perf_event__process_feature(struct perf_tool *tool,return 0 ; ff.buf = (void *)fe->data; - ff.size = event->header.size -sizeof (event->header); + ff.size = event->header.size -sizeof (*fe); ff.ph = &session->header;if (feat_ops[feat].process (&ff,NULL ))
tools/perf/util/machine.c +2 -1
@@ -1233,6 +1233,7 @@ static int machine__set_modules_path(struct machine *machine)return map_groups__set_modules_path_dir (&machine->kmaps, modules_path,0 ); }int __weak arch__fix_module_text_start (u64 *start__maybe_unused , +u64 *size__maybe_unused ,const char *name__maybe_unused ) {return 0 ;
@@ -1244,7 +1245,7 @@ static int machine__create_module(void *arg, const char *name, u64 start,struct machine *machine = arg;struct map *map; -if (arch__fix_module_text_start (&start, name) <0 ) +if (arch__fix_module_text_start (&start, &size, name) <0 )return -1 ; map =machine__findnew_module_map (machine, start, name);
tools/perf/util/machine.h +1 -1
@@ -213,7 +213,7 @@ struct symbol *machine__find_kernel_function_by_name(struct machine *machine,struct map *machine__findnew_module_map (struct machine *machine,u64 start,const char *filename); -int arch__fix_module_text_start (u64 *start,const char *name); +int arch__fix_module_text_start (u64 *start,u64 *size,const char *name);int __machine__load_kallsyms (struct machine *machine,const char *filename,enum map_type type,bool no_kcore);
tools/perf/util/symbol.c +6 -1
@@ -93,6 +93,11 @@ static int prefix_underscores_count(const char *str)return tail - str; } +void __weak arch__symbols__fixup_end (struct symbol *p,struct symbol *c) +{ + p->end = c->start; +} +const char *__weak arch__normalize_symbol_name (const char *name) {return name;
@@ -219,7 +224,7 @@ void symbols__fixup_end(struct rb_root *symbols) curr = rb_entry(nd, struct symbol, rb_node);if (prev->end == prev->start && prev->end != curr->start) - prev->end = curr->start; +arch__symbols__fixup_end (prev, curr); }/* Last entry */
tools/perf/util/symbol.h +1 -0
@@ -351,6 +351,7 @@ const char *arch__normalize_symbol_name(const char *name);#define SYMBOL_A 0#define SYMBOL_B 1 +void arch__symbols__fixup_end (struct symbol *p,struct symbol *c);int arch__compare_symbol_names (const char *namea,const char *nameb);int arch__compare_symbol_names_n (const char *namea,const char *nameb,unsigned int n);
tools/perf/util/thread.c +11 -1
@@ -160,14 +160,24 @@ struct comm *thread__comm(const struct thread *thread)struct comm *thread__exec_comm (const struct thread *thread) { -struct comm *comm, *last =NULL ; +struct comm *comm, *last =NULL , *second_last =NULL ;list_for_each_entry (comm, &thread->comm_list, list) {if (comm->exec)return comm; + second_last = last; last = comm; } +/* +* 'last' with no start time might be the parent's comm of a synthesized +* thread (created by processing a synthesized fork event). For a main +* thread, that is very probably wrong. Prefer a later comm to avoid +* that case. +*/ +if (second_last && !last->start && thread->pid_ == thread->tid) +return second_last; +return last; }
virt/kvm/kvm_main.c +24 -1
@@ -2314,6 +2314,29 @@ static bool kvm_vcpu_eligible_for_directed_yield(struct kvm_vcpu *vcpu)#endif } +/* +* Unlike kvm_arch_vcpu_runnable, this function is called outside +* a vcpu_load/vcpu_put pair. However, for most architectures +* kvm_arch_vcpu_runnable does not require vcpu_load. +*/ +bool __weak kvm_arch_dy_runnable (struct kvm_vcpu *vcpu) +{ +return kvm_arch_vcpu_runnable (vcpu); +} + +static bool vcpu_dy_runnable (struct kvm_vcpu *vcpu) +{ +if (kvm_arch_dy_runnable (vcpu)) +return true; + +#ifdef CONFIG_KVM_ASYNC_PF +if (!list_empty_careful (&vcpu->async_pf.done)) +return true; +#endif + +return false; +} +void kvm_vcpu_on_spin (struct kvm_vcpu *me,bool yield_to_kernel_mode) {struct kvm *kvm = me->kvm;
@@ -2343,7 +2366,7 @@ void kvm_vcpu_on_spin(struct kvm_vcpu *me, bool yield_to_kernel_mode)continue ;if (vcpu == me)continue ; -if (swait_active (&vcpu->wq) && !kvm_arch_vcpu_runnable (vcpu)) +if (swait_active (&vcpu->wq) && !vcpu_dy_runnable (vcpu))continue ;if (yield_to_kernel_mode && !kvm_arch_vcpu_in_kernel (vcpu))continue ;