Linux 4.19.297
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.19.297 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.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/boot/dts/omap4-droid4-xt894.dts | 1 arch/powerpc/include/asm/nohash/64/pgtable.h | 2 arch/s390/pci/pci_dma.c | 15 ++++ arch/x86/include/asm/msr-index.h | 4 + arch/x86/kernel/alternative.c | 13 ++++ arch/x86/kernel/cpu/amd.c | 8 ++ arch/x86/kvm/lapic.c | 8 +- drivers/acpi/irq.c | 7 +- drivers/ata/libata-eh.c | 2 drivers/base/regmap/regmap.c | 2 drivers/bluetooth/hci_vhci.c | 3 drivers/cpuidle/cpuidle.c | 12 ++- drivers/dma/stm32-mdma.c | 4 + drivers/gpio/gpio-timberdale.c | 5 - drivers/gpio/gpio-vf610.c | 4 - drivers/gpu/drm/drm_panel_orientation_quirks.c | 16 +++++ drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 drivers/gpu/drm/msm/dsi/dsi_host.c | 12 +++ drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 drivers/hid/hid-holtek-kbd.c | 4 + drivers/hid/hid-logitech-hidpp.c | 3 drivers/i2c/i2c-mux.c | 2 drivers/iio/pressure/bmp280-core.c | 2 drivers/iio/pressure/ms5611_core.c | 2 drivers/infiniband/hw/cxgb4/cm.c | 3 drivers/input/joystick/xpad.c | 2 drivers/input/misc/powermate.c | 1 drivers/input/mouse/elantech.c | 1 drivers/input/mouse/synaptics.c | 1 drivers/mcb/mcb-core.c | 10 --- drivers/mcb/mcb-parse.c | 2 drivers/mmc/core/mmc.c | 2 drivers/mtd/nand/raw/qcom_nandc.c | 2 drivers/mtd/nand/spi/micron.c | 2 drivers/net/ethernet/intel/i40e/i40e_common.c | 4 - drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 5 - drivers/net/ethernet/marvell/sky2.h | 2 drivers/net/ieee802154/ca8210.c | 17 ----- drivers/net/usb/dm9601.c | 7 +- drivers/net/usb/smsc95xx.c | 2 drivers/net/xen-netback/interface.c | 3 drivers/phy/motorola/phy-mapphone-mdm6600.c | 1 drivers/usb/core/hub.c | 28 +++++++- drivers/usb/core/hub.h | 2 drivers/usb/dwc3/core.c | 39 ++++++++++++ drivers/usb/gadget/function/f_ncm.c | 26 ++++++-- drivers/usb/gadget/udc/udc-xilinx.c | 20 +++--- drivers/usb/host/xhci-ring.c | 4 - drivers/usb/musb/musb_debugfs.c | 2 drivers/usb/musb/musb_host.c | 9 ++ drivers/usb/serial/option.c | 7 ++ fs/btrfs/extent-tree.c | 6 - fs/btrfs/ioctl.c | 4 - fs/btrfs/tree-log.c | 2 fs/ceph/inode.c | 4 - fs/overlayfs/copy_up.c | 2 fs/quota/dquot.c | 66 ++++++++++++-------- include/linux/indirect_call_wrapper.h | 51 ++++++++++++++++ include/linux/mcb.h | 1 include/linux/netdevice.h | 2 include/linux/perf_event.h | 1 include/linux/quota.h | 4 - include/linux/quotaops.h | 2 include/net/bluetooth/hci_core.h | 2 include/net/netns/xfrm.h | 1 include/net/tcp.h | 3 kernel/cgroup/cgroup-v1.c | 5 - kernel/events/core.c | 39 ++++++++++-- kernel/sched/idle.c | 22 ++---- kernel/trace/trace_events.c | 1 kernel/workqueue.c | 8 +- net/bluetooth/hci_conn.c | 72 +++++++++++++--------- net/bluetooth/hci_core.c | 8 +- net/bluetooth/hci_event.c | 33 ++++++++-- net/bluetooth/hci_sock.c | 3 net/ceph/messenger.c | 79 ++++++++++++------------- net/core/pktgen.c | 14 ++-- net/ipv4/esp4.c | 4 - net/ipv4/tcp_output.c | 25 ++++++- net/ipv4/tcp_recovery.c | 2 net/ipv6/esp6.c | 4 - net/ipv6/xfrm6_policy.c | 4 - net/mac80211/tx.c | 3 net/netfilter/ipvs/ip_vs_sync.c | 4 - net/netfilter/nft_payload.c | 2 net/netfilter/nft_set_rbtree.c | 2 net/nfc/llcp_core.c | 30 +++------ net/nfc/nci/core.c | 5 + net/nfc/nci/spi.c | 2 net/rds/tcp_connect.c | 2 net/rds/tcp_listen.c | 2 net/rfkill/rfkill-gpio.c | 4 - net/sched/sch_hfsc.c | 18 ++++- net/socket.c | 77 +++++++++++++++++------- net/wireless/nl80211.c | 2 net/xfrm/xfrm_interface_core.c | 22 +++--- net/xfrm/xfrm_policy.c | 6 - sound/soc/pxa/pxa-ssp.c | 2 99 files changed, 680 insertions(+), 318 deletions(-)
Abhinav Kumar (1):
drm/msm/dsi: skip the wait for video mode done if not applicable
Alexander Zangerl (1):
iio: pressure: ms5611: ms5611_prom_is_valid false negative bug
Amelie Delaunay (1):
dmaengine: stm32-mdma: abort resume if no ongoing transfer
Andy Shevchenko (1):
Revert "pinctrl: avoid unsafe code pattern in find_pinctrl()"
Arkadiusz Bokowy (1):
Bluetooth: vhci: Fix race when opening vhci device
Arnd Bergmann (1):
Bluetooth: avoid memcmp() out of bounds warning
Artem Chernyshev (1):
RDMA/cxgb4: Check skb value for failure to allocate
Avri Altman (1):
mmc: core: Capture correct oemid-bits for eMMC cards
Benjamin Berg (1):
wifi: cfg80211: avoid leaking stack data into trace
Benoît Monin (1):
USB: serial: option: add entry for Sierra EM9191 with new firmware
Bibek Kumar Patro (1):
mtd: rawnand: qcom: Unmap the right resource upon probe failure
Borislav Petkov (AMD) (1):
x86/cpu: Fix AMD erratum #1485 on Zen4-based CPUs
Chengfeng Ye (1):
gpio: timberdale: Fix potential deadlock on &tgpio->lock
Christophe Leroy (1):
powerpc/64e: Fix wrong test in __ptep_test_and_clear_young()
Clément Léger (1):
tracing: relax trace_event_eval_update() execution with cond_resched()
Damien Le Moal (1):
ata: libata-eh: Fix compilation warning in ata_eh_link_report()
Dan Carpenter (3):
ixgbe: fix crash with empty VF macvlan list
net: usb: smsc95xx: Fix an error code in smsc95xx_reset()
ASoC: pxa: fix a memory leak in probe()
Dinghao Liu (1):
ieee802154: ca8210: Fix a potential UAF in ca8210_probe
Dmitry Torokhov (1):
pinctrl: avoid unsafe code pattern in find_pinctrl()
Edward AD (1):
Bluetooth: hci_sock: fix slab oob read in create_monitor_event
Eric Dumazet (4):
net: nfc: fix races in nfc_llcp_sock_get() and nfc_llcp_sock_get_sn()
xfrm: fix a data-race in xfrm_gen_index()
xfrm: interface: use DEV_STATS_INC()
tcp: tsq: relax tcp_small_queue_check() when rtx queue contains a single skb
Fabio Porcedda (1):
USB: serial: option: add Telit LE910C4-WWX 0x1035 composition
Filipe Manana (1):
btrfs: return -EUCLEAN for delayed tree ref with a ref count not equals to 1
Florian Westphal (1):
netfilter: nft_payload: fix wrong mac header matching
Gavrilov Ilia (1):
net: pktgen: Fix interface flags printing
Greg Kroah-Hartman (1):
Linux 4.19.297
Haibo Chen (1):
gpio: vf610: set value before the direction to avoid a glitch
Hans de Goede (1):
HID: logitech-hidpp: Fix kernel crash on receiver USB disconnect
Heiner Kallweit (1):
i2c: mux: Avoid potential false error message in i2c_mux_add_adapter
Jan Kara (1):
quota: Fix slow quotaoff
Javier Carrasco (2):
net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read
Input: powermate - fix use-after-free in powermate_config_complete
Jeff Layton (2):
libceph: fix unaligned accesses in ceph_entity_addr handling
overlayfs: set ctime when setting mtime and atime
Jeffery Miller (1):
Input: psmouse - fix fast_reconnect function for PS/2 mode
Jeremy Cline (1):
nfc: nci: assert requested protocol is valid
Jim Mattson (1):
KVM: x86: Mask LVTPC when handling a PMI
Johan Hovold (1):
regmap: fix NULL deref on lookup
Jordan Rife (3):
net: prevent rewrite of msg_name in sock_sendmsg()
net: prevent address rewrite in kernel_bind()
libceph: use kernel_connect()
Jorge Sanjuan Garcia (1):
mcb: remove is_added flag from mcb_device struct
Josef Bacik (2):
btrfs: initialize start_slot in btrfs_log_prealloc_extents
btrfs: fix some -Wmaybe-uninitialized warnings in ioctl.c
Josua Mayer (1):
net: rfkill: gpio: prevent value glitch during probe
Kai Uwe Broulik (1):
drm: panel-orientation-quirks: Add quirk for One Mix 2S
Kees Cook (2):
sky2: Make sure there is at least one frag_addr available
Bluetooth: hci_sock: Correctly bounds check and pad HCI_MON_NEW_INDEX name
Kirill A. Shutemov (1):
x86/alternatives: Disable KASAN in apply_alternatives()
Konstantin Meskhidze (1):
drm/vmwgfx: fix typo of sizeof argument
Krishna Kurapati (1):
usb: gadget: ncm: Handle decoding of multiple NTB's in unwrap call
Krzysztof Kozlowski (1):
nfc: nci: fix possible NULL pointer dereference in send_acknowledge()
Lee, Chun-Yi (2):
Bluetooth: hci_event: Ignore NULL link key
Bluetooth: Reject connection with the device which has same BD_ADDR
Luiz Augusto von Dentz (3):
Bluetooth: hci_event: Fix coding style
Bluetooth: hci_core: Fix build warnings
Bluetooth: hci_event: Fix using memcmp when comparing keys
Ma Ke (3):
net: ipv4: fix return value check in esp_remove_trailer
net: ipv6: fix return value check in esp_remove_trailer
HID: holtek: fix slab-out-of-bounds Write in holtek_kbd_input_event
Martin Fuzzey (1):
drm: etvnaviv: fix bad backport leading to warning
Martin Kurbanov (1):
mtd: spinand: micron: correct bitmask for ecc status
Matthias Berndt (1):
Input: xpad - add PXN V900 support
Michal Koutný (1):
cgroup: Remove duplicates in cgroup v1 tasks file
Michal Schmidt (1):
i40e: prevent crash on probe if hw registers have invalid values
Neal Cardwell (1):
tcp: fix excessive TLP and RACK timeouts from HZ rounding
Nicolas Dichtel (1):
dev_forward_skb: do not scrub skb mark within the same name space
Niklas Schnelle (1):
s390/pci: fix iommu bitmap allocation
Pablo Neira Ayuso (1):
netfilter: nft_set_rbtree: .deactivate fails if element has expired
Paolo Abeni (2):
indirect call wrappers: helpers to speed-up indirect calls of builtin
net: use indirect calls helpers at the socket layer
Pedro Tammela (1):
net/sched: sch_hfsc: upgrade 'rt' to 'sc' when it becomes a inner curve
Peter Zijlstra (2):
sched,idle,rcu: Push rcu_idle deeper into the idle path
perf: Disallow mis-matched inherited group reads
Phil Elwell (1):
iio: pressure: bmp280: Fix NULL pointer exception
Piyush Mehta (1):
usb: gadget: udc-xilinx: replace memcpy with memcpy_toio
Puliang Lu (1):
USB: serial: option: add Fibocom to DELL custom modem FM101R-GL
Randy Dunlap (1):
net: fix kernel-doc warnings for socket.c
Ricardo Cañuelo (1):
usb: hub: Guard against accesses to uninitialized BOS descriptors
Roger Pau Monne (1):
xen-netback: use default TX queue size for vifs
Sunil V L (1):
ACPI: irq: Fix incorrect return value in acpi_register_gsi()
Thinh Nguyen (1):
usb: dwc3: Soft reset phy on probe for host
Tony Lindgren (2):
ARM: dts: ti: omap: Fix noisy serial with overrun-throttle-ms for mapphone
phy: mapphone-mdm6600: Fix runtime PM for remove
Waiman Long (1):
workqueue: Override implicit ordered attribute in workqueue_apply_unbound_cpumask()
Wen Gong (1):
wifi: mac80211: allow transmitting EAPOL frames with tainted key
Wesley Cheng (1):
usb: xhci: xhci-ring: Use sysdev for mapping bounce buffer
Xingxing Luo (2):
usb: musb: Get the musb_qh poniter after musb_giveback
usb: musb: Modify the "HWVers" register address
Xiubo Li (1):
ceph: fix incorrect revoked caps assert in ceph_fill_file_size()
Ying Hsu (1):
Bluetooth: Avoid redundant authentication
Zhang Changzhong (1):
xfrm6: fix inet6_dev refcount underflow problem
Ziyang Xuan (1):
Bluetooth: Fix a refcnt underflow problem for hci_conn
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 296 +SUBLEVEL = 297 EXTRAVERSION = NAME = "People's Front"
arch/arm/boot/dts/omap4-droid4-xt894.dts +1 -0
@@ -669,6 +669,7 @@ &uart3 { interrupts-extended = <&wakeupgen GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH &omap4_pmx_core 0x17c>; + overrun-throttle-ms = <500>; }; &uart4 {
arch/powerpc/include/asm/nohash/64/pgtable.h +1 -1
@@ -215,7 +215,7 @@ static inline int __ptep_test_and_clear_young(struct mm_struct *mm, {unsigned long old; -if (pte_young (*ptep)) +if (!pte_young (*ptep))return 0 ; old =pte_update (mm, addr, ptep, _PAGE_ACCESSED,0 ,0 );return (old & _PAGE_ACCESSED) !=0 ;
arch/s390/pci/pci_dma.c +13 -2
@@ -545,6 +545,17 @@ static void s390_dma_unmap_sg(struct device *dev, struct scatterlist *sg, s->dma_length =0 ; } } + +static unsigned long *bitmap_vzalloc (size_t bits,gfp_t flags) +{ +size_t n =BITS_TO_LONGS (bits); +size_t bytes; + +if (unlikely (check_mul_overflow (n,sizeof (unsigned long ), &bytes))) +return NULL ; + +return vzalloc (bytes); +}static int s390_mapping_error (struct device *dev,dma_addr_t dma_addr) {
@@ -586,13 +597,13 @@ int zpci_dma_init_device(struct zpci_dev *zdev) zdev->end_dma - zdev->start_dma + 1); zdev->end_dma = zdev->start_dma + zdev->iommu_size -1 ; zdev->iommu_pages = zdev->iommu_size >>PAGE_SHIFT ; - zdev->iommu_bitmap =vzalloc (zdev->iommu_pages /8 ); + zdev->iommu_bitmap =bitmap_vzalloc (zdev->iommu_pages,GFP_KERNEL );if (!zdev->iommu_bitmap) { rc = -ENOMEM ; goto free_dma_table; }if (!s390_iommu_strict) { - zdev->lazy_bitmap =vzalloc (zdev->iommu_pages /8 ); + zdev->lazy_bitmap =bitmap_vzalloc (zdev->iommu_pages,GFP_KERNEL );if (!zdev->lazy_bitmap) { rc = -ENOMEM ; goto free_bitmap;
arch/x86/include/asm/msr-index.h +4 -0
@@ -446,6 +446,10 @@#define MSR_AMD64_VIRT_SPEC_CTRL 0xc001011f +/* Zen4 */ +#define MSR_ZEN4_BP_CFG 0xc001102e +#define MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT 5 +/* Fam 17h MSRs */ #define MSR_F17H_IRPERF 0xc00000e9
arch/x86/kernel/alternative.c +13 -0
@@ -366,6 +366,17 @@ void __init_or_module noinline apply_alternatives(struct alt_instr *start,u8 insnbuf[MAX_PATCH_LEN ];DPRINTK ("alt table %px, -> %px" , start, end); + +/* +* In the case CONFIG_X86_5LEVEL=y, KASAN_SHADOW_START is defined using +* cpu_feature_enabled(X86_FEATURE_LA57) and is therefore patched here. +* During the process, KASAN becomes confused seeing partial LA57 +* conversion and triggers a false-positive out-of-bound report. +* +* Disable KASAN until the patching is complete. +*/ +kasan_disable_current (); +/* * The scan order should be from start to end. A later scanned * alternative code can overwrite previously scanned alternative code.
@@ -426,6 +437,8 @@ void __init_or_module noinline apply_alternatives(struct alt_instr *start,text_poke_early (instr, insnbuf, insnbuf_sz); } + +kasan_enable_current (); }#ifdef CONFIG_SMP
arch/x86/kernel/cpu/amd.c +8 -0
@@ -72,6 +72,10 @@ static const int amd_zenbleed[] =AMD_MODEL_RANGE (0x17 ,0x90 ,0x0 ,0x91 ,0xf ), AMD_MODEL_RANGE(0x17, 0xa0, 0x0, 0xaf, 0xf)); +static const int amd_erratum_1485[] = +AMD_LEGACY_ERRATUM (AMD_MODEL_RANGE (0x19 ,0x10 ,0x0 ,0x1f ,0xf ), +AMD_MODEL_RANGE (0x19 ,0x60 ,0x0 ,0xaf ,0xf )); +static bool cpu_has_amd_erratum (struct cpuinfo_x86 *cpu,const int *erratum) {int osvw_id = *erratum++;
@@ -1122,6 +1126,10 @@ static void init_amd(struct cpuinfo_x86 *c)check_null_seg_clears_base (c);zenbleed_check (c); + +if (!cpu_has (c,X86_FEATURE_HYPERVISOR ) && +cpu_has_amd_erratum (c, amd_erratum_1485)) +msr_set_bit (MSR_ZEN4_BP_CFG ,MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT ); }#ifdef CONFIG_X86_32
arch/x86/kvm/lapic.c +6 -2
@@ -2201,13 +2201,17 @@ int kvm_apic_local_deliver(struct kvm_lapic *apic, int lvt_type) {u32 reg =kvm_lapic_get_reg (apic, lvt_type);int vector, mode, trig_mode; +int r;if (kvm_apic_hw_enabled (apic) && !(reg &APIC_LVT_MASKED )) { vector = reg &APIC_VECTOR_MASK ; mode = reg &APIC_MODE_MASK ; trig_mode = reg &APIC_LVT_LEVEL_TRIGGER ; -return __apic_accept_irq (apic, mode, vector,1 , trig_mode, -NULL ); + + r =__apic_accept_irq (apic, mode, vector,1 , trig_mode,NULL ); +if (r && lvt_type ==APIC_LVTPC ) +kvm_lapic_set_reg (apic,APIC_LVTPC , reg |APIC_LVT_MASKED ); +return r; }return 0 ; }
drivers/acpi/irq.c +6 -1
@@ -55,6 +55,7 @@ int acpi_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity) {struct irq_fwspec fwspec; +unsigned int irq;if (WARN_ON (!acpi_gsi_domain_id)) {pr_warn ("GSI: No registered irqchip, giving up\n" );
@@ -66,7 +67,11 @@ int acpi_register_gsi(struct device *dev, u32 gsi, int trigger, fwspec.param[1 ] =acpi_dev_get_irq_type (trigger, polarity); fwspec.param_count =2 ; -return irq_create_fwspec_mapping (&fwspec); + irq =irq_create_fwspec_mapping (&fwspec); +if (!irq) +return -EINVAL ; + +return irq; }EXPORT_SYMBOL_GPL (acpi_register_gsi);
drivers/ata/libata-eh.c +1 -1
@@ -2443,7 +2443,7 @@ static void ata_eh_link_report(struct ata_link *link)struct ata_eh_context *ehc = &link->eh_context;struct ata_queued_cmd *qc;const char *frozen, *desc; -char tries_buf[6 ] ="" ; +char tries_buf[16 ] ="" ;int tag, nr_failed =0 ;if (ehc->i.flags &ATA_EHI_QUIET )
drivers/base/regmap/regmap.c +1 -1
@@ -1343,7 +1343,7 @@ static int dev_get_regmap_match(struct device *dev, void *res, void *data)/* If the user didn't specify a name match any */ if (data) -return !strcmp ((*r)->name, data); +return (*r)->name && !strcmp ((*r)->name, data);else return 1 ; }
drivers/bluetooth/hci_vhci.c +3 -0
@@ -82,7 +82,10 @@ static int vhci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)struct vhci_data *data =hci_get_drvdata (hdev);memcpy (skb_push (skb,1 ), &hci_skb_pkt_type (skb),1 ); + +mutex_lock (&data->open_mutex);skb_queue_tail (&data->readq, skb); +mutex_unlock (&data->open_mutex);wake_up_interruptible (&data->read_wait);return 0 ;
drivers/cpuidle/cpuidle.c +8 -4
@@ -140,13 +140,14 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv,* executing it contains RCU usage regarded as invalid in the idle * context, so tell RCU about that. */ -RCU_NONIDLE (tick_freeze ()); +tick_freeze ();/* * The state used here cannot be a "coupled" one, because the "coupled" * cpuidle mechanism enables interrupts and doing that with timekeeping * suspended is generally unsafe. */ stop_critical_timings (); +rcu_idle_enter (); drv->states[index].enter_s2idle (dev, drv, index);if (WARN_ON_ONCE (!irqs_disabled ()))local_irq_disable ();
@@ -155,7 +156,8 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv,* first CPU executing it calls functions containing RCU read-side * critical sections, so tell RCU about that. */ -RCU_NONIDLE (tick_unfreeze ()); +rcu_idle_exit (); +tick_unfreeze ();start_critical_timings (); time_end =ns_to_ktime (local_clock ());
@@ -224,16 +226,18 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,/* Take note of the planned idle state. */ sched_idle_set_state (target_state); -trace_cpu_idle_rcuidle (index, dev->cpu); +trace_cpu_idle (index, dev->cpu); time_start =ns_to_ktime (local_clock ());stop_critical_timings (); +rcu_idle_enter (); entered_state = target_state->enter (dev, drv, index); +rcu_idle_exit ();start_critical_timings ();sched_clock_idle_wakeup_event (); time_end =ns_to_ktime (local_clock ()); -trace_cpu_idle_rcuidle (PWR_EVENT_EXIT , dev->cpu); +trace_cpu_idle (PWR_EVENT_EXIT , dev->cpu);/* The cpu is no longer idle or about to enter idle. */ sched_idle_set_state (NULL );
drivers/dma/stm32-mdma.c +4 -0
@@ -1217,6 +1217,10 @@ static int stm32_mdma_resume(struct dma_chan *c)unsigned long flags;u32 status, reg; +/* Transfer can be terminated */ +if (!chan->desc || (stm32_mdma_read (dmadev,STM32_MDMA_CCR (chan->id)) &STM32_MDMA_CCR_EN )) +return -EPERM ; + hwdesc = chan->desc->node[chan->curr_hwdesc].hwdesc;spin_lock_irqsave (&chan->vchan.lock, flags);
drivers/gpio/gpio-timberdale.c +3 -2
@@ -55,9 +55,10 @@ static int timbgpio_update_bit(struct gpio_chip *gpio, unsigned index, unsigned offset, bool enabled) {struct timbgpio *tgpio =gpiochip_get_data (gpio); +unsigned long flags;u32 reg; -spin_lock (&tgpio->lock); +spin_lock_irqsave (&tgpio->lock, flags); reg =ioread32 (tgpio->membase + offset);if (enabled)
@@ -66,7 +67,7 @@ static int timbgpio_update_bit(struct gpio_chip *gpio, unsigned index, reg &= ~(1 << index);iowrite32 (reg, tgpio->membase + offset); -spin_unlock (&tgpio->lock); +spin_unlock_irqrestore (&tgpio->lock, flags);return 0 ; }
drivers/gpio/gpio-vf610.c +2 -2
@@ -137,14 +137,14 @@ static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,unsigned long mask =BIT (gpio);u32 val; +vf610_gpio_set (chip, gpio, value); +if (port->sdata && port->sdata->have_paddr) { val =vf610_gpio_readl (port->gpio_base +GPIO_PDDR ); val |= mask;vf610_gpio_writel (val, port->gpio_base +GPIO_PDDR ); } -vf610_gpio_set (chip, gpio, value); -return pinctrl_gpio_direction_output (chip->base + gpio); }
drivers/gpu/drm/drm_panel_orientation_quirks.c +16 -0
@@ -44,6 +44,14 @@ static const struct drm_dmi_panel_orientation_data gpd_micropc = { .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, }; +static const struct drm_dmi_panel_orientation_data gpd_onemix2s = { + .width =1200 , + .height =1920 , + .bios_dates = (const char *const []){"05/21/2018" ,"10/26/2018" , +"03/04/2019" ,NULL }, + .orientation =DRM_MODE_PANEL_ORIENTATION_RIGHT_UP , +}; +static const struct drm_dmi_panel_orientation_data gpd_pocket = { .width =1200 , .height =1920 ,
@@ -219,6 +227,14 @@ static const struct dmi_system_id orientation_data[] = { DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "LTH17"), }, .driver_data = (void *)&lcd800x1280_rightside_up, + }, { /* One Mix 2S (generic strings, also match on bios date) */ + .matches = { + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"), + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Default string"), + DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"), + }, + .driver_data = (void *)&gpd_onemix2s, }, {} };
drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c +1 -1
@@ -96,7 +96,7 @@ static int etnaviv_gem_prime_mmap_obj(struct etnaviv_gem_object *etnaviv_obj, ret =dma_buf_mmap (etnaviv_obj->base.dma_buf, vma,0 );if (!ret) {/* Drop the reference acquired by drm_gem_mmap_obj(). */ -drm_gem_object_put (&etnaviv_obj->base); +drm_gem_object_put_unlocked (&etnaviv_obj->base); }return ret;
drivers/gpu/drm/msm/dsi/dsi_host.c +12 -0
@@ -1059,9 +1059,21 @@ static void dsi_wait4video_done(struct msm_dsi_host *msm_host)static void dsi_wait4video_eng_busy (struct msm_dsi_host *msm_host) { +u32 data; +if (!(msm_host->mode_flags &MIPI_DSI_MODE_VIDEO ))return ; + data =dsi_read (msm_host,REG_DSI_STATUS0 ); + +/* if video mode engine is not busy, its because +* either timing engine was not turned on or the +* DSI controller has finished transmitting the video +* data already, so no need to wait in those cases +*/ +if (!(data &DSI_STATUS0_VIDEO_MODE_ENGINE_BUSY )) +return ; +if (msm_host->power_on && msm_host->enabled) {dsi_wait4video_done (msm_host);/* delay 4 ms to skip BLLP */
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +1 -1
@@ -1834,7 +1834,7 @@ static int vmw_cmd_tex_state(struct vmw_private *dev_priv, } *cmd;SVGA3dTextureState *last_state = (SVGA3dTextureState *) - ((unsigned long ) header + header->size +sizeof (header)); + ((unsigned long ) header + header->size +sizeof (*header));SVGA3dTextureState *cur_state = (SVGA3dTextureState *) ((unsigned long ) header +sizeof (struct vmw_tex_state_cmd ));struct vmw_resource_val_node *ctx_node;
drivers/hid/hid-holtek-kbd.c +4 -0
@@ -133,6 +133,10 @@ static int holtek_kbd_input_event(struct input_dev *dev, unsigned int type,return -ENODEV ; boot_hid =usb_get_intfdata (boot_interface); +if (list_empty (&boot_hid->inputs)) { +hid_err (hid,"no inputs found\n" ); +return -ENODEV ; + } boot_hid_input =list_first_entry (&boot_hid->inputs, struct hid_input, list);
drivers/hid/hid-logitech-hidpp.c +2 -1
@@ -3129,7 +3129,8 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)/* Allow incoming packets */ hid_device_io_start (hdev); -hidpp_connect_event (hidpp); +schedule_work (&hidpp->work); +flush_work (&hidpp->work);return ret;
drivers/i2c/i2c-mux.c +1 -1
@@ -334,7 +334,7 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc, priv->adap.lock_ops = &i2c_parent_lock_ops;/* Sanity check on class */ -if (i2c_mux_parent_classes (parent) & class) +if (i2c_mux_parent_classes (parent) & class & ~I2C_CLASS_DEPRECATED )dev_err (&parent->dev,"Segment %d behind mux can't share classes with ancestors\n" , chan_id);
drivers/iio/pressure/bmp280-core.c +1 -1
@@ -1110,7 +1110,7 @@ int bmp280_common_probe(struct device *dev,* however as it happens, the BMP085 shares the chip ID of BMP180 * so we look for an IRQ if we have that. */ -if (irq >0 || (chip_id ==BMP180_CHIP_ID )) { +if (irq >0 && (chip_id ==BMP180_CHIP_ID )) { ret =bmp085_fetch_eoc_irq (dev, name, irq, data);if (ret) goto out_disable_vdda;
drivers/iio/pressure/ms5611_core.c +1 -1
@@ -79,7 +79,7 @@ static bool ms5611_prom_is_valid(u16 *prom, size_t len) crc = (crc >>12 ) &0x000F ; -return crc_orig !=0x0000 && crc == crc_orig; +return crc == crc_orig; }static int ms5611_read_prom (struct iio_dev *indio_dev)
drivers/infiniband/hw/cxgb4/cm.c +3 -0
@@ -1922,6 +1922,9 @@ static int send_fw_act_open_req(struct c4iw_ep *ep, unsigned int atid)int win; skb =get_skb (NULL ,sizeof (*req),GFP_KERNEL ); +if (!skb) +return -ENOMEM ; + req =__skb_put_zero (skb,sizeof (*req)); req->op_compl =htonl (WR_OP_V (FW_OFLD_CONNECTION_WR )); req->len16_pkd =htonl (FW_WR_LEN16_V (DIV_ROUND_UP (sizeof (*req),16 )));
drivers/input/joystick/xpad.c +2 -0
@@ -266,6 +266,7 @@ static const struct xpad_device { { 0x1038, 0x1430, "SteelSeries Stratus Duo", 0, XTYPE_XBOX360 }, { 0x1038, 0x1431, "SteelSeries Stratus Duo", 0, XTYPE_XBOX360 }, { 0x11c9, 0x55f0, "Nacon GC-100XF", 0, XTYPE_XBOX360 }, + { 0x11ff, 0x0511, "PXN V900", 0, XTYPE_XBOX360 }, { 0x1209, 0x2882, "Ardwiino Controller", 0, XTYPE_XBOX360 }, { 0x12ab, 0x0004, "Honey Bee Xbox360 dancepad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, { 0x12ab, 0x0301, "PDP AFTERGLOW AX.1", 0, XTYPE_XBOX360 },
@@ -460,6 +461,7 @@ static const struct usb_device_id xpad_table[] = {XPAD_XBOXONE_VENDOR (0x0f0d ),/* Hori Controllers */ XPAD_XBOX360_VENDOR (0x1038 ),/* SteelSeries Controllers */ XPAD_XBOX360_VENDOR (0x11c9 ),/* Nacon GC100XF */ +XPAD_XBOX360_VENDOR (0x11ff ),/* PXN V900 */ XPAD_XBOX360_VENDOR (0x1209 ),/* Ardwiino Controllers */ XPAD_XBOX360_VENDOR (0x12ab ),/* X-Box 360 dance pads */ XPAD_XBOX360_VENDOR(0x1430), /* RedOctane X-Box 360 controllers */
drivers/input/misc/powermate.c +1 -0
@@ -424,6 +424,7 @@ static void powermate_disconnect(struct usb_interface *intf) pm->requires_update =0 ;usb_kill_urb (pm->irq);input_unregister_device (pm->input); +usb_kill_urb (pm->config);usb_free_urb (pm->irq);usb_free_urb (pm->config);powermate_free_buffers (interface_to_usbdev (intf), pm);
drivers/input/mouse/elantech.c +1 -0
@@ -1996,6 +1996,7 @@ static int elantech_setup_ps2(struct psmouse *psmouse, psmouse->protocol_handler = elantech_process_byte; psmouse->disconnect = elantech_disconnect; psmouse->reconnect = elantech_reconnect; + psmouse->fast_reconnect =NULL ; psmouse->pktsize = info->hw_version >1 ?6 :4 ;return 0 ;
drivers/input/mouse/synaptics.c +1 -0
@@ -1620,6 +1620,7 @@ static int synaptics_init_ps2(struct psmouse *psmouse, psmouse->set_rate = synaptics_set_rate; psmouse->disconnect = synaptics_disconnect; psmouse->reconnect = synaptics_reconnect; + psmouse->fast_reconnect =NULL ; psmouse->cleanup = synaptics_reset;/* Synaptics can usually stay in sync without extra help */ psmouse->resync_time =0 ;
drivers/mcb/mcb-core.c +3 -7
@@ -392,17 +392,13 @@ EXPORT_SYMBOL_GPL(mcb_free_dev);static int __mcb_bus_add_devices (struct device *dev,void *data) { -struct mcb_device *mdev =to_mcb_device (dev);int retval; -if (mdev->is_added) -return 0 ; - retval =device_attach (dev); -if (retval <0 ) +if (retval <0 ) {dev_err (dev,"Error adding device (%d)\n" , retval); - - mdev->is_added = true; +return retval; + }return 0 ; }
drivers/mcb/mcb-parse.c +0 -2
@@ -98,8 +98,6 @@ static int chameleon_parse_gdd(struct mcb_bus *bus, mdev->mem.end = mdev->mem.start + size -1 ; mdev->mem.flags =IORESOURCE_MEM ; - mdev->is_added = false; - ret =mcb_device_register (bus, mdev);if (ret <0 ) goto err;
drivers/mmc/core/mmc.c +1 -1
@@ -98,7 +98,7 @@ static int mmc_decode_cid(struct mmc_card *card)case 3 :/* MMC v3.1 - v3.3 */ case 4 :/* MMC v4 */ card->cid.manfid =UNSTUFF_BITS (resp,120 ,8 ); - card->cid.oemid =UNSTUFF_BITS (resp,104 ,16 ); + card->cid.oemid =UNSTUFF_BITS (resp,104 ,8 ); card->cid.prod_name[0 ] =UNSTUFF_BITS (resp,96 ,8 ); card->cid.prod_name[1 ] =UNSTUFF_BITS (resp,88 ,8 ); card->cid.prod_name[2 ] =UNSTUFF_BITS (resp,80 ,8 );
drivers/mtd/nand/raw/qcom_nandc.c +1 -1
@@ -2987,7 +2987,7 @@ static int qcom_nandc_probe(struct platform_device *pdev) err_aon_clk:clk_disable_unprepare (nandc->core_clk); err_core_clk: -dma_unmap_resource (dev, res->start,resource_size (res), +dma_unmap_resource (dev, nandc->base_dma,resource_size (res),DMA_BIDIRECTIONAL ,0 );return ret; }
drivers/mtd/nand/spi/micron.c +1 -1
@@ -12,7 +12,7 @@#define SPINAND_MFR_MICRON 0x2c -#define MICRON_STATUS_ECC_MASK GENMASK(7, 4) +#define MICRON_STATUS_ECC_MASK GENMASK(6, 4)#define MICRON_STATUS_ECC_NO_BITFLIPS (0 << 4)#define MICRON_STATUS_ECC_1TO3_BITFLIPS (1 << 4)#define MICRON_STATUS_ECC_4TO6_BITFLIPS (3 << 4)
drivers/net/ethernet/intel/i40e/i40e_common.c +2 -2
@@ -1332,7 +1332,7 @@ void i40e_clear_hw(struct i40e_hw *hw)I40E_PFLAN_QALLOC_FIRSTQ_SHIFT ; j = (val &I40E_PFLAN_QALLOC_LASTQ_MASK ) >>I40E_PFLAN_QALLOC_LASTQ_SHIFT ; -if (val &I40E_PFLAN_QALLOC_VALID_MASK ) +if (val &I40E_PFLAN_QALLOC_VALID_MASK && j >= base_queue) num_queues = (j - base_queue) +1 ;else num_queues =0 ;
@@ -1342,7 +1342,7 @@ void i40e_clear_hw(struct i40e_hw *hw)I40E_PF_VT_PFALLOC_FIRSTVF_SHIFT ; j = (val &I40E_PF_VT_PFALLOC_LASTVF_MASK ) >>I40E_PF_VT_PFALLOC_LASTVF_SHIFT ; -if (val &I40E_PF_VT_PFALLOC_VALID_MASK ) +if (val &I40E_PF_VT_PFALLOC_VALID_MASK && j >= i) num_vfs = (j - i) +1 ;else num_vfs =0 ;
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +3 -2
@@ -28,6 +28,9 @@ static inline void ixgbe_alloc_vf_macvlans(struct ixgbe_adapter *adapter,struct vf_macvlans *mv_list;int num_vf_macvlans, i; +/* Initialize list of VF macvlans */ +INIT_LIST_HEAD (&adapter->vf_mvs.l); + num_vf_macvlans = hw->mac.num_rar_entries - (IXGBE_MAX_PF_MACVLANS +1 + num_vfs);if (!num_vf_macvlans)
@@ -36,8 +39,6 @@ static inline void ixgbe_alloc_vf_macvlans(struct ixgbe_adapter *adapter, mv_list =kcalloc (num_vf_macvlans,sizeof (struct vf_macvlans ),GFP_KERNEL );if (mv_list) { -/* Initialize list of VF macvlans */ -INIT_LIST_HEAD (&adapter->vf_mvs.l);for (i =0 ; i < num_vf_macvlans; i++) { mv_list[i].vf =-1 ; mv_list[i].free = true;
drivers/net/ethernet/marvell/sky2.h +1 -1
@@ -2201,7 +2201,7 @@ struct rx_ring_info {struct sk_buff *skb;dma_addr_t data_addr;DEFINE_DMA_UNMAP_LEN (data_size); -dma_addr_t frag_addr[ETH_JUMBO_MTU >>PAGE_SHIFT ]; +dma_addr_t frag_addr[ETH_JUMBO_MTU >>PAGE_SHIFT ?:1 ]; };enum flow_control {
drivers/net/ieee802154/ca8210.c +3 -14
@@ -2781,7 +2781,6 @@ static int ca8210_register_ext_clock(struct spi_device *spi)struct device_node *np = spi->dev.of_node;struct ca8210_priv *priv =spi_get_drvdata (spi);struct ca8210_platform_data *pdata = spi->dev.platform_data; -int ret =0 ;if (!np)return -EFAULT ;
@@ -2798,18 +2797,8 @@ static int ca8210_register_ext_clock(struct spi_device *spi)dev_crit (&spi->dev,"Failed to register external clk\n" );return PTR_ERR (priv->clk); } - ret =of_clk_add_provider (np, of_clk_src_simple_get, priv->clk); -if (ret) { -clk_unregister (priv->clk); -dev_crit ( - &spi->dev, -"Failed to register external clock as clock provider\n" - ); - }else { -dev_info (&spi->dev,"External clock set as clock provider\n" ); - } -return ret; +return of_clk_add_provider (np, of_clk_src_simple_get, priv->clk); }/**
@@ -2821,8 +2810,8 @@ static void ca8210_unregister_ext_clock(struct spi_device *spi) {struct ca8210_priv *priv =spi_get_drvdata (spi); -if (!priv->clk) -return +if (IS_ERR_OR_NULL (priv->clk)) +return ;of_clk_del_provider (spi->dev.of_node);clk_unregister (priv->clk);
drivers/net/usb/dm9601.c +6 -1
@@ -221,13 +221,18 @@ static int dm9601_mdio_read(struct net_device *netdev, int phy_id, int loc)struct usbnet *dev =netdev_priv (netdev);__le16 res; +int err;if (phy_id) {netdev_dbg (dev->net,"Only internal phy supported\n" );return 0 ; } -dm_read_shared_word (dev,1 , loc, &res); + err =dm_read_shared_word (dev,1 , loc, &res); +if (err <0 ) { +netdev_err (dev->net,"MDIO read error: %d\n" , err); +return err; + } netdev_dbg(dev->net, "dm9601_mdio_read() phy_id=0x%02x, loc=0x%02x, returns=0x%04x\n",
drivers/net/usb/smsc95xx.c +1 -1
@@ -1054,7 +1054,7 @@ static int smsc95xx_reset(struct usbnet *dev)if (timeout >=100 ) {netdev_warn (dev->net,"timeout waiting for completion of Lite Reset\n" ); -return ret; +return -ETIMEDOUT ; } ret =smsc95xx_write_reg (dev,PM_CTRL ,PM_CTL_PHY_RST_ );
drivers/net/xen-netback/interface.c +0 -3
@@ -41,7 +41,6 @@#include <asm/xen/hypercall.h> #include <xen/balloon.h> -#define XENVIF_QUEUE_LENGTH 32#define XENVIF_NAPI_WEIGHT 64/* Number of bytes allowed on the internal guest Rx queue. */
@@ -526,8 +525,6 @@ struct xenvif *xenvif_alloc(struct device *parent, domid_t domid, dev->features = dev->hw_features |NETIF_F_RXCSUM ; dev->ethtool_ops = &xenvif_ethtool_ops; - dev->tx_queue_len =XENVIF_QUEUE_LENGTH ; - dev->min_mtu =ETH_MIN_MTU ; dev->max_mtu =ETH_MAX_MTU -VLAN_ETH_HLEN ;
drivers/phy/motorola/phy-mapphone-mdm6600.c +1 -0
@@ -612,6 +612,7 @@ static int phy_mdm6600_remove(struct platform_device *pdev)struct phy_mdm6600 *ddata =platform_get_drvdata (pdev);struct gpio_desc *reset_gpio = ddata->ctrl_gpios[PHY_MDM6600_RESET ]; +pm_runtime_get_noresume (ddata->dev);pm_runtime_dont_use_autosuspend (ddata->dev);pm_runtime_put_sync (ddata->dev);pm_runtime_disable (ddata->dev);
drivers/usb/core/hub.c +24 -4
@@ -147,6 +147,10 @@ int usb_device_supports_lpm(struct usb_device *udev)if (udev->quirks &USB_QUIRK_NO_LPM )return 0 ; +/* Skip if the device BOS descriptor couldn't be read */ +if (!udev->bos) +return 0 ; +/* USB 2.1 (and greater) devices indicate LPM support through * their USB 2.0 Extended Capabilities BOS descriptor. */
@@ -323,6 +327,10 @@ static void usb_set_lpm_parameters(struct usb_device *udev)if (!udev->lpm_capable || udev->speed <USB_SPEED_SUPER )return ; +/* Skip if the device BOS descriptor couldn't be read */ +if (!udev->bos) +return ; + hub =usb_hub_to_struct_hub (udev->parent);/* It doesn't take time to transition the roothub into U0, since it * doesn't have an upstream link.
@@ -2644,7 +2652,8 @@ int usb_authorize_device(struct usb_device *usb_dev) }/* -* Return 1 if port speed is SuperSpeedPlus, 0 otherwise +* Return 1 if port speed is SuperSpeedPlus, 0 otherwise or if the +* capability couldn't be checked. * check it from the link protocol field of the current speed ID attribute. * current speed ID is got from ext port status request. Sublink speed attribute * table is returned with the hub BOS SSP device capability descriptor
@@ -2654,8 +2663,12 @@ static int port_speed_is_ssp(struct usb_device *hdev, int speed_id)int ssa_count;u32 ss_attr;int i; -struct usb_ssp_cap_descriptor *ssp_cap = hdev->bos->ssp_cap; +struct usb_ssp_cap_descriptor *ssp_cap; +if (!hdev->bos) +return 0 ; + + ssp_cap = hdev->bos->ssp_cap;if (!ssp_cap)return 0 ;
@@ -4057,8 +4070,15 @@ static void usb_enable_link_state(struct usb_hcd *hcd, struct usb_device *udev, enum usb3_link_state state) {int timeout, ret; -__u8 u1_mel = udev->bos->ss_cap->bU1devExitLat; -__le16 u2_mel = udev->bos->ss_cap->bU2DevExitLat; +__u8 u1_mel; +__le16 u2_mel; + +/* Skip if the device BOS descriptor couldn't be read */ +if (!udev->bos) +return ; + + u1_mel = udev->bos->ss_cap->bU1devExitLat; + u2_mel = udev->bos->ss_cap->bU2DevExitLat;/* If the device says it doesn't have *any* exit latency to come out of * U1 or U2, it's probably lying. Assume it doesn't implement that link
drivers/usb/core/hub.h +1 -1
@@ -139,7 +139,7 @@ static inline int hub_is_superspeedplus(struct usb_device *hdev) {return (hdev->descriptor.bDeviceProtocol ==USB_HUB_PR_SS &&le16_to_cpu (hdev->descriptor.bcdUSB) >=0x0310 && - hdev->bos->ssp_cap); + hdev->bos && hdev->bos->ssp_cap); }static inline unsigned hub_power_on_good_delay (struct usb_hub *hub)
drivers/usb/dwc3/core.c +38 -1
@@ -244,9 +244,46 @@ static int dwc3_core_soft_reset(struct dwc3 *dwc)* XHCI driver will reset the host block. If dwc3 was configured for * host-only mode or current role is host, then we can return early. */ -if (dwc->dr_mode ==USB_DR_MODE_HOST || dwc->current_dr_role ==DWC3_GCTL_PRTCAP_HOST ) +if (dwc->current_dr_role ==DWC3_GCTL_PRTCAP_HOST )return 0 ; +/* +* If the dr_mode is host and the dwc->current_dr_role is not the +* corresponding DWC3_GCTL_PRTCAP_HOST, then the dwc3_core_init_mode +* isn't executed yet. Ensure the phy is ready before the controller +* updates the GCTL.PRTCAPDIR or other settings by soft-resetting +* the phy. +* +* Note: GUSB3PIPECTL[n] and GUSB2PHYCFG[n] are port settings where n +* is port index. If this is a multiport host, then we need to reset +* all active ports. +*/ +if (dwc->dr_mode ==USB_DR_MODE_HOST ) { +u32 usb3_port; +u32 usb2_port; + + usb3_port =dwc3_readl (dwc->regs,DWC3_GUSB3PIPECTL (0 )); + usb3_port |=DWC3_GUSB3PIPECTL_PHYSOFTRST ; +dwc3_writel (dwc->regs,DWC3_GUSB3PIPECTL (0 ), usb3_port); + + usb2_port =dwc3_readl (dwc->regs,DWC3_GUSB2PHYCFG (0 )); + usb2_port |=DWC3_GUSB2PHYCFG_PHYSOFTRST ; +dwc3_writel (dwc->regs,DWC3_GUSB2PHYCFG (0 ), usb2_port); + +/* Small delay for phy reset assertion */ +usleep_range (1000 ,2000 ); + + usb3_port &= ~DWC3_GUSB3PIPECTL_PHYSOFTRST ; +dwc3_writel (dwc->regs,DWC3_GUSB3PIPECTL (0 ), usb3_port); + + usb2_port &= ~DWC3_GUSB2PHYCFG_PHYSOFTRST ; +dwc3_writel (dwc->regs,DWC3_GUSB2PHYCFG (0 ), usb2_port); + +/* Wait for clock synchronization */ +msleep (50 ); +return 0 ; + } + reg =dwc3_readl (dwc->regs,DWC3_DCTL ); reg |=DWC3_DCTL_CSFTRST ;dwc3_writel (dwc->regs,DWC3_DCTL , reg);
drivers/usb/gadget/function/f_ncm.c +19 -7
@@ -1180,7 +1180,8 @@ static int ncm_unwrap_ntb(struct gether *port, struct sk_buff_head *list) {struct f_ncm *ncm =func_to_ncm (&port->func); -__le16 *tmp = (void *) skb->data; +unsigned char *ntb_ptr = skb->data; +__le16 *tmp;unsigned index, index2;int ndp_index;unsigned dg_len, dg_len2;
@@ -1193,6 +1194,10 @@ static int ncm_unwrap_ntb(struct gether *port,const struct ndp_parser_opts *opts = ncm->parser_opts;unsigned crc_len = ncm->is_crc ?sizeof (uint32_t ) :0 ;int dgram_counter; +int to_process = skb->len; + +parse_ntb: + tmp = (__le16 *)ntb_ptr;/* dwSignature */ if (get_unaligned_le32 (tmp) != opts->nth_sign) {
@@ -1239,7 +1244,7 @@ static int ncm_unwrap_ntb(struct gether *port,* walk through NDP * dwSignature */ - tmp = (void *)(skb->data + ndp_index); + tmp = (__le16 *)(ntb_ptr + ndp_index);if (get_unaligned_le32 (tmp) != ncm->ndp_sign) {INFO (port->func.config->cdev,"Wrong NDP SIGN\n" ); goto err;
@@ -1296,11 +1301,11 @@ static int ncm_unwrap_ntb(struct gether *port,if (ncm->is_crc) {uint32_t crc, crc2; - crc =get_unaligned_le32 (skb->data + + crc =get_unaligned_le32 (ntb_ptr + index + dg_len - crc_len); crc2 = ~crc32_le (~0 , - skb->data + index, + ntb_ptr + index, dg_len - crc_len);if (crc != crc2) { INFO(port->func.config->cdev,
@@ -1327,7 +1332,7 @@ static int ncm_unwrap_ntb(struct gether *port, dg_len - crc_len);if (skb2 ==NULL ) goto err; -skb_put_data (skb2, skb->data + index, +skb_put_data (skb2, ntb_ptr + index, dg_len - crc_len);skb_queue_tail (list, skb2);
@@ -1340,10 +1345,17 @@ static int ncm_unwrap_ntb(struct gether *port, }while (ndp_len >2 * (opts->dgram_item_len *2 )); }while (ndp_index); -dev_consume_skb_any (skb); -VDBG (port->func.config->cdev,"Parsed NTB with %d frames\n" , dgram_counter); + + to_process -= block_len; +if (to_process !=0 ) { + ntb_ptr = (unsigned char *)(ntb_ptr + block_len); + goto parse_ntb; + } + +dev_consume_skb_any (skb); +return 0 ; err:skb_queue_purge (list);
drivers/usb/gadget/udc/udc-xilinx.c +12 -8
@@ -496,11 +496,13 @@ static int xudc_eptxrx(struct xusb_ep *ep, struct xusb_req *req,/* Get the Buffer address and copy the transmit data.*/ eprambase = (u32 __force *)(udc->addr + ep->rambase);if (ep->is_in) { -memcpy (eprambase, bufferptr, bytestosend); +memcpy_toio ((void __iomem *)eprambase, bufferptr, + bytestosend); udc->write_fn (udc->addr, ep->offset +XUSB_EP_BUF0COUNT_OFFSET , bufferlen); }else { -memcpy (bufferptr, eprambase, bytestosend); +memcpy_toio ((void __iomem *)bufferptr, eprambase, + bytestosend); }/* * Enable the buffer for transmission.
@@ -514,11 +516,13 @@ static int xudc_eptxrx(struct xusb_ep *ep, struct xusb_req *req, eprambase = (u32 __force *)(udc->addr + ep->rambase + ep->ep_usb.maxpacket);if (ep->is_in) { -memcpy (eprambase, bufferptr, bytestosend); +memcpy_toio ((void __iomem *)eprambase, bufferptr, + bytestosend); udc->write_fn (udc->addr, ep->offset +XUSB_EP_BUF1COUNT_OFFSET , bufferlen); }else { -memcpy (bufferptr, eprambase, bytestosend); +memcpy_toio ((void __iomem *)bufferptr, eprambase, + bytestosend); }/* * Enable the buffer for transmission.
@@ -1020,7 +1024,7 @@ static int __xudc_ep0_queue(struct xusb_ep *ep0, struct xusb_req *req) udc->addr); length = req->usb_req.actual =min_t (u32, length,EP0_MAX_PACKET ); -memcpy (corebuf, req->usb_req.buf, length); +memcpy_toio ((void __iomem *)corebuf, req->usb_req.buf, length); udc->write_fn (udc->addr,XUSB_EP_BUF0COUNT_OFFSET , length); udc->write_fn (udc->addr,XUSB_BUFFREADY_OFFSET ,1 ); }else {
@@ -1746,7 +1750,7 @@ static void xudc_handle_setup(struct xusb_udc *udc)/* Load up the chapter 9 command buffer.*/ ep0rambase = (u32 __force *) (udc->addr +XUSB_SETUP_PKT_ADDR_OFFSET ); -memcpy (&setup, ep0rambase,8 ); +memcpy_toio ((void __iomem *)&setup, ep0rambase,8 ); udc->setup = setup; udc->setup.wValue =cpu_to_le16 (setup.wValue);
@@ -1833,7 +1837,7 @@ static void xudc_ep0_out(struct xusb_udc *udc) (ep0->rambase << 2)); buffer = req->usb_req.buf + req->usb_req.actual; req->usb_req.actual = req->usb_req.actual + bytes_to_rx; -memcpy (buffer, ep0rambase, bytes_to_rx); +memcpy_toio ((void __iomem *)buffer, ep0rambase, bytes_to_rx);if (req->usb_req.length == req->usb_req.actual) {/* Data transfer completed get ready for Status stage */
@@ -1909,7 +1913,7 @@ static void xudc_ep0_in(struct xusb_udc *udc) (ep0->rambase << 2)); buffer = req->usb_req.buf + req->usb_req.actual; req->usb_req.actual = req->usb_req.actual + length; -memcpy (ep0rambase, buffer, length); +memcpy_toio ((void __iomem *)ep0rambase, buffer, length); } udc->write_fn (udc->addr,XUSB_EP_BUF0COUNT_OFFSET , count); udc->write_fn (udc->addr,XUSB_BUFFREADY_OFFSET ,1 );
drivers/usb/host/xhci-ring.c +2 -2
@@ -689,7 +689,7 @@ static void xhci_giveback_urb_in_irq(struct xhci_hcd *xhci,static void xhci_unmap_td_bounce_buffer (struct xhci_hcd *xhci,struct xhci_ring *ring,struct xhci_td *td) { -struct device *dev =xhci_to_hcd (xhci)->self.controller; +struct device *dev =xhci_to_hcd (xhci)->self.sysdev;struct xhci_segment *seg = td->bounce_seg;struct urb *urb = td->urb;size_t len;
@@ -3199,7 +3199,7 @@ static u32 xhci_td_remainder(struct xhci_hcd *xhci, int transferred,static int xhci_align_td (struct xhci_hcd *xhci,struct urb *urb,u32 enqd_len,u32 *trb_buff_len,struct xhci_segment *seg) { -struct device *dev =xhci_to_hcd (xhci)->self.controller; +struct device *dev =xhci_to_hcd (xhci)->self.sysdev;unsigned int unalign;unsigned int max_pkt;u32 new_buff_len;
drivers/usb/musb/musb_debugfs.c +1 -1
@@ -39,7 +39,7 @@ static const struct musb_register_map musb_regmap[] = { { "IntrUsbE", MUSB_INTRUSBE, 8 }, { "DevCtl", MUSB_DEVCTL, 8 }, { "VControl", 0x68, 32 }, - { "HWVers", 0x69, 16 }, + { "HWVers", MUSB_HWVERS, 16 }, { "LinkInfo", MUSB_LINKINFO, 8 }, { "VPLen", MUSB_VPLEN, 8 }, { "HS_EOF1", MUSB_HS_EOF1, 8 },
drivers/usb/musb/musb_host.c +8 -1
@@ -339,10 +339,16 @@ static void musb_advance_schedule(struct musb *musb, struct urb *urb,musb_giveback (musb, urb, status); qh->is_ready = ready; +/* +* musb->lock had been unlocked in musb_giveback, so qh may +* be freed, need to get it again +*/ + qh =musb_ep_get_qh (hw_ep, is_in); +/* reclaim resources (and bandwidth) ASAP; deschedule it, and * invalidate qh as soon as list_empty(&hep->urb_list) */ -if (list_empty (&qh->hep->urb_list)) { +if (qh &&list_empty (&qh->hep->urb_list)) {struct list_head *head;struct dma_controller *dma = musb->dma_controller;
@@ -2424,6 +2430,7 @@ static int musb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)* and its URB list has emptied, recycle this qh. */ if (ready &&list_empty (&qh->hep->urb_list)) { +musb_ep_set_qh (qh->hw_ep, is_in,NULL ); qh->hep->hcpriv =NULL ;list_del (&qh->ring);kfree (qh);
drivers/usb/serial/option.c +7 -0
@@ -203,6 +203,9 @@ static void option_instat_callback(struct urb *urb);#define DELL_PRODUCT_5829E_ESIM 0x81e4#define DELL_PRODUCT_5829E 0x81e6 +#define DELL_PRODUCT_FM101R 0x8213 +#define DELL_PRODUCT_FM101R_ESIM 0x8215 +#define KYOCERA_VENDOR_ID 0x0c88#define KYOCERA_PRODUCT_KPC650 0x17da#define KYOCERA_PRODUCT_KPC680 0x180a
@@ -1108,6 +1111,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = RSVD(0) | RSVD(6) }, { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5829E_ESIM), .driver_info = RSVD(0) | RSVD(6) }, + { USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_FM101R, 0xff) }, + { USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_FM101R_ESIM, 0xff) }, { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, /* ADU-E100, ADU-310 */ { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) },
@@ -1290,6 +1295,7 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1033, 0xff), /* Telit LE910C1-EUX (ECM) */ .driver_info = NCTRL(0) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1035, 0xff) }, /* Telit LE910C4-WWX (ECM) */ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG0), .driver_info = RSVD(0) | RSVD(1) | NCTRL(2) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG1),
@@ -2262,6 +2268,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */ { USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) }, { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) }, + { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x40) }, { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff, 0, 0) }, { } /* Terminating entry */
fs/btrfs/extent-tree.c +3 -3
@@ -2327,12 +2327,12 @@ static int run_delayed_tree_ref(struct btrfs_trans_handle *trans, parent = ref->parent; ref_root = ref->root; -if (node->ref_mod !=1 ) { +if (unlikely (node->ref_mod !=1 )) {btrfs_err (trans->fs_info, -"btree block(%llu) has %d references rather than 1: action %d ref_root %llu parent %llu" , +"btree block %llu has %d references rather than 1: action %d ref_root %llu parent %llu" , node->bytenr, node->ref_mod, node->action, ref_root, parent); -return -EIO ; +return -EUCLEAN ; }if (node->action ==BTRFS_ADD_DELAYED_REF && insert_reserved) {BUG_ON (!extent_op || !extent_op->update_flags);
fs/btrfs/ioctl.c +2 -2
@@ -4526,7 +4526,7 @@ static void get_block_group_info(struct list_head *groups_list,static long btrfs_ioctl_space_info (struct btrfs_fs_info *fs_info,void __user *arg) { -struct btrfs_ioctl_space_args space_args; +struct btrfs_ioctl_space_args space_args = {0 };struct btrfs_ioctl_space_info space;struct btrfs_ioctl_space_info *dest;struct btrfs_ioctl_space_info *dest_orig;
@@ -5884,7 +5884,7 @@ static int _btrfs_ioctl_send(struct file *file, void __user *argp, bool compat)if (compat) {#if defined(CONFIG_64BIT ) && defined(CONFIG_COMPAT ) -struct btrfs_ioctl_send_args_32 args32; +struct btrfs_ioctl_send_args_32 args32 = {0 }; ret =copy_from_user (&args32, argp,sizeof (args32));if (ret)
fs/btrfs/tree-log.c +1 -1
@@ -4236,7 +4236,7 @@ static int btrfs_log_prealloc_extents(struct btrfs_trans_handle *trans,struct extent_buffer *leaf;int slot;int ins_nr =0 ; -int start_slot; +int start_slot =0 ;int ret;if (!(inode->flags &BTRFS_INODE_PREALLOC ))
fs/ceph/inode.c +1 -3
@@ -631,9 +631,7 @@ int ceph_fill_file_size(struct inode *inode, int issued, ci->i_truncate_seq = truncate_seq;/* the MDS should have revoked these caps */ -WARN_ON_ONCE (issued & (CEPH_CAP_FILE_EXCL | -CEPH_CAP_FILE_RD | -CEPH_CAP_FILE_WR | +WARN_ON_ONCE (issued & (CEPH_CAP_FILE_RD |CEPH_CAP_FILE_LAZYIO ));/* * If we hold relevant caps, or in the case where we're
fs/overlayfs/copy_up.c +1 -1
@@ -195,7 +195,7 @@ static int ovl_set_timestamps(struct dentry *upperdentry, struct kstat *stat) {struct iattr attr = { .ia_valid = -ATTR_ATIME |ATTR_MTIME |ATTR_ATIME_SET |ATTR_MTIME_SET , +ATTR_ATIME |ATTR_MTIME |ATTR_ATIME_SET |ATTR_MTIME_SET |ATTR_CTIME , .ia_atime = stat->atime, .ia_mtime = stat->mtime, };
fs/quota/dquot.c +39 -27
134 lines not on this page · raw message
include/linux/indirect_call_wrapper.h new file +51 -0
51 lines not on this page · raw message
include/linux/mcb.h +0 -1
@@ -66,7 +66,6 @@ static inline struct mcb_bus *to_mcb_bus(struct device *dev)struct mcb_device {struct device dev;struct mcb_bus *bus; -bool is_added;struct mcb_driver *driver;u16 id;int inst;
include/linux/netdevice.h +1 -1
@@ -3661,7 +3661,7 @@ static __always_inline int ____dev_forward_skb(struct net_device *dev,return NET_RX_DROP ; } -skb_scrub_packet (skb, true); +skb_scrub_packet (skb, !net_eq (dev_net (dev),dev_net (skb->dev))); skb->priority =0 ;return 0 ; }
include/linux/perf_event.h +1 -0
@@ -593,6 +593,7 @@ struct perf_event {/* The cumulative AND of all event_caps for events in this group. */ int group_caps; +unsigned int group_generation;struct perf_event *group_leader;struct pmu *pmu;void *pmu_private;
include/linux/quota.h +3 -1
@@ -285,7 +285,9 @@ static inline void dqstats_dec(unsigned int type)#define DQ_FAKE_B 3/* no limits only usage */ #define DQ_READ_B 4/* dquot was read into memory */ #define DQ_ACTIVE_B 5/* dquot is active (dquot_release not called) */ -#define DQ_LASTSET_B 6/* Following 6 bits (see QIF_) are reserved\ +#define DQ_RELEASING_B 6/* dquot is in releasing_dquots list waiting +* to be cleaned up */ +#define DQ_LASTSET_B 7/* Following 6 bits (see QIF_) are reserved\ * for the mask of entries set via SETQUOTA\ * quotactl. They are set under dq_data_lock\ * and the quota format handling dquot can\
include/linux/quotaops.h +1 -1
@@ -59,7 +59,7 @@ static inline bool dquot_is_busy(struct dquot *dquot) {if (test_bit (DQ_MOD_B , &dquot->dq_flags))return true; -if (atomic_read (&dquot->dq_count) >1 ) +if (atomic_read (&dquot->dq_count) >0 )return true;return false; }
include/net/bluetooth/hci_core.h +1 -1
@@ -209,7 +209,7 @@ struct hci_dev {struct list_head list;struct mutex lock; -char name[8 ]; +const char *name;unsigned long flags;__u16 id;__u8 bus;
include/net/netns/xfrm.h +1 -0
@@ -48,6 +48,7 @@ struct netns_xfrm {struct list_head policy_all;struct hlist_head *policy_byidx;unsigned int policy_idx_hmask; +unsigned int idx_generator;struct hlist_head policy_inexact[XFRM_POLICY_MAX ];struct xfrm_policy_hash policy_bydst[XFRM_POLICY_MAX ];unsigned int policy_count[XFRM_POLICY_MAX *2 ];
include/net/tcp.h +3 -0
@@ -141,6 +141,9 @@ void tcp_time_wait(struct sock *sk, int state, int timeo);#define TCP_RTO_MAX ((unsigned)(120*HZ))#define TCP_RTO_MIN ((unsigned)(HZ/5))#define TCP_TIMEOUT_MIN (2U)/* Min timeout for TCP timers in jiffies */ + +#define TCP_TIMEOUT_MIN_US (2*USEC_PER_MSEC)/* Min TCP timeout in microsecs */ +#define TCP_TIMEOUT_INIT ((unsigned)(1*HZ))/* RFC6298 2.1 initial RTO value */ #define TCP_TIMEOUT_FALLBACK ((unsigned)(3*HZ))/* RFC 1122 initial RTO value, now * used as a fallback RTO for the
kernel/cgroup/cgroup-v1.c +2 -3
@@ -395,10 +395,9 @@ static int pidlist_array_load(struct cgroup *cgrp, enum cgroup_filetype type, }css_task_iter_end (&it); length = n; -/* now sort & (if procs) strip out duplicates */ +/* now sort & strip out duplicates (tgids or recycled thread PIDs) */ sort (array, length,sizeof (pid_t), cmppid,NULL ); -if (type ==CGROUP_FILE_PROCS ) - length =pidlist_uniq (array, length); + length =pidlist_uniq (array, length); l =cgroup_pidlist_find_create (cgrp, type);if (!l) {
kernel/events/core.c +33 -6
@@ -1848,6 +1848,7 @@ static void perf_group_attach(struct perf_event *event)list_add_tail (&event->sibling_list, &group_leader->sibling_list); group_leader->nr_siblings++; + group_leader->group_generation++;perf_event__header_size (group_leader);
@@ -1918,6 +1919,7 @@ static void perf_group_detach(struct perf_event *event)if (event->group_leader != event) {list_del_init (&event->sibling_list); event->group_leader->nr_siblings--; + event->group_leader->group_generation++; goto out; }
@@ -4755,7 +4757,7 @@ static int __perf_read_group_add(struct perf_event *leader, u64 read_format, u64 *values) { struct perf_event_context *ctx = leader->ctx; -struct perf_event *sub; +struct perf_event *sub, *parent;unsigned long flags;int n =1 ;/* skip @nr */ int ret;
@@ -4765,6 +4767,33 @@ static int __perf_read_group_add(struct perf_event *leader,return ret;raw_spin_lock_irqsave (&ctx->lock, flags); +/* +* Verify the grouping between the parent and child (inherited) +* events is still in tact. +* +* Specifically: +* - leader->ctx->lock pins leader->sibling_list +* - parent->child_mutex pins parent->child_list +* - parent->ctx->mutex pins parent->sibling_list +* +* Because parent->ctx != leader->ctx (and child_list nests inside +* ctx->mutex), group destruction is not atomic between children, also +* see perf_event_release_kernel(). Additionally, parent can grow the +* group. +* +* Therefore it is possible to have parent and child groups in a +* different configuration and summing over such a beast makes no sense +* what so ever. +* +* Reject this. +*/ + parent = leader->parent; +if (parent && + (parent->group_generation != leader->group_generation || + parent->nr_siblings != leader->nr_siblings)) { + ret = -ECHILD ; + goto unlock; + }/* * Since we co-schedule groups, {enabled,running} times of siblings
@@ -4794,8 +4823,9 @@ static int __perf_read_group_add(struct perf_event *leader, values[n++] =primary_event_id (sub); } +unlock:raw_spin_unlock_irqrestore (&ctx->lock, flags); -return 0 ; +return ret; } static int perf_read_group(struct perf_event *event,
@@ -4814,10 +4844,6 @@ static int perf_read_group(struct perf_event *event, values[0 ] =1 + leader->nr_siblings; -/* -* By locking the child_mutex of the leader we effectively -* lock the child list of all siblings.. XXX explain how. -*/ mutex_lock (&leader->child_mutex); ret =__perf_read_group_add (leader, read_format, values);
@@ -11603,6 +11629,7 @@ static int inherit_group(struct perf_event *parent_event,if (IS_ERR (child_ctr))return PTR_ERR (child_ctr); } + leader->group_generation = parent_event->group_generation;return 0 ; }
kernel/sched/idle.c +8 -14
@@ -53,17 +53,18 @@ __setup("hlt", cpu_idle_nopoll_setup); static noinline int __cpuidle cpu_idle_poll(void) { +trace_cpu_idle (0 ,smp_processor_id ()); +stop_critical_timings ();rcu_idle_enter (); -trace_cpu_idle_rcuidle (0 ,smp_processor_id ());local_irq_enable (); -stop_critical_timings ();while (!tif_need_resched () && - (cpu_idle_force_poll ||tick_check_broadcast_expired ())) + (cpu_idle_force_poll ||tick_check_broadcast_expired ()))cpu_relax (); -start_critical_timings (); -trace_cpu_idle_rcuidle (PWR_EVENT_EXIT ,smp_processor_id ()); +rcu_idle_exit (); +start_critical_timings (); +trace_cpu_idle (PWR_EVENT_EXIT ,smp_processor_id ());return 1 ; }
@@ -90,7 +91,9 @@ void __cpuidle default_idle_call(void)local_irq_enable (); }else {stop_critical_timings (); +rcu_idle_enter ();arch_cpu_idle (); +rcu_idle_exit ();start_critical_timings (); } }
@@ -148,7 +151,6 @@ static void cpuidle_idle_call(void)if (cpuidle_not_available (drv, dev)) {tick_nohz_idle_stop_tick (); -rcu_idle_enter ();default_idle_call (); goto exit_idle;
@@ -166,19 +168,15 @@ static void cpuidle_idle_call(void)if (idle_should_enter_s2idle () || dev->use_deepest_state) {if (idle_should_enter_s2idle ()) { -rcu_idle_enter (); entered_state =cpuidle_enter_s2idle (drv, dev);if (entered_state >0 ) {local_irq_enable (); goto exit_idle; } - -rcu_idle_exit (); }tick_nohz_idle_stop_tick (); -rcu_idle_enter (); next_state =cpuidle_find_deepest_state (drv, dev);call_cpuidle (drv, dev, next_state);
@@ -195,8 +193,6 @@ static void cpuidle_idle_call(void)else tick_nohz_idle_retain_tick (); -rcu_idle_enter (); - entered_state =call_cpuidle (drv, dev, next_state);/* * Give the governor an opportunity to reflect on the outcome
@@ -212,8 +208,6 @@ static void cpuidle_idle_call(void)*/ if (WARN_ON_ONCE (irqs_disabled ()))local_irq_enable (); - -rcu_idle_exit (); }/*
kernel/trace/trace_events.c +1 -0
@@ -2242,6 +2242,7 @@ void trace_event_eval_update(struct trace_eval_map **map, int len)update_event_printk (call, map[i]); } } +cond_resched (); }up_write (&trace_event_sem); }
kernel/workqueue.c +6 -2
@@ -5087,9 +5087,13 @@ static int workqueue_apply_unbound_cpumask(void)list_for_each_entry (wq, &workqueues, list) {if (!(wq->flags &WQ_UNBOUND ))continue ; +/* creating multiple pwqs breaks ordering guarantee */ -if (wq->flags & __WQ_ORDERED) -continue ; +if (!list_empty (&wq->pwqs)) { +if (wq->flags & __WQ_ORDERED_EXPLICIT) +continue ; + wq->flags &= ~__WQ_ORDERED; + } ctx =apply_wqattrs_prepare (wq, wq->unbound_attrs);if (!ctx) {
net/bluetooth/hci_conn.c +44 -28
84 lines not on this page · raw message
net/bluetooth/hci_core.c +5 -3
@@ -3193,7 +3193,11 @@ int hci_register_dev(struct hci_dev *hdev)if (id <0 )return id; -snprintf (hdev->name,sizeof (hdev->name),"hci%d" , id); + error =dev_set_name (&hdev->dev,"hci%u" , id); +if (error) +return error; + + hdev->name =dev_name (&hdev->dev); hdev->id = id;BT_DBG ("%p name %s bus %d" , hdev, hdev->name, hdev->bus);
@@ -3215,8 +3219,6 @@ int hci_register_dev(struct hci_dev *hdev)if (!IS_ERR_OR_NULL (bt_debugfs)) hdev->debugfs =debugfs_create_dir (hdev->name, bt_debugfs); -dev_set_name (&hdev->dev,"%s" , hdev->name); - error =device_add (&hdev->dev);if (error <0 ) goto err_wqueue;
net/bluetooth/hci_event.c +27 -6
@@ -25,6 +25,8 @@/* Bluetooth HCI event handling. */ #include <asm/unaligned.h> +#include <linux/crypto.h> +#include <crypto/algapi.h> #include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h>
@@ -2510,6 +2512,16 @@ static void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb)BT_DBG ("%s bdaddr %pMR type 0x%x" , hdev->name, &ev->bdaddr, ev->link_type); +/* Reject incoming connection from device with same BD ADDR against +* CVE-2020-26555 +*/ +if (hdev && !bacmp (&hdev->bdaddr, &ev->bdaddr)) { +bt_dev_dbg (hdev,"Reject connection with same BD_ADDR %pMR\n" , + &ev->bdaddr); +hci_reject_conn (hdev, &ev->bdaddr); +return ; + } + mask |=hci_proto_connect_ind (hdev, &ev->bdaddr, ev->link_type, &flags);
@@ -3816,6 +3828,15 @@ static void hci_link_key_notify_evt(struct hci_dev *hdev, struct sk_buff *skb)if (!conn) goto unlock; +/* Ignore NULL link key against CVE-2020-26555 */ +if (!crypto_memneq (ev->link_key,ZERO_KEY ,HCI_LINK_KEY_SIZE )) { +bt_dev_dbg (hdev,"Ignore NULL link key (ZERO KEY) for %pMR" , + &ev->bdaddr); +hci_disconnect (conn,HCI_ERROR_AUTH_FAILURE ); +hci_conn_drop (conn); + goto unlock; + } +hci_conn_hold (conn); conn->disc_timeout =HCI_DISCONN_TIMEOUT ;hci_conn_drop (conn);
@@ -4294,8 +4315,8 @@ static u8 bredr_oob_data_present(struct hci_conn *conn)* available, then do not declare that OOB data is * present. */ -if (!memcmp (data->rand256,ZERO_KEY ,16 ) || - !memcmp (data->hash256,ZERO_KEY ,16 )) +if (!crypto_memneq (data->rand256,ZERO_KEY ,16 ) || + !crypto_memneq (data->hash256,ZERO_KEY ,16 ))return 0x00 ;return 0x02 ;
@@ -4305,8 +4326,8 @@ static u8 bredr_oob_data_present(struct hci_conn *conn)* not supported by the hardware, then check that if * P-192 data values are present. */ -if (!memcmp (data->rand192,ZERO_KEY ,16 ) || - !memcmp (data->hash192,ZERO_KEY ,16 )) +if (!crypto_memneq (data->rand192,ZERO_KEY ,16 ) || + !crypto_memneq (data->hash192,ZERO_KEY ,16 ))return 0x00 ;return 0x01 ;
@@ -4322,7 +4343,7 @@ static void hci_io_capa_request_evt(struct hci_dev *hdev, struct sk_buff *skb)hci_dev_lock (hdev); conn =hci_conn_hash_lookup_ba (hdev,ACL_LINK , &ev->bdaddr); -if (!conn) +if (!conn || !hci_conn_ssp_enabled (conn)) goto unlock;hci_conn_hold (conn);
@@ -4557,7 +4578,7 @@ static void hci_simple_pair_complete_evt(struct hci_dev *hdev,hci_dev_lock (hdev); conn =hci_conn_hash_lookup_ba (hdev,ACL_LINK , &ev->bdaddr); -if (!conn) +if (!conn || !hci_conn_ssp_enabled (conn)) goto unlock;/* Reset the authentication requirement to unknown */
net/bluetooth/hci_sock.c +2 -1
@@ -430,7 +430,8 @@ static struct sk_buff *create_monitor_event(struct hci_dev *hdev, int event) ni->type = hdev->dev_type; ni->bus = hdev->bus;bacpy (&ni->bdaddr, &hdev->bdaddr); -memcpy (ni->name, hdev->name,8 ); +memcpy_and_pad (ni->name,sizeof (ni->name), hdev->name, +strnlen (hdev->name,sizeof (ni->name)),'\0' ); opcode =cpu_to_le16 (HCI_MON_NEW_INDEX );break ;
net/ceph/messenger.c +38 -41
203 lines not on this page · raw message
net/core/pktgen.c +7 -7
@@ -651,19 +651,19 @@ static int pktgen_if_show(struct seq_file *seq, void *v)seq_puts (seq," Flags: " );for (i =0 ; i <NR_PKT_FLAGS ; i++) { -if (i ==F_FLOW_SEQ ) +if (i ==FLOW_SEQ_SHIFT )if (!pkt_dev->cflows)continue ; -if (pkt_dev->flags & (1 << i)) +if (pkt_dev->flags & (1 << i)) {seq_printf (seq,"%s " , pkt_flag_names[i]); -else if (i ==F_FLOW_SEQ ) -seq_puts (seq,"FLOW_RND " ); -#ifdef CONFIG_XFRM -if (i ==F_IPSEC && pkt_dev->spi) -seq_printf (seq,"spi:%u" , pkt_dev->spi); +if (i ==IPSEC_SHIFT && pkt_dev->spi) +seq_printf (seq,"spi:%u " , pkt_dev->spi);#endif + }else if (i ==FLOW_SEQ_SHIFT ) { +seq_puts (seq,"FLOW_RND " ); + } }seq_puts (seq,"\n" );
net/ipv4/esp4.c +3 -1
@@ -565,7 +565,9 @@ static inline int esp_remove_trailer(struct sk_buff *skb) skb->csum =csum_block_sub (skb->csum, csumdiff, skb->len - trimlen); } -pskb_trim (skb, skb->len - trimlen); + ret =pskb_trim (skb, skb->len - trimlen); +if (unlikely (ret)) +return ret; ret = nexthdr[1 ];
net/ipv4/tcp_output.c +19 -6
@@ -2220,6 +2220,18 @@ static int tcp_mtu_probe(struct sock *sk)return -1 ; } +static bool tcp_rtx_queue_empty_or_single_skb (const struct sock *sk) +{ +const struct rb_node *node = sk->tcp_rtx_queue.rb_node; + +/* No skb in the rtx queue. */ +if (!node) +return true; + +/* Only one skb in rtx queue. */ +return !node->rb_left && !node->rb_right; +} +/* TCP Small Queues : * Control number of packets in qdisc/devices to two packets / or ~1 ms. * (These limits are doubled for retransmits)
@@ -2242,12 +2254,12 @@ static bool tcp_small_queue_check(struct sock *sk, const struct sk_buff *skb, limit <<= factor;if (refcount_read (&sk->sk_wmem_alloc) > limit) { -/* Always send skb if rtx queue is empty. +/* Always send skb if rtx queue is empty or has one skb. * No need to wait for TX completion to call us back, * after softirq/tasklet schedule. * This helps when TX completions are delayed too much. */ -if (tcp_rtx_queue_empty (sk)) +if (tcp_rtx_queue_empty_or_single_skb (sk))return false;set_bit (TSQ_THROTTLED , &sk->sk_tsq_flags);
@@ -2449,7 +2461,7 @@ bool tcp_schedule_loss_probe(struct sock *sk, bool advancing_rto) {struct inet_connection_sock *icsk =inet_csk (sk);struct tcp_sock *tp =tcp_sk (sk); -u32 timeout, rto_delta_us; +u32 timeout, timeout_us, rto_delta_us;int early_retrans;/* Don't do any loss probe on a Fast Open connection before 3WHS
@@ -2473,11 +2485,12 @@ bool tcp_schedule_loss_probe(struct sock *sk, bool advancing_rto)* sample is available then probe after TCP_TIMEOUT_INIT. */ if (tp->srtt_us) { - timeout =usecs_to_jiffies (tp->srtt_us >>2 ); + timeout_us = tp->srtt_us >>2 ;if (tp->packets_out ==1 ) - timeout +=TCP_RTO_MIN ; + timeout_us +=tcp_rto_min_us (sk);else - timeout +=TCP_TIMEOUT_MIN ; + timeout_us +=TCP_TIMEOUT_MIN_US ; + timeout =usecs_to_jiffies (timeout_us); }else { timeout =TCP_TIMEOUT_INIT ; }
net/ipv4/tcp_recovery.c +1 -1
@@ -122,7 +122,7 @@ bool tcp_rack_mark_lost(struct sock *sk) tp->rack.advanced =0 ;tcp_rack_detect_loss (sk, &timeout);if (timeout) { - timeout =usecs_to_jiffies (timeout) +TCP_TIMEOUT_MIN ; + timeout =usecs_to_jiffies (timeout +TCP_TIMEOUT_MIN_US );inet_csk_reset_xmit_timer (sk,ICSK_TIME_REO_TIMEOUT , timeout,inet_csk (sk)->icsk_rto); }
net/ipv6/esp6.c +3 -1
@@ -517,7 +517,9 @@ static inline int esp_remove_trailer(struct sk_buff *skb) skb->csum =csum_block_sub (skb->csum, csumdiff, skb->len - trimlen); } -pskb_trim (skb, skb->len - trimlen); + ret =pskb_trim (skb, skb->len - trimlen); +if (unlikely (ret)) +return ret; ret = nexthdr[1 ];
net/ipv6/xfrm6_policy.c +2 -2
@@ -243,11 +243,11 @@ static void xfrm6_dst_destroy(struct dst_entry *dst) {struct xfrm_dst *xdst = (struct xfrm_dst *)dst; -if (likely (xdst->u.rt6.rt6i_idev)) -in6_dev_put (xdst->u.rt6.rt6i_idev);dst_destroy_metrics_generic (dst);if (xdst->u.rt6.rt6i_uncached_list)rt6_uncached_list_del (&xdst->u.rt6); +if (likely (xdst->u.rt6.rt6i_idev)) +in6_dev_put (xdst->u.rt6.rt6i_idev);xfrm_dst_destroy (xdst); }
net/mac80211/tx.c +2 -1
@@ -654,7 +654,8 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx) }if (unlikely (tx->key && tx->key->flags &KEY_FLAG_TAINTED && - !ieee80211_is_deauth (hdr->frame_control))) + !ieee80211_is_deauth (hdr->frame_control)) && + tx->skb->protocol != tx->sdata->control_port_protocol)return TX_DROP ; if (!skip_hw && tx->key &&
net/netfilter/ipvs/ip_vs_sync.c +2 -2
@@ -1444,7 +1444,7 @@ static int bind_mcastif_addr(struct socket *sock, struct net_device *dev) sin.sin_addr.s_addr = addr; sin.sin_port =0 ; -return sock->ops->bind (sock, (struct sockaddr *)&sin,sizeof (sin)); +return kernel_bind (sock, (struct sockaddr *)&sin,sizeof (sin)); } static void get_mcast_sockaddr(union ipvs_sockaddr *sa, int *salen,
@@ -1551,7 +1551,7 @@ static int make_receive_sock(struct netns_ipvs *ipvs, int id,get_mcast_sockaddr (&mcast_addr, &salen, &ipvs->bcfg, id); sock->sk->sk_bound_dev_if = dev->ifindex; - result = sock->ops->bind (sock, (struct sockaddr *)&mcast_addr, salen); + result =kernel_bind (sock, (struct sockaddr *)&mcast_addr, salen);if (result <0 ) {pr_err ("Error binding to the multicast addr\n" ); goto error;
net/netfilter/nft_payload.c +1 -1
@@ -84,7 +84,7 @@ static void nft_payload_eval(const struct nft_expr *expr,switch (priv->base) {case NFT_PAYLOAD_LL_HEADER : -if (!skb_mac_header_was_set (skb)) +if (!skb_mac_header_was_set (skb) ||skb_mac_header_len (skb) ==0 ) goto err;if (skb_vlan_tag_present (skb)) {
net/netfilter/nft_set_rbtree.c +2 -0
@@ -326,6 +326,8 @@ static void *nft_rbtree_deactivate(const struct net *net, nft_rbtree_interval_end(this)) { parent = parent->rb_right;continue ; + } else if (nft_set_elem_expired(&rbe->ext)) { +break ; } else if (!nft_set_elem_active(&rbe->ext, genmask)) { parent = parent->rb_left;continue ;
net/nfc/llcp_core.c +12 -18
@@ -216,17 +216,13 @@ static struct nfc_llcp_sock *nfc_llcp_sock_get(struct nfc_llcp_local *local,if (tmp_sock->ssap == ssap && tmp_sock->dsap == dsap) { llcp_sock = tmp_sock; +sock_hold (&llcp_sock->sk);break ; } }read_unlock (&local->sockets.lock); -if (llcp_sock ==NULL ) -return NULL ; - -sock_hold (&llcp_sock->sk); -return llcp_sock; }
@@ -338,7 +334,8 @@ static int nfc_llcp_wks_sap(const char *service_name, size_t service_name_len)static struct nfc_llcp_sock *nfc_llcp_sock_from_sn (struct nfc_llcp_local *local, -const u8 *sn,size_t sn_len) +const u8 *sn,size_t sn_len, +bool needref) {struct sock *sk;struct nfc_llcp_sock *llcp_sock, *tmp_sock;
@@ -374,6 +371,8 @@ struct nfc_llcp_sock *nfc_llcp_sock_from_sn(struct nfc_llcp_local *local,if (memcmp (sn, tmp_sock->service_name, sn_len) ==0 ) { llcp_sock = tmp_sock; +if (needref) +sock_hold (&llcp_sock->sk);break ; } }
@@ -415,7 +414,8 @@ u8 nfc_llcp_get_sdp_ssap(struct nfc_llcp_local *local,* to this service name. */ if (nfc_llcp_sock_from_sn (local, sock->service_name, - sock->service_name_len) !=NULL ) { + sock->service_name_len, + false) !=NULL ) {mutex_unlock (&local->sdp_lock);return LLCP_SAP_MAX ;
@@ -816,16 +816,7 @@ static struct nfc_llcp_sock *nfc_llcp_connecting_sock_get(struct nfc_llcp_localstatic struct nfc_llcp_sock *nfc_llcp_sock_get_sn (struct nfc_llcp_local *local,const u8 *sn,size_t sn_len) { -struct nfc_llcp_sock *llcp_sock; - - llcp_sock =nfc_llcp_sock_from_sn (local, sn, sn_len); - -if (llcp_sock ==NULL ) -return NULL ; - -sock_hold (&llcp_sock->sk); - -return llcp_sock; +return nfc_llcp_sock_from_sn (local, sn, sn_len, true); }static const u8 *nfc_llcp_connect_sn (const struct sk_buff *skb,size_t *sn_len)
@@ -1290,7 +1281,8 @@ static void nfc_llcp_recv_snl(struct nfc_llcp_local *local, } llcp_sock =nfc_llcp_sock_from_sn (local, service_name, - service_name_len); + service_name_len, + true);if (!llcp_sock) { sap =0 ; goto add_snl;
@@ -1310,6 +1302,7 @@ static void nfc_llcp_recv_snl(struct nfc_llcp_local *local,if (sap ==LLCP_SAP_MAX ) { sap =0 ; +nfc_llcp_sock_put (llcp_sock); goto add_snl; }
@@ -1327,6 +1320,7 @@ static void nfc_llcp_recv_snl(struct nfc_llcp_local *local,pr_debug ("%p %d\n" , llcp_sock, sap); +nfc_llcp_sock_put (llcp_sock); add_snl: sdp =nfc_llcp_build_sdres_tlv (tid, sap);if (sdp ==NULL )
net/nfc/nci/core.c +5 -0
@@ -906,6 +906,11 @@ static int nci_activate_target(struct nfc_dev *nfc_dev,return -EINVAL ; } +if (protocol >=NFC_PROTO_MAX ) { +pr_err ("the requested nfc protocol is invalid\n" ); +return -EINVAL ; + } +if (!(nci_target->supported_protocols & (1 << protocol))) {pr_err ("target does not support the requested protocol 0x%x\n" , protocol);
net/nfc/nci/spi.c +2 -0
@@ -163,6 +163,8 @@ static int send_acknowledge(struct nci_spi *nspi, u8 acknowledge)int ret; skb =nci_skb_alloc (nspi->ndev,0 ,GFP_KERNEL ); +if (!skb) +return -ENOMEM ;/* add the NCI SPI header to the start of the buffer */ hdr =skb_push (skb,NCI_SPI_HDR_LEN );
net/rds/tcp_connect.c +1 -1
@@ -141,7 +141,7 @@ int rds_tcp_conn_path_connect(struct rds_conn_path *cp) addrlen =sizeof (sin); } - ret = sock->ops->bind (sock, addr, addrlen); + ret =kernel_bind (sock, addr, addrlen);if (ret) {rdsdebug ("bind failed with %d at address %pI6c\n" , ret, &conn->c_laddr);
net/rds/tcp_listen.c +1 -1
@@ -332,7 +332,7 @@ struct socket *rds_tcp_listen_init(struct net *net, bool isv6) addr_len =sizeof (*sin); } - ret = sock->ops->bind (sock, (struct sockaddr *)&ss, addr_len); + ret =kernel_bind (sock, (struct sockaddr *)&ss, addr_len);if (ret <0 ) {rdsdebug ("could not bind %s listener socket: %d\n" , isv6 ?"IPv6" :"IPv4" , ret);
net/rfkill/rfkill-gpio.c +2 -2
@@ -112,13 +112,13 @@ static int rfkill_gpio_probe(struct platform_device *pdev) rfkill->clk =devm_clk_get (&pdev->dev,NULL ); - gpio =devm_gpiod_get_optional (&pdev->dev,"reset" ,GPIOD_OUT_LOW ); + gpio =devm_gpiod_get_optional (&pdev->dev,"reset" ,GPIOD_ASIS );if (IS_ERR (gpio))return PTR_ERR (gpio); rfkill->reset_gpio = gpio; - gpio =devm_gpiod_get_optional (&pdev->dev,"shutdown" ,GPIOD_OUT_LOW ); + gpio =devm_gpiod_get_optional (&pdev->dev,"shutdown" ,GPIOD_ASIS );if (IS_ERR (gpio))return PTR_ERR (gpio);
net/sched/sch_hfsc.c +14 -4
@@ -913,6 +913,14 @@ hfsc_change_usc(struct hfsc_class *cl, struct tc_service_curve *usc, cl->cl_flags |=HFSC_USC ; } +static void +hfsc_upgrade_rt (struct hfsc_class *cl) +{ + cl->cl_fsc = cl->cl_rsc; +rtsc_init (&cl->cl_virtual, &cl->cl_fsc, cl->cl_vt, cl->cl_total); + cl->cl_flags |=HFSC_FSC ; +} +static const struct nla_policy hfsc_policy[TCA_HFSC_MAX +1 ] = { [TCA_HFSC_RSC ] = { .len =sizeof (struct tc_service_curve ) }, [TCA_HFSC_FSC ] = { .len =sizeof (struct tc_service_curve ) },
@@ -1021,10 +1029,6 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,if (parent ==NULL )return -ENOENT ; } -if (!(parent->cl_flags &HFSC_FSC ) && parent != &q->root) { -NL_SET_ERR_MSG (extack,"Invalid parent - parent class must have FSC" ); -return -EINVAL ; - }if (classid ==0 ||TC_H_MAJ (classid ^ sch->handle) !=0 )return -EINVAL ;
@@ -1077,6 +1081,12 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, cl->cf_tree =RB_ROOT ;sch_tree_lock (sch); +/* Check if the inner class is a misconfigured 'rt' */ +if (!(parent->cl_flags &HFSC_FSC ) && parent != &q->root) { +NL_SET_ERR_MSG (extack, +"Forced curve change on parent 'rt' to 'sc'" ); +hfsc_upgrade_rt (parent); + }qdisc_class_hash_insert (&q->clhash, &cl->cl_common);list_add_tail (&cl->siblings, &parent->children);if (parent->level ==0 )
net/socket.c +55 -22
143 lines not on this page · raw message
net/wireless/nl80211.c +1 -1
@@ -6504,7 +6504,7 @@ static int nl80211_update_mesh_config(struct sk_buff *skb,struct cfg80211_registered_device *rdev = info->user_ptr[0 ];struct net_device *dev = info->user_ptr[1 ];struct wireless_dev *wdev = dev->ieee80211_ptr; -struct mesh_config cfg; +struct mesh_config cfg = {};u32 mask;int err;
net/xfrm/xfrm_interface_core.c +10 -12
@@ -219,8 +219,8 @@ static int xfrmi_rcv_cb(struct sk_buff *skb, int err) skb->dev = dev;if (err) { - dev->stats.rx_errors++; - dev->stats.rx_dropped++; +DEV_STATS_INC (dev, rx_errors); +DEV_STATS_INC (dev, rx_dropped);return 0 ; }
@@ -260,7 +260,6 @@ static int xfrmi_xmit2(struct sk_buff *skb, struct net_device *dev, struct flowi *fl) { struct xfrm_if *xi = netdev_priv(dev); -struct net_device_stats *stats = &xi->dev->stats;struct dst_entry *dst =skb_dst (skb);unsigned int length = skb->len;struct net_device *tdev;
@@ -286,7 +285,7 @@ xfrmi_xmit2(struct sk_buff *skb, struct net_device *dev, struct flowi *fl) tdev = dst->dev;if (tdev == dev) { - stats->collisions++; +DEV_STATS_INC (dev, collisions);net_warn_ratelimited ("%s: Local routing loop detected!\n" , dev->name); goto tx_err_dst_release;
@@ -329,13 +328,13 @@ xfrmi_xmit2(struct sk_buff *skb, struct net_device *dev, struct flowi *fl) tstats->tx_packets++;u64_stats_update_end (&tstats->syncp); }else { - stats->tx_errors++; - stats->tx_aborted_errors++; +DEV_STATS_INC (dev, tx_errors); +DEV_STATS_INC (dev, tx_aborted_errors); }return 0 ; tx_err_link_failure: - stats->tx_carrier_errors++; +DEV_STATS_INC (dev, tx_carrier_errors);dst_link_failure (skb); tx_err_dst_release:dst_release (dst);
@@ -345,7 +344,6 @@ xfrmi_xmit2(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)static netdev_tx_t xfrmi_xmit (struct sk_buff *skb,struct net_device *dev) {struct xfrm_if *xi =netdev_priv (dev); -struct net_device_stats *stats = &xi->dev->stats;struct dst_entry *dst =skb_dst (skb);struct flowi fl;int ret;
@@ -362,7 +360,7 @@ static netdev_tx_t xfrmi_xmit(struct sk_buff *skb, struct net_device *dev) dst =ip6_route_output (dev_net (dev),NULL , &fl.u.ip6);if (dst->error) {dst_release (dst); - stats->tx_carrier_errors++; +DEV_STATS_INC (dev, tx_carrier_errors); goto tx_err; }skb_dst_set (skb, dst);
@@ -378,7 +376,7 @@ static netdev_tx_t xfrmi_xmit(struct sk_buff *skb, struct net_device *dev) fl.u.ip4.flowi4_flags |=FLOWI_FLAG_ANYSRC ; rt =__ip_route_output_key (dev_net (dev), &fl.u.ip4);if (IS_ERR (rt)) { - stats->tx_carrier_errors++; +DEV_STATS_INC (dev, tx_carrier_errors); goto tx_err; }skb_dst_set (skb, &rt->dst);
@@ -397,8 +395,8 @@ static netdev_tx_t xfrmi_xmit(struct sk_buff *skb, struct net_device *dev)return NETDEV_TX_OK ; tx_err: - stats->tx_errors++; - stats->tx_dropped++; +DEV_STATS_INC (dev, tx_errors); +DEV_STATS_INC (dev, tx_dropped);kfree_skb (skb);return NETDEV_TX_OK ; }
net/xfrm/xfrm_policy.c +2 -4
@@ -654,8 +654,6 @@ EXPORT_SYMBOL(xfrm_policy_hash_rebuild);* of an absolute inpredictability of ordering of rules. This will not pass. */ static u32 xfrm_gen_index (struct net *net,int dir,u32 index) { -static u32 idx_generator; -for (;;) {struct hlist_head *list;struct xfrm_policy *p;
@@ -663,8 +661,8 @@ static u32 xfrm_gen_index(struct net *net, int dir, u32 index)int found;if (!index) { - idx = (idx_generator | dir); - idx_generator +=8 ; + idx = (net->xfrm.idx_generator | dir); + net->xfrm.idx_generator +=8 ; }else { idx = index; index =0 ;
sound/soc/pxa/pxa-ssp.c +1 -1
@@ -795,7 +795,7 @@ static int pxa_ssp_probe(struct snd_soc_dai *dai)if (IS_ERR (priv->extclk)) { ret =PTR_ERR (priv->extclk);if (ret == -EPROBE_DEFER ) -return ret; + goto err_priv; priv->extclk =NULL ; }