Linux 4.9.68
Greg KH
maintainerI'm announcing the release of the 4.9.68 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/mach-omap1/dma.c | 16 - arch/arm/mach-omap2/pdata-quirks.c | 2 arch/m68k/mm/mcfmmu.c | 2 arch/powerpc/include/asm/book3s/64/hash.h | 4 arch/powerpc/mm/hash_utils_64.c | 4 arch/powerpc/mm/pgtable-book3s64.c | 18 + arch/s390/include/asm/pci_insn.h | 2 arch/s390/include/asm/runtime_instr.h | 4 arch/s390/kernel/process.c | 3 arch/s390/kernel/runtime_instr.c | 30 +-- arch/s390/pci/pci.c | 5 arch/s390/pci/pci_insn.c | 6 arch/x86/events/intel/ds.c | 6 arch/x86/include/asm/syscalls.h | 2 arch/x86/kernel/fpu/xstate.c | 1 arch/x86/kernel/kprobes/ftrace.c | 23 +- arch/x86/kernel/ldt.c | 16 + arch/x86/um/ldt.c | 7 drivers/crypto/caam/intern.h | 1 drivers/crypto/caam/jr.c | 25 +- drivers/dma-buf/fence.c | 26 ++ drivers/dma-buf/sw_sync.c | 211 +++++++++++++--------- drivers/dma-buf/sync_debug.c | 39 +--- drivers/dma-buf/sync_debug.h | 27 +- drivers/dma-buf/sync_file.c | 22 -- drivers/dma/pl330.c | 19 - drivers/dma/stm32-dma.c | 17 - drivers/edac/sb_edac.c | 1 drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 5 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 2 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 9 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 3 drivers/i2c/busses/i2c-cadence.c | 8 drivers/iio/adc/ti-ads1015.c | 1 drivers/infiniband/hw/qedr/qedr_cm.c | 4 drivers/infiniband/hw/qedr/verbs.c | 2 drivers/md/bcache/request.c | 9 drivers/mmc/host/sdhci-msm.c | 18 + drivers/net/appletalk/ipddp.c | 2 drivers/net/ethernet/broadcom/bcmsysport.c | 23 +- drivers/net/ethernet/cavium/thunder/thunder_xcv.c | 3 drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.c | 12 - drivers/net/ethernet/emulex/benet/be_main.c | 45 +++- drivers/net/ethernet/freescale/fec_main.c | 23 -- drivers/net/ethernet/mellanox/mlx4/en_clock.c | 8 drivers/net/ethernet/renesas/ravb_main.c | 8 drivers/net/gtp.c | 12 - drivers/net/phy/micrel.c | 2 drivers/net/xen-netback/common.h | 8 drivers/net/xen-netback/interface.c | 8 drivers/net/xen-netfront.c | 28 +- drivers/nvme/target/core.c | 3 drivers/scsi/qla2xxx/qla_target.c | 8 drivers/spi/spi-axi-spi-engine.c | 4 drivers/spi/spi-sh-msiof.c | 2 drivers/staging/greybus/loopback.c | 4 drivers/staging/lustre/lustre/llite/llite_mmap.c | 4 drivers/staging/media/cec/cec-adap.c | 7 drivers/staging/rtl8188eu/core/rtw_mlme.c | 6 drivers/tty/serial/8250/8250_fintek.c | 2 drivers/tty/serial/8250/8250_pci.c | 3 drivers/tty/serial/8250/8250_port.c | 5 drivers/tty/sysrq.c | 9 drivers/usb/core/config.c | 28 ++ drivers/usb/core/devio.c | 56 ++--- drivers/usb/core/hub.c | 9 drivers/usb/core/quirks.c | 3 drivers/usb/gadget/function/f_fs.c | 2 drivers/usb/host/ehci-dbg.c | 2 drivers/usb/host/xhci-mem.c | 7 drivers/usb/phy/phy-tahvo.c | 3 drivers/usb/serial/option.c | 3 drivers/usb/storage/uas-detect.h | 4 drivers/vfio/vfio_iommu_spapr_tce.c | 11 - fs/dax.c | 28 +- fs/libfs.c | 3 fs/nfs/nfs4proc.c | 3 fs/nfs/nfs4state.c | 1 include/linux/buffer_head.h | 4 include/linux/fence.h | 67 ++++++ include/linux/perf_event.h | 1 include/uapi/linux/usb/ch9.h | 3 kernel/events/core.c | 47 +++- mm/oom_kill.c | 7 mm/page_alloc.c | 15 - net/ipv4/tcp_input.c | 2 net/ipv6/ip6_vti.c | 2 net/l2tp/l2tp_ip.c | 19 - net/l2tp/l2tp_ip6.c | 20 -- net/mac80211/chan.c | 3 net/mac80211/tx.c | 17 - net/qrtr/qrtr.c | 4 net/sctp/debug.c | 2 net/tipc/server.c | 20 -- security/integrity/ima/ima_main.c | 4 tools/include/linux/poison.h | 5 tools/perf/tests/attr.c | 2 tools/testing/selftests/x86/ldt_gdt.c | 17 + tools/usb/usbip/Makefile.am | 3 virt/kvm/arm/arch_timer.c | 3 101 files changed, 750 insertions(+), 521 deletions(-)
Aaron Sierra (1):
serial: 8250: Preserve DLD[7:4] for PORT_XR17V35X
Adam Ford (1):
ARM: OMAP2+: Fix WL1283 Bluetooth Baud Rate
Alexey Kardashevskiy (1):
vfio/spapr: Fix missing mutex unlock when creating a window
Alexey Khoroshilov (1):
usb: phy: tahvo: fix error handling in tahvo_usb_probe()
Andreas Schultz (2):
gtp: clear DF bit on GTP packet tx
gtp: fix cross netns recv on gtp socket
Andrzej Hajda (3):
drm/exynos/decon5433: update shadow registers iff there are active windows drm/exynos/decon5433: set STANDALONE_UPDATE_F also if planes are disabled drm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement
Andy Lutomirski (1):
selftests/x86/ldt_get: Add a few additional tests for limits
Arnaldo Carvalho de Melo (1):
tools include: Do not use poison with C++
Ben Hutchings (1):
usbip: tools: Install all headers needed for libusbip development
Benjamin Coddington (1):
nfs: Don't take a reference on fl->fl_file for LOCK operation
Boshi Wang (1):
ima: fix hash algorithm initialization
Bryan O'Donoghue (1):
staging: greybus: loopback: Fix iteration count on async path
Chris Wilson (10):
dma-buf/dma-fence: Extract __dma_fence_is_later() dma-buf/sw-sync: Fix the is-signaled test to handle u32 wraparound dma-buf/sw-sync: Prevent user overflow on timeline advance dma-buf/sw-sync: Reduce irqsave/irqrestore from known context dma-buf/sw-sync: sync_pt is private and of fixed size dma-buf/sw-sync: Fix locking around sync_timeline lists dma-buf/sw-sync: Use an rbtree to sort fences in the timeline
dma-fence: Clear fence->status during dma_fence_init()
dma-fence: Wrap querying the fence->status
dma-fence: Introduce drm_fence_set_error() helper
Christian Borntraeger (1):
s390/pci: do not require AIS facility
Christoffer Dall (1):
KVM: arm/arm64: Fix occasional warning from the timer work function
Colin Ian King (3):
staging: rtl8188eu: avoid a null dereference on pmlmepriv
net: sctp: fix array overrun read on sctp_timer_tbl
usb: host: fix incorrect updating of offset
Coly Li (1):
bcache: only permit to recovery read error when cache device is clean
Dan Carpenter (1):
USB: devio: Prevent integer overflow in proc_do_submiturb()
Daniel Vetter (1):
dma-buf: Update kerneldoc for sync_file_create
Dave Hansen (1):
x86/entry: Use SYSCALL_DEFINE() macros for sys_modify_ldt()
David Forster (1):
vti6: fix device register to report IFLA_INFO_KIND
Dominik Behr (1):
dma-buf/sw_sync: force signal all unsignaled fences on dying timeline
Eric W. Biederman (1):
libfs: Modify mount_pseudo_xattr to be clear it is not a userspace mount
Florian Fainelli (2):
net: systemport: Utilize skb_put_padto()
net: systemport: Pad packet before inserting TSB
Greg Kroah-Hartman (1):
Linux 4.9.68
Greg Ungerer (1):
m68k: fix ColdFire node shift size calculation
Guillaume Nault (1):
l2tp: take remote address into account in l2tp_ip and l2tp_ip6 socket lookups
Gustavo A. R. Silva (1):
EDAC, sb_edac: Fix missing break in switch
Gustavo Padovan (3):
dma-buf/sw_sync: move timeline_fence_ops around dma-buf/sw_sync: clean up list before signaling the fence dma-buf/sync_file: hold reference to fence when creating sync_file
Hans Verkuil (1):
cec: initiator should be the same as the destination for, poll
Hans de Goede (1):
uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices
Heiko Carstens (1):
s390/runtime instrumentation: simplify task exit handling
Hiromitsu Yamasaki (1):
spi: sh-msiof: Fix DMA transfer size check
Horia Geantă (1):
Revert "crypto: caam - get rid of tasklet"
Iago Abal (1):
dmaengine: pl330: fix double lock
Ivan Vecera (3):
be2net: fix accesses to unicast list
be2net: fix unicast list filling
be2net: fix initial MAC setting
Jan Kara (2):
dax: Avoid page invalidation races and unnecessary radix tree traversals
mm: avoid returning VM_FAULT_RETRY from ->page_mkwrite handlers
Jason Baron (1):
tcp: correct memory barrier usage in tcp_check_space()
Jibin Xu (1):
sysrq : fix Show Regs call trace on ARM
Jiri Olsa (1):
perf/x86/intel: Account interrupts for PEBS errors
Johan Hovold (1):
spi: spi-axi: fix potential use-after-free after deregistration
Johannes Berg (2):
mac80211: calculate min channel width correctly
mac80211: don't try to sleep in rate_control_rate_init()
Kai-Heng Feng (1):
usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub
Kazuya Mizuguchi (1):
ravb: Remove Rx overflow log messages
Kevin Hao (1):
x86/fpu: Set the xcomp_bv when we fake up a XSAVES area
Ladislav Michl (1):
iio: adc: ti-ads1015: add 10% to conversion wait time
Lukas Wunner (1):
serial: 8250_fintek: Fix rs485 disablement on invalid ioctl()
M'boumba Cedric Madianga (2):
dmaengine: stm32-dma: Set correct args number for DMA request from DT
dmaengine: stm32-dma: Fix null pointer dereference in stm32_dma_tx_status
Mart van Santen (1):
xen-netback: vif counters from int/long to u64
Masakazu Mokuno (1):
USB: core: Add type-specific length check of BOS descriptors
Masami Hiramatsu (1):
kprobes/x86: Disable preemption in ftrace-based jprobes
Mateusz Berezecki (1):
USB: Increase usbfs transfer limit
Matt Wilson (1):
serial: 8250_pci: Add Amazon PCI serial device ID
Michal Hocko (1):
mm: fix remote numa hits statistics
Michal Kazior (1):
mac80211: prevent skb/txq mismatch
Mike Looijmans (2):
i2c: i2c-cadence: Initialize configuration before probing devices
usb: hub: Cycle HUB power when initialization fails
Oliver Neukum (1):
USB: usbfs: Filter flags passed in from user space
Parthasarathy Bhuvaragan (2):
tipc: fix nametbl_lock soft lockup at module exit
tipc: fix cleanup at module unload
Peter Ujfalusi (1):
ARM: OMAP1: DMA: Correct the number of logical channels
Quinn Tran (1):
qla2xxx: Fix wrong IOCB type assumption
Ram Amrani (2):
RDMA/qedr: Return success when not changing QP state RDMA/qedr: Fix RDMA CM loopback
Rex Zhu (1):
drm/amdgpu: fix bug set incorrect value to vce register
Reza Arbab (1):
powerpc/mm: Fix memory hotplug BUG() on radix
Ross Lagerwall (1):
xen-netfront: Improve error handling during initialization
Rui Hua (1):
bcache: recover data from backing when data is clean
Rui Sousa (1):
net: fec: fix multicast filtering hardware setup
Sagi Grimberg (1):
nvmet: cancel fatal error and flush async work before free controller
Sean Nyekjaer (1):
net: phy: micrel: KSZ8795 do not set SUPPORTED_[Asym_]Pause
Sebastian Sjoholm (1):
USB: serial: option: add Quectel BG96 id
Slava Shwartsman (1):
net/mlx4_en: Fix type mismatch for 32-bit systems
Stefan Agner (2):
drm/fsl-dcu: avoid disabling pixel clock twice on suspend drm/fsl-dcu: enable IRQ before drm_atomic_helper_resume()
Stephen Boyd (1):
net: qrtr: Mark 'buf' as little endian
Subhash Jadavani (1):
mmc: sdhci-msm: fix issue with power irq
Thomas Richter (1):
perf test attr: Fix ignored test case result
Trond Myklebust (1):
NFSv4: Fix client recovery when server reboots multiple times
Varun Prakash (1):
libcxgb: fix error check for ip6_route_output()
Vincent (1):
net: thunderx: avoid dereferencing xcv when NULL
Vincent Pelletier (1):
usb: gadget: f_fs: Fix ExtCompat descriptor validation
Vitaly Kuznetsov (1):
xen-netfront: avoid crashing on resume after a failure in talk_to_netback()
Vlad Tsyrklevich (1):
net/appletalk: Fix kernel memory disclosure
Wang Nan (1):
mm, oom_reaper: gather each vma to prevent leaking TLB entry
Xiangliang Yu (1):
drm/amdgpu: fix unload driver issue for virtual display
Yu Chen (1):
usb: xhci: fix panic in xhci_free_virt_devices_depth_first
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 67 +SUBLEVEL = 68 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/mach-omap1/dma.c +7 -9
@@ -32,7 +32,6 @@#include "soc.h" #define OMAP1_DMA_BASE (0xfffed800) -#define OMAP1_LOGICAL_DMA_CH_COUNT 17static u32 enable_1510_mode;
@@ -348,8 +347,6 @@ static int __init omap1_system_dma_init(void) goto exit_iounmap; } - d->lch_count =OMAP1_LOGICAL_DMA_CH_COUNT ; -/* Valid attributes for omap1 plus processors */ if (cpu_is_omap15xx ()) d->dev_caps =ENABLE_1510_MODE ;
@@ -366,13 +363,14 @@ static int __init omap1_system_dma_init(void) d->dev_caps |=CLEAR_CSR_ON_READ ; d->dev_caps |=IS_WORD_16 ; -if (cpu_is_omap15xx ()) - d->chan_count =9 ; -else if (cpu_is_omap16xx () ||cpu_is_omap7xx ()) { -if (!(d->dev_caps &ENABLE_1510_MODE )) - d->chan_count =16 ; +/* available logical channels */ +if (cpu_is_omap15xx ()) { + d->lch_count =9 ; + }else { +if (d->dev_caps &ENABLE_1510_MODE ) + d->lch_count =9 ;else - d->chan_count =9 ; + d->lch_count =16 ; } p = dma_plat_info;
arch/arm/mach-omap2/pdata-quirks.c +1 -1
@@ -147,7 +147,7 @@ static struct ti_st_plat_data wilink_pdata = { .nshutdown_gpio = 137, .dev_name = "/dev/ttyO1", .flow_cntrl = 1, - .baud_rate = 300000, + .baud_rate = 3000000, };static struct platform_device wl18xx_device = {
arch/m68k/mm/mcfmmu.c +1 -1
@@ -169,7 +169,7 @@ void __init cf_bootmem_alloc(void) max_pfn = max_low_pfn =PFN_DOWN (_ramend); high_memory = (void *)_ramend; - m68k_virt_to_node_shift =fls (_ramend - _rambase -1 ) -6 ; + m68k_virt_to_node_shift =fls (_ramend -1 ) -6 ;module_fixup (NULL , __start_fixup, __stop_fixup);/* setup bootmem data */
arch/powerpc/include/asm/book3s/64/hash.h +4 -0
@@ -201,6 +201,10 @@ extern int __meminit hash__vmemmap_create_mapping(unsigned long start, unsigned long phys);extern void hash__vmemmap_remove_mapping (unsigned long start,unsigned long page_size); + +int hash__create_section_mapping (unsigned long start,unsigned long end); +int hash__remove_section_mapping (unsigned long start,unsigned long end); +#endif /* !__ASSEMBLY__ */ #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_BOOK3S_64_HASH_H */
arch/powerpc/mm/hash_utils_64.c +2 -2
@@ -747,7 +747,7 @@ static unsigned long __init htab_get_table_size(void) }#ifdef CONFIG_MEMORY_HOTPLUG -int create_section_mapping (unsigned long start,unsigned long end) +int hash__create_section_mapping (unsigned long start,unsigned long end) { int rc = htab_bolt_mapping(start, end, __pa(start), pgprot_val(PAGE_KERNEL), mmu_linear_psize,
@@ -761,7 +761,7 @@ int create_section_mapping(unsigned long start, unsigned long end)return rc; } -int remove_section_mapping (unsigned long start,unsigned long end) +int hash__remove_section_mapping (unsigned long start,unsigned long end) {int rc =htab_remove_mapping (start, end, mmu_linear_psize, mmu_kernel_ssize);
arch/powerpc/mm/pgtable-book3s64.c +18 -0
@@ -125,3 +125,21 @@ void mmu_cleanup_all(void)else if (mmu_hash_ops.hpte_clear_all) mmu_hash_ops.hpte_clear_all (); } + +#ifdef CONFIG_MEMORY_HOTPLUG +int create_section_mapping (unsigned long start,unsigned long end) +{ +if (radix_enabled ()) +return -ENODEV ; + +return hash__create_section_mapping (start, end); +} + +int remove_section_mapping (unsigned long start,unsigned long end) +{ +if (radix_enabled ()) +return -ENODEV ; + +return hash__remove_section_mapping (start, end); +} +#endif /* CONFIG_MEMORY_HOTPLUG */
arch/s390/include/asm/pci_insn.h +1 -1
@@ -81,6 +81,6 @@ int zpci_refresh_trans(u64 fn, u64 addr, u64 range);int zpci_load (u64 *data,u64 req,u64 offset);int zpci_store (u64 data,u64 req,u64 offset);int zpci_store_block (const u64 *data,u64 req,u64 offset); -void zpci_set_irq_ctrl (u16 ctl,char *unused,u8 isc); +int zpci_set_irq_ctrl (u16 ctl,char *unused,u8 isc);#endif
arch/s390/include/asm/runtime_instr.h +3 -1
@@ -85,6 +85,8 @@ static inline void restore_ri_cb(struct runtime_instr_cb *cb_next, load_runtime_instr_cb(&runtime_instr_empty_cb); } -void exit_thread_runtime_instr (void ); +struct task_struct ; + +void runtime_instr_release (struct task_struct *tsk);#endif /* _RUNTIME_INSTR_H */
arch/s390/kernel/process.c +1 -2
@@ -70,8 +70,6 @@ extern void kernel_thread_starter(void);*/ void exit_thread (struct task_struct *tsk) { -if (tsk == current) -exit_thread_runtime_instr (); }void flush_thread (void )
@@ -84,6 +82,7 @@ void release_thread(struct task_struct *dead_task)void arch_release_task_struct (struct task_struct *tsk) { +runtime_instr_release (tsk); }int arch_dup_task_struct (struct task_struct *dst,struct task_struct *src)
arch/s390/kernel/runtime_instr.c +15 -15
@@ -18,11 +18,24 @@/* empty control block to disable RI by loading it */ struct runtime_instr_cb runtime_instr_empty_cb; +void runtime_instr_release (struct task_struct *tsk) +{ +kfree (tsk->thread.ri_cb); +} +static void disable_runtime_instr (void ) { -struct pt_regs *regs =task_pt_regs (current); +struct task_struct *task = current; +struct pt_regs *regs; +if (!task->thread.ri_cb) +return ; + regs =task_pt_regs (task); +preempt_disable ();load_runtime_instr_cb (&runtime_instr_empty_cb); +kfree (task->thread.ri_cb); + task->thread.ri_cb =NULL ; +preempt_enable ();/* * Make sure the RI bit is deleted from the PSW. If the user did not
@@ -43,19 +56,6 @@ static void init_runtime_instr_cb(struct runtime_instr_cb *cb) cb->valid =1 ; } -void exit_thread_runtime_instr (void ) -{ -struct task_struct *task = current; - -preempt_disable (); -if (!task->thread.ri_cb) -return ; -disable_runtime_instr (); -kfree (task->thread.ri_cb); - task->thread.ri_cb =NULL ; -preempt_enable (); -} - SYSCALL_DEFINE1(s390_runtime_instr, int, command) {struct runtime_instr_cb *cb;
@@ -64,7 +64,7 @@ SYSCALL_DEFINE1(s390_runtime_instr, int, command)return -EOPNOTSUPP ;if (command ==S390_RUNTIME_INSTR_STOP ) { -exit_thread_runtime_instr (); +disable_runtime_instr ();return 0 ; }
arch/s390/pci/pci.c +3 -2
@@ -354,7 +354,8 @@ static void zpci_irq_handler(struct airq_struct *airq)/* End of second scan with interrupts on. */ break ;/* First scan complete, reenable interrupts. */ -zpci_set_irq_ctrl (SIC_IRQ_MODE_SINGLE ,NULL ,PCI_ISC ); +if (zpci_set_irq_ctrl (SIC_IRQ_MODE_SINGLE ,NULL ,PCI_ISC )) +break ; si =0 ;continue ; }
@@ -928,7 +929,7 @@ static int __init pci_base_init(void)if (!s390_pci_probe)return 0 ; -if (!test_facility (69 ) || !test_facility (71 ) || !test_facility (72 )) +if (!test_facility (69 ) || !test_facility (71 ))return 0 ; rc =zpci_debug_init ();
arch/s390/pci/pci_insn.c +5 -1
@@ -7,6 +7,7 @@#include <linux/export.h> #include <linux/errno.h> #include <linux/delay.h> +#include <asm/facility.h> #include <asm/pci_insn.h> #include <asm/pci_debug.h> #include <asm/processor.h>
@@ -91,11 +92,14 @@ int zpci_refresh_trans(u64 fn, u64 addr, u64 range) }/* Set Interruption Controls */ -void zpci_set_irq_ctrl (u16 ctl,char *unused,u8 isc) +int zpci_set_irq_ctrl (u16 ctl,char *unused,u8 isc) { +if (!test_facility (72 )) +return -EIO ; asmvolatile (" .insn rsy,0xeb00000000d1,%[ctl],%[isc],%[u]\n" : : [ctl]"d" (ctl), [isc]"d" (isc <<27 ), [u]"Q" (*unused)); +return 0 ; }/* PCI Load */
arch/x86/events/intel/ds.c +5 -1
@@ -1389,9 +1389,13 @@ static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs)continue ;/* log dropped samples number */ -if (error[bit]) +if (error[bit]) {perf_log_lost_samples (event, error[bit]); +if (perf_event_account_interrupt (event)) +x86_pmu_stop (event,0 ); + } +if (counts[bit]) {__intel_pmu_pebs_event (event, iregs, base, top, bit, counts[bit]);
arch/x86/include/asm/syscalls.h +1 -1
@@ -21,7 +21,7 @@ asmlinkage long sys_ioperm(unsigned long, unsigned long, int);asmlinkage long sys_iopl (unsigned int );/* kernel/ldt.c */ -asmlinkage int sys_modify_ldt(int, void __user *, unsigned long); +asmlinkage long sys_modify_ldt (int ,void __user *,unsigned long );/* kernel/signal.c */ asmlinkage long sys_rt_sigreturn (void );
arch/x86/kernel/fpu/xstate.c +1 -0
@@ -1077,6 +1077,7 @@ int copyin_to_xsaves(const void *kbuf, const void __user *ubuf,* Add back in the features that came in from userspace: */ xsave->header.xfeatures |= xfeatures; + xsave->header.xcomp_bv =XCOMP_BV_COMPACTED_FORMAT | xsave->header.xfeatures;return 0 ; }
arch/x86/kernel/kprobes/ftrace.c +14 -9
@@ -26,7 +26,7 @@#include "common.h" static nokprobe_inline -int __skip_singlestep(struct kprobe *p, struct pt_regs *regs, +void __skip_singlestep(struct kprobe *p, struct pt_regs *regs,struct kprobe_ctlblk *kcb,unsigned long orig_ip) {/*
@@ -41,20 +41,21 @@ int __skip_singlestep(struct kprobe *p, struct pt_regs *regs,__this_cpu_write (current_kprobe,NULL );if (orig_ip) regs->ip = orig_ip; -return 1 ; }int skip_singlestep (struct kprobe *p,struct pt_regs *regs,struct kprobe_ctlblk *kcb) { -if (kprobe_ftrace (p)) -return __skip_singlestep (p, regs, kcb,0 ); -else -return 0 ; +if (kprobe_ftrace (p)) { +__skip_singlestep (p, regs, kcb,0 ); +preempt_enable_no_resched (); +return 1 ; + } +return 0 ; }NOKPROBE_SYMBOL (skip_singlestep); -/* Ftrace callback handler for kprobes */ +/* Ftrace callback handler for kprobes -- called under preepmt disabed */ void kprobe_ftrace_handler (unsigned long ip,unsigned long parent_ip,struct ftrace_ops *ops,struct pt_regs *regs) {
@@ -77,13 +78,17 @@ void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,/* Kprobe handler expects regs->ip = ip + 1 as breakpoint hit */ regs->ip = ip +sizeof (kprobe_opcode_t); +/* To emulate trap based kprobes, preempt_disable here */ +preempt_disable ();__this_cpu_write (current_kprobe, p); kcb->kprobe_status =KPROBE_HIT_ACTIVE ; -if (!p->pre_handler || !p->pre_handler (p, regs)) +if (!p->pre_handler || !p->pre_handler (p, regs)) {__skip_singlestep (p, regs, kcb, orig_ip); +preempt_enable_no_resched (); + }/* * If pre_handler returns !0, it sets regs->ip and -* resets current kprobe. +* resets current kprobe, and keep preempt count +1. */ } end:
arch/x86/kernel/ldt.c +13 -3
@@ -12,6 +12,7 @@#include <linux/string.h> #include <linux/mm.h> #include <linux/smp.h> +#include <linux/syscalls.h> #include <linux/slab.h> #include <linux/vmalloc.h> #include <linux/uaccess.h>
@@ -271,8 +272,8 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)return error; } -asmlinkage int sys_modify_ldt(int func, void __user *ptr, -unsigned long bytecount) +SYSCALL_DEFINE3(modify_ldt, int , func , void __user * , ptr , + unsigned long , bytecount) {int ret = -ENOSYS ;
@@ -290,5 +291,14 @@ asmlinkage int sys_modify_ldt(int func, void __user *ptr, ret =write_ldt (ptr, bytecount,0 );break ; } -return ret; +/* +* The SYSCALL_DEFINE() macros give us an 'unsigned long' +* return type, but tht ABI for sys_modify_ldt() expects +* 'int'. This cast gives us an int-sized value in %rax +* for the return code. The 'unsigned' is necessary so +* the compiler does not try to sign-extend the negative +* return codes into the high half of the register when +* taking the value from int->long. +*/ +return (unsigned int )ret; }
arch/x86/um/ldt.c +5 -2
@@ -6,6 +6,7 @@#include <linux/mm.h> #include <linux/sched.h> #include <linux/slab.h> +#include <linux/syscalls.h> #include <linux/uaccess.h> #include <asm/unistd.h> #include <os.h>
@@ -369,7 +370,9 @@ void free_ldt(struct mm_context *mm) mm->arch.ldt.entry_count =0 ; } -int sys_modify_ldt (int func,void __user *ptr,unsigned long bytecount) +SYSCALL_DEFINE3(modify_ldt, int , func , void __user * , ptr , + unsigned long , bytecount) { -return do_modify_ldt_skas (func, ptr, bytecount); +/* See non-um modify_ldt() for why we do this cast */ +return (unsigned int )do_modify_ldt_skas (func, ptr, bytecount); }
drivers/crypto/caam/intern.h +1 -0
@@ -41,6 +41,7 @@ struct caam_drv_private_jr {struct device *dev;int ridx;struct caam_job_ring __iomem *rregs;/* JobR's register space */ +struct tasklet_struct irqtask;int irq;/* One per queue */ /* Number of scatterlist crypt transforms active on the JobR */
drivers/crypto/caam/jr.c +16 -9
@@ -73,6 +73,8 @@ static int caam_jr_shutdown(struct device *dev) ret =caam_reset_hw_jr (dev); +tasklet_kill (&jrp->irqtask); +/* Release interrupt */ free_irq (jrp->irq, dev);
@@ -128,7 +130,7 @@ static irqreturn_t caam_jr_interrupt(int irq, void *st_dev)/* * Check the output ring for ready responses, kick -* the threaded irq if jobs done. +* tasklet if jobs done. */ irqstate =rd_reg32 (&jrp->rregs->jrintstatus);if (!irqstate)
@@ -150,13 +152,18 @@ static irqreturn_t caam_jr_interrupt(int irq, void *st_dev)/* Have valid interrupt at this point, just ACK and trigger */ wr_reg32 (&jrp->rregs->jrintstatus, irqstate); -return IRQ_WAKE_THREAD ; +preempt_disable (); +tasklet_schedule (&jrp->irqtask); +preempt_enable (); + +return IRQ_HANDLED ; } -static irqreturn_t caam_jr_threadirq (int irq,void *st_dev) +/* Deferred service handler, run as interrupt-fired tasklet */ +static void caam_jr_dequeue (unsigned long devarg) {int hw_idx, sw_idx, i, head, tail; -struct device *dev = st_dev; +struct device *dev = (struct device *)devarg;struct caam_drv_private_jr *jrp =dev_get_drvdata (dev);void (*usercall)(struct device *dev,u32 *desc,u32 status,void *arg);u32 *userdesc, userstatus;
@@ -230,8 +237,6 @@ static irqreturn_t caam_jr_threadirq(int irq, void *st_dev)/* reenable / unmask IRQs */ clrsetbits_32 (&jrp->rregs->rconfig_lo,JRCFG_IMSK ,0 ); - -return IRQ_HANDLED ; }/**
@@ -389,10 +394,11 @@ static int caam_jr_init(struct device *dev) jrp =dev_get_drvdata (dev); +tasklet_init (&jrp->irqtask, caam_jr_dequeue, (unsigned long )dev); +/* Connect job ring interrupt handler. */ - error =request_threaded_irq (jrp->irq, caam_jr_interrupt, - caam_jr_threadirq,IRQF_SHARED , -dev_name (dev), dev); + error =request_irq (jrp->irq, caam_jr_interrupt,IRQF_SHARED , +dev_name (dev), dev);if (error) {dev_err (dev,"can't connect JobR %d interrupt (%d)\n" , jrp->ridx, jrp->irq);
@@ -454,6 +460,7 @@ static int caam_jr_init(struct device *dev) out_free_irq:free_irq (jrp->irq, dev); out_kill_deq: +tasklet_kill (&jrp->irqtask);return error; }
drivers/dma-buf/fence.c +26 -0
@@ -280,6 +280,31 @@ int fence_add_callback(struct fence *fence, struct fence_cb *cb, }EXPORT_SYMBOL (fence_add_callback); +/** +* fence_get_status - returns the status upon completion +* @fence: [in] the fence to query +* +* This wraps fence_get_status_locked() to return the error status +* condition on a signaled fence. See fence_get_status_locked() for more +* details. +* +* Returns 0 if the fence has not yet been signaled, 1 if the fence has +* been signaled without an error condition, or a negative error code +* if the fence has been completed in err. +*/ +int fence_get_status (struct fence *fence) +{ +unsigned long flags; +int status; + +spin_lock_irqsave (fence->lock, flags); + status =fence_get_status_locked (fence); +spin_unlock_irqrestore (fence->lock, flags); + +return status; +} +EXPORT_SYMBOL (fence_get_status); +/** * fence_remove_callback - remove a callback from the signaling list * @fence: [in] the fence to wait on
@@ -526,6 +551,7 @@ fence_init(struct fence *fence, const struct fence_ops *ops, fence->context = context; fence->seqno = seqno; fence->flags =0UL ; + fence->error =0 ;trace_fence_init (fence); }
drivers/dma-buf/sw_sync.c +130 -81
265 lines not on this page · raw message
drivers/dma-buf/sync_debug.c +18 -21
@@ -62,29 +62,29 @@ void sync_file_debug_remove(struct sync_file *sync_file)static const char *sync_status_str (int status) { -if (status ==0 ) -return "signaled" ; +if (status <0 ) +return "error" ;if (status >0 ) -return "active" ; +return "signaled" ; -return "error" ; +return "active" ; } -static void sync_print_fence (struct seq_file *s,struct fence *fence,bool show) +static void sync_print_fence (struct seq_file *s, +struct fence *fence,bool show) { -int status =1 ;struct sync_timeline *parent =fence_parent (fence); +int status; -if (fence_is_signaled_locked (fence)) - status = fence->status; + status =fence_get_status_locked (fence);seq_printf (s," %s%sfence %s" , show ? parent->name :"" , show ?"_" :"" ,sync_status_str (status)); -if (status <=0 ) { +if (status) {struct timespec64 ts64 =ktime_to_timespec64 (fence->timestamp);
@@ -116,17 +116,15 @@ static void sync_print_fence(struct seq_file *s, struct fence *fence, bool show)static void sync_print_obj (struct seq_file *s,struct sync_timeline *obj) {struct list_head *pos; -unsigned long flags;seq_printf (s,"%s: %d\n" , obj->name, obj->value); -spin_lock_irqsave (&obj->child_list_lock, flags); -list_for_each (pos, &obj->child_list_head) { -struct sync_pt *pt = - container_of(pos, struct sync_pt, child_list); +spin_lock_irq (&obj->lock); +list_for_each (pos, &obj->pt_list) { + struct sync_pt *pt = container_of(pos, struct sync_pt, link);sync_print_fence (s, &pt->base, false); } -spin_unlock_irqrestore (&obj->child_list_lock, flags); +spin_unlock_irq (&obj->lock); } static void sync_print_sync_file(struct seq_file *s,
@@ -135,7 +133,7 @@ static void sync_print_sync_file(struct seq_file *s,int i;seq_printf (s,"[%p] %s: %s\n" , sync_file, sync_file->name, -sync_status_str (!fence_is_signaled (sync_file->fence))); +sync_status_str (fence_get_status (sync_file->fence)));if (fence_is_array (sync_file->fence)) {struct fence_array *array =to_fence_array (sync_file->fence);
@@ -149,12 +147,11 @@ static void sync_print_sync_file(struct seq_file *s,static int sync_debugfs_show (struct seq_file *s,void *unused) { -unsigned long flags;struct list_head *pos;seq_puts (s,"objs:\n--------------\n" ); -spin_lock_irqsave (&sync_timeline_list_lock, flags); +spin_lock_irq (&sync_timeline_list_lock);list_for_each (pos, &sync_timeline_list_head) {struct sync_timeline *obj = container_of(pos, struct sync_timeline,
@@ -163,11 +160,11 @@ static int sync_debugfs_show(struct seq_file *s, void *unused)sync_print_obj (s, obj);seq_puts (s,"\n" ); } -spin_unlock_irqrestore (&sync_timeline_list_lock, flags); +spin_unlock_irq (&sync_timeline_list_lock);seq_puts (s,"fences:\n--------------\n" ); -spin_lock_irqsave (&sync_file_list_lock, flags); +spin_lock_irq (&sync_file_list_lock);list_for_each (pos, &sync_file_list_head) {struct sync_file *sync_file = container_of(pos, struct sync_file, sync_file_list);
@@ -175,7 +172,7 @@ static int sync_debugfs_show(struct seq_file *s, void *unused)sync_print_sync_file (s, sync_file);seq_puts (s,"\n" ); } -spin_unlock_irqrestore (&sync_file_list_lock, flags); +spin_unlock_irq (&sync_file_list_lock);return 0 ; }
drivers/dma-buf/sync_debug.h +13 -14
@@ -14,6 +14,7 @@#define _LINUX_SYNC_H#include <linux/list.h> +#include <linux/rbtree.h> #include <linux/spinlock.h> #include <linux/fence.h>
@@ -24,43 +25,41 @@* struct sync_timeline - sync object * @kref: reference count on fence. * @name: name of the sync_timeline. Useful for debugging -* @child_list_head: list of children sync_pts for this sync_timeline -* @child_list_lock: lock protecting @child_list_head and fence.status -* @active_list_head: list of active (unsignaled/errored) sync_pts +* @lock: lock protecting @pt_list and @value +* @pt_tree: rbtree of active (unsignaled/errored) sync_pts +* @pt_list: list of active (unsignaled/errored) sync_pts * @sync_timeline_list: membership in global sync_timeline_list */ struct sync_timeline {struct kref kref;char name[32 ]; -/* protected by child_list_lock */ +/* protected by lock */ u64 context;int value; -struct list_head child_list_head; -spinlock_t child_list_lock; - -struct list_head active_list_head; +struct rb_root pt_tree; +struct list_head pt_list; +spinlock_t lock;struct list_head sync_timeline_list; };static inline struct sync_timeline *fence_parent (struct fence *fence) { - return container_of(fence->lock, struct sync_timeline, - child_list_lock); + return container_of(fence->lock, struct sync_timeline, lock); }/** * struct sync_pt - sync_pt object * @base: base fence object -* @child_list: sync timeline child's list -* @active_list: sync timeline active child's list +* @link: link on the sync timeline's list +* @node: node in the sync timeline's tree */ struct sync_pt {struct fence base; -struct list_head child_list; -struct list_head active_list; +struct list_head link; +struct rb_node node; };#ifdef CONFIG_SW_SYNC
drivers/dma-buf/sync_file.c +7 -15
@@ -67,9 +67,10 @@ static void fence_check_cb_func(struct fence *f, struct fence_cb *cb)* sync_file_create() - creates a sync file * @fence: fence to add to the sync_fence * -* Creates a sync_file containg @fence. Once this is called, the sync_file -* takes ownership of @fence. The sync_file can be released with -* fput(sync_file->file). Returns the sync_file or NULL in case of error. +* Creates a sync_file containg @fence. This function acquires and additional +* reference of @fence for the newly-created &sync_file, if it succeeds. The +* sync_file can be released with fput(sync_file->file). Returns the +* sync_file or NULL in case of error. */ struct sync_file *sync_file_create (struct fence *fence) {
@@ -79,7 +80,7 @@ struct sync_file *sync_file_create(struct fence *fence)if (!sync_file)return NULL ; - sync_file->fence = fence; + sync_file->fence =fence_get (fence); snprintf(sync_file->name, sizeof(sync_file->name), "%s-%s%llu-%d", fence->ops->get_driver_name(fence),
@@ -90,13 +91,6 @@ struct sync_file *sync_file_create(struct fence *fence) }EXPORT_SYMBOL (sync_file_create); -/** -* sync_file_fdget() - get a sync_file from an fd -* @fd: fd referencing a fence -* -* Ensures @fd references a valid sync_file, increments the refcount of the -* backing file. Returns the sync_file or NULL in case of error. -*/ static struct sync_file *sync_file_fdget (int fd) {struct file *file =fget (fd);
@@ -377,10 +371,8 @@ static void sync_fill_fence_info(struct fence *fence, sizeof(info->obj_name));strlcpy (info->driver_name, fence->ops->get_driver_name (fence),sizeof (info->driver_name)); -if (fence_is_signaled (fence)) - info->status = fence->status >=0 ?1 : fence->status; -else - info->status =0 ; + + info->status =fence_get_status (fence); info->timestamp_ns =ktime_to_ns (fence->timestamp); }
drivers/dma/pl330.c +6 -13
@@ -1694,7 +1694,6 @@ static bool _chan_ns(const struct pl330_dmac *pl330, int i)static struct pl330_thread *pl330_request_channel (struct pl330_dmac *pl330) {struct pl330_thread *thrd =NULL ; -unsigned long flags;int chans, i;if (pl330->state ==DYING )
@@ -1702,8 +1701,6 @@ static struct pl330_thread *pl330_request_channel(struct pl330_dmac *pl330) chans = pl330->pcfg.num_chan; -spin_lock_irqsave (&pl330->lock, flags); -for (i =0 ; i < chans; i++) { thrd = &pl330->channels[i]; if ((thrd->free) && (!_manager_ns(thrd) ||
@@ -1721,8 +1718,6 @@ static struct pl330_thread *pl330_request_channel(struct pl330_dmac *pl330) thrd =NULL ; } -spin_unlock_irqrestore (&pl330->lock, flags); -return thrd; }
@@ -1740,7 +1735,6 @@ static inline void _free_event(struct pl330_thread *thrd, int ev)static void pl330_release_channel (struct pl330_thread *thrd) {struct pl330_dmac *pl330; -unsigned long flags;if (!thrd || thrd->free)return ;
@@ -1752,10 +1746,8 @@ static void pl330_release_channel(struct pl330_thread *thrd) pl330 = thrd->dmac; -spin_lock_irqsave (&pl330->lock, flags);_free_event (thrd, thrd->ev); thrd->free = true; -spin_unlock_irqrestore (&pl330->lock, flags); }/* Initialize the structure for PL330 configuration, that can be used
@@ -2120,20 +2112,20 @@ static int pl330_alloc_chan_resources(struct dma_chan *chan)struct pl330_dmac *pl330 = pch->dmac;unsigned long flags; -spin_lock_irqsave (&pch->lock, flags); +spin_lock_irqsave (&pl330->lock, flags);dma_cookie_init (chan); pch->cyclic = false; pch->thread =pl330_request_channel (pl330);if (!pch->thread) { -spin_unlock_irqrestore (&pch->lock, flags); +spin_unlock_irqrestore (&pl330->lock, flags);return -ENOMEM ; }tasklet_init (&pch->task, pl330_tasklet, (unsigned long ) pch); -spin_unlock_irqrestore (&pch->lock, flags); +spin_unlock_irqrestore (&pl330->lock, flags);return 1 ; }
@@ -2236,12 +2228,13 @@ static int pl330_pause(struct dma_chan *chan)static void pl330_free_chan_resources (struct dma_chan *chan) {struct dma_pl330_chan *pch =to_pchan (chan); +struct pl330_dmac *pl330 = pch->dmac;unsigned long flags;tasklet_kill (&pch->task);pm_runtime_get_sync (pch->dmac->ddma.dev); -spin_lock_irqsave (&pch->lock, flags); +spin_lock_irqsave (&pl330->lock, flags);pl330_release_channel (pch->thread); pch->thread =NULL ;
@@ -2249,7 +2242,7 @@ static void pl330_free_chan_resources(struct dma_chan *chan)if (pch->cyclic)list_splice_tail_init (&pch->work_list, &pch->dmac->desc_pool); -spin_unlock_irqrestore (&pch->lock, flags); +spin_unlock_irqrestore (&pl330->lock, flags);pm_runtime_mark_last_busy (pch->dmac->ddma.dev);pm_runtime_put_autosuspend (pch->dmac->ddma.dev); }
drivers/dma/stm32-dma.c +5 -12
@@ -884,7 +884,7 @@ static enum dma_status stm32_dma_tx_status(struct dma_chan *c,struct virt_dma_desc *vdesc;enum dma_status status;unsigned long flags; -u32 residue; +u32 residue =0 ; status =dma_cookie_status (c, cookie, state);if ((status ==DMA_COMPLETE ) || (!state))
@@ -892,16 +892,12 @@ static enum dma_status stm32_dma_tx_status(struct dma_chan *c,spin_lock_irqsave (&chan->vchan.lock, flags); vdesc =vchan_find_desc (&chan->vchan, cookie); -if (cookie == chan->desc->vdesc.tx.cookie) { +if (chan->desc && cookie == chan->desc->vdesc.tx.cookie) residue =stm32_dma_desc_residue (chan, chan->desc, chan->next_sg); - }else if (vdesc) { +else if (vdesc) residue =stm32_dma_desc_residue (chan,to_stm32_dma_desc (vdesc),0 ); - }else { - residue =0 ; - } -dma_set_residue (state, residue);spin_unlock_irqrestore (&chan->vchan.lock, flags);
@@ -976,21 +972,18 @@ static struct dma_chan *stm32_dma_of_xlate(struct of_phandle_args *dma_spec,struct stm32_dma_chan *chan;struct dma_chan *c; -if (dma_spec->args_count <3 ) +if (dma_spec->args_count <4 )return NULL ; cfg.channel_id = dma_spec->args[0 ]; cfg.request_line = dma_spec->args[1 ]; cfg.stream_config = dma_spec->args[2 ]; - cfg.threshold =0 ; + cfg.threshold = dma_spec->args[3 ];if ((cfg.channel_id >=STM32_DMA_MAX_CHANNELS ) || (cfg.request_line >=STM32_DMA_MAX_REQUEST_ID ))return NULL ; -if (dma_spec->args_count >3 ) - cfg.threshold = dma_spec->args[3 ]; - chan = &dmadev->chan[cfg.channel_id]; c =dma_get_slave_channel (&chan->vchan.chan);
drivers/edac/sb_edac.c +1 -0
@@ -2510,6 +2510,7 @@ static int ibridge_mci_bind_devs(struct mem_ctl_info *mci,break ;case PCI_DEVICE_ID_INTEL_IBRIDGE_IMC_HA0_TA : pvt->pci_ta = pdev; +break ;case PCI_DEVICE_ID_INTEL_IBRIDGE_IMC_HA0_RAS : pvt->pci_ras = pdev;break ;
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +1 -4
@@ -565,11 +565,8 @@ static const struct drm_encoder_helper_funcs dce_virtual_encoder_helper_funcs =static void dce_virtual_encoder_destroy (struct drm_encoder *encoder) { -struct amdgpu_encoder *amdgpu_encoder =to_amdgpu_encoder (encoder); - -kfree (amdgpu_encoder->enc_priv);drm_encoder_cleanup (encoder); -kfree (amdgpu_encoder); +kfree (encoder); }static const struct drm_encoder_funcs dce_virtual_encoder_funcs = {
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +1 -1
@@ -182,7 +182,7 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct amdgpu_device *adev,WREG32 (mmVCE_UENC_CLOCK_GATING_2, data); data =RREG32 (mmVCE_UENC_REG_CLOCK_GATING); - data &= ~0xffc00000 ; + data &= ~0x3ff ;WREG32 (mmVCE_UENC_REG_CLOCK_GATING, data); data =RREG32 (mmVCE_UENC_DMA_DCLK_CTRL);
drivers/gpu/drm/exynos/exynos5433_drm_decon.c +6 -3
@@ -46,7 +46,8 @@ enum decon_flag_bits {BIT_CLKS_ENABLED ,BIT_IRQS_ENABLED ,BIT_WIN_UPDATED , -BIT_SUSPENDED +BIT_SUSPENDED , +BIT_REQUEST_UPDATE }; struct decon_context {
@@ -315,6 +316,7 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,/* window enable */ decon_set_bits (ctx,DECON_WINCONx (win), WINCONx_ENWIN_F, ~0 ); +set_bit (BIT_REQUEST_UPDATE , &ctx->flags); } static void decon_disable_plane(struct exynos_drm_crtc *crtc,
@@ -327,6 +329,7 @@ static void decon_disable_plane(struct exynos_drm_crtc *crtc,return ;decon_set_bits (ctx,DECON_WINCONx (win), WINCONx_ENWIN_F,0 ); +set_bit (BIT_REQUEST_UPDATE , &ctx->flags); }static void decon_atomic_flush (struct exynos_drm_crtc *crtc)
@@ -340,8 +343,8 @@ static void decon_atomic_flush(struct exynos_drm_crtc *crtc)for (i = ctx->first_win; i <WINDOWS_NR ; i++)decon_shadow_protect_win (ctx, i, false); -/* standalone update */ -decon_set_bits (ctx,DECON_UPDATE ,STANDALONE_UPDATE_F , ~0 ); +if (test_and_clear_bit (BIT_REQUEST_UPDATE , &ctx->flags)) +decon_set_bits (ctx,DECON_UPDATE ,STANDALONE_UPDATE_F , ~0 );if (ctx->out_type &IFTYPE_I80 )set_bit (BIT_WIN_UPDATED , &ctx->flags);
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +1 -2
@@ -243,7 +243,6 @@ static int fsl_dcu_drm_pm_suspend(struct device *dev)return PTR_ERR (fsl_dev->state); } -clk_disable_unprepare (fsl_dev->pix_clk);clk_disable_unprepare (fsl_dev->clk);return 0 ;
@@ -266,6 +265,7 @@ static int fsl_dcu_drm_pm_resume(struct device *dev)if (fsl_dev->tcon)fsl_tcon_bypass_enable (fsl_dev->tcon);fsl_dcu_drm_init_planes (fsl_dev->drm); +enable_irq (fsl_dev->irq);drm_atomic_helper_resume (fsl_dev->drm, fsl_dev->state);console_lock ();
@@ -273,7 +273,6 @@ static int fsl_dcu_drm_pm_resume(struct device *dev)console_unlock ();drm_kms_helper_poll_enable (fsl_dev->drm); -enable_irq (fsl_dev->irq);return 0 ; }
drivers/i2c/busses/i2c-cadence.c +4 -4
@@ -962,10 +962,6 @@ static int cdns_i2c_probe(struct platform_device *pdev) goto err_clk_dis; } - ret =i2c_add_adapter (&id->adap); -if (ret <0 ) - goto err_clk_dis; -/* * Cadence I2C controller has a bug wherein it generates * invalid read transaction after HW timeout in master receiver mode.
@@ -975,6 +971,10 @@ static int cdns_i2c_probe(struct platform_device *pdev)*/ cdns_i2c_writereg (CDNS_I2C_TIMEOUT_MAX ,CDNS_I2C_TIME_OUT_OFFSET ); + ret =i2c_add_adapter (&id->adap); +if (ret <0 ) + goto err_clk_dis; +dev_info (&pdev->dev,"%u kHz mmio %08lx irq %d\n" , id->i2c_clk /1000 , (unsigned long )r_mem->start, id->irq);
drivers/iio/adc/ti-ads1015.c +1 -0
@@ -269,6 +269,7 @@ int ads1015_get_adc_result(struct ads1015_data *data, int chan, int *val) conv_time =DIV_ROUND_UP (USEC_PER_SEC , data->data_rate[dr_old]); conv_time +=DIV_ROUND_UP (USEC_PER_SEC , data->data_rate[dr]); + conv_time += conv_time /10 ;/* 10% internal clock inaccuracy */ usleep_range (conv_time, conv_time +1 ); data->conv_invalid = false; }
drivers/infiniband/hw/qedr/qedr_cm.c +2 -2
@@ -404,9 +404,9 @@ static inline int qedr_gsi_build_packet(struct qedr_dev *dev, }if (ether_addr_equal (udh.eth.smac_h, udh.eth.dmac_h)) - packet->tx_dest =QED_ROCE_LL2_TX_DEST_NW ; -else packet->tx_dest =QED_ROCE_LL2_TX_DEST_LB ; +else + packet->tx_dest =QED_ROCE_LL2_TX_DEST_NW ; packet->roce_mode = roce_mode;memcpy (packet->header.vaddr, ud_header_buffer, header_size);
drivers/infiniband/hw/qedr/verbs.c +1 -1
@@ -1653,7 +1653,7 @@ static int qedr_update_qp_state(struct qedr_dev *dev,int status =0 ;if (new_state == qp->state) -return 1 ; +return 0 ;switch (qp->state) {case QED_ROCE_QP_STATE_RESET :
drivers/md/bcache/request.c +8 -1
@@ -703,7 +703,14 @@ static void cached_dev_read_error(struct closure *cl) struct search *s = container_of(cl, struct search, cl);struct bio *bio = &s->bio.bio; -if (s->recoverable) { +/* +* If read request hit dirty data (s->read_dirty_data is true), +* then recovery a failed read request from cached device may +* get a stale data back. So read failure recovery is only +* permitted when read request hit clean data in cache device, +* or when cache read race happened. +*/ +if (s->recoverable && !s->read_dirty_data) {/* Retry from the backing device: */ trace_bcache_read_retry (s->orig_bio);
drivers/mmc/host/sdhci-msm.c +18 -0
@@ -642,6 +642,21 @@ static int sdhci_msm_probe(struct platform_device *pdev) CORE_VENDOR_SPEC_CAPABILITIES0); } +/* +* Power on reset state may trigger power irq if previous status of +* PWRCTL was either BUS_ON or IO_HIGH_V. So before enabling pwr irq +* interrupt in GIC, any pending power irq interrupt should be +* acknowledged. Otherwise power irq interrupt handler would be +* fired prematurely. +*/ +sdhci_msm_voltage_switch (host); + +/* +* Ensure that above writes are propogated before interrupt enablement +* in GIC. +*/ +mb (); +/* Setup IRQ for handling power/voltage tasks with PMIC */ msm_host->pwr_irq =platform_get_irq_byname (pdev,"pwr_irq" );if (msm_host->pwr_irq <0 ) {
@@ -651,6 +666,9 @@ static int sdhci_msm_probe(struct platform_device *pdev) goto clk_disable; } +/* Enable pwr irq interrupts */ +writel_relaxed (INT_MASK , msm_host->core_mem +CORE_PWRCTL_MASK ); + ret =devm_request_threaded_irq (&pdev->dev, msm_host->pwr_irq,NULL , sdhci_msm_pwr_irq,IRQF_ONESHOT ,dev_name (&pdev->dev), host);
drivers/net/appletalk/ipddp.c +1 -1
@@ -191,7 +191,7 @@ static netdev_tx_t ipddp_xmit(struct sk_buff *skb, struct net_device *dev)*/ static int ipddp_create (struct ipddp_route *new_rt) { -struct ipddp_route *rt =kmalloc (sizeof (*rt),GFP_KERNEL ); +struct ipddp_route *rt =kzalloc (sizeof (*rt),GFP_KERNEL );if (rt ==NULL )return -ENOMEM ;
drivers/net/ethernet/broadcom/bcmsysport.c +11 -12
@@ -1023,15 +1023,6 @@ static netdev_tx_t bcm_sysport_xmit(struct sk_buff *skb, goto out; } -/* Insert TSB and checksum infos */ -if (priv->tsb_en) { - skb =bcm_sysport_insert_tsb (skb, dev); -if (!skb) { - ret =NETDEV_TX_OK ; - goto out; - } - } -/* The Ethernet switch we are interfaced with needs packets to be at * least 64 bytes (including FCS) otherwise they will be discarded when * they enter the switch port logic. When Broadcom tags are enabled, we
@@ -1039,13 +1030,21 @@ static netdev_tx_t bcm_sysport_xmit(struct sk_buff *skb,* (including FCS and tag) because the length verification is done after * the Broadcom tag is stripped off the ingress packet. */ -if (skb_padto (skb,ETH_ZLEN +ENET_BRCM_TAG_LEN )) { +if (skb_put_padto (skb,ETH_ZLEN +ENET_BRCM_TAG_LEN )) { ret =NETDEV_TX_OK ; goto out; } - skb_len = skb->len <ETH_ZLEN +ENET_BRCM_TAG_LEN ? -ETH_ZLEN +ENET_BRCM_TAG_LEN : skb->len; +/* Insert TSB and checksum infos */ +if (priv->tsb_en) { + skb =bcm_sysport_insert_tsb (skb, dev); +if (!skb) { + ret =NETDEV_TX_OK ; + goto out; + } + } + + skb_len = skb->len; mapping =dma_map_single (kdev, skb->data, skb_len,DMA_TO_DEVICE );if (dma_mapping_error (kdev, mapping)) {
drivers/net/ethernet/cavium/thunder/thunder_xcv.c +1 -2
@@ -116,8 +116,7 @@ void xcv_setup_link(bool link_up, int link_speed)int speed =2 ;if (!xcv) { -dev_err (&xcv->pdev->dev, -"XCV init not done, probe may have failed\n" ); +pr_err ("XCV init not done, probe may have failed\n" );return ; }
drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.c +5 -7
@@ -133,17 +133,15 @@ cxgb_find_route6(struct cxgb4_lld_info *lldi,if (ipv6_addr_type (&fl6.daddr) &IPV6_ADDR_LINKLOCAL ) fl6.flowi6_oif = sin6_scope_id; dst =ip6_route_output (&init_net,NULL , &fl6); -if (!dst) - goto out; -if (!cxgb_our_interface (lldi, get_real_dev, -ip6_dst_idev (dst)->dev) && - !(ip6_dst_idev (dst)->dev->flags &IFF_LOOPBACK )) { +if (dst->error || + (!cxgb_our_interface (lldi, get_real_dev, +ip6_dst_idev (dst)->dev) && + !(ip6_dst_idev (dst)->dev->flags &IFF_LOOPBACK ))) {dst_release (dst); - dst =NULL ; +return NULL ; } } -out:return dst; }EXPORT_SYMBOL (cxgb_find_route6);
drivers/net/ethernet/emulex/benet/be_main.c +32 -13
97 lines not on this page · raw message
drivers/net/ethernet/freescale/fec_main.c +9 -14
@@ -2923,6 +2923,7 @@ static void set_multicast_list(struct net_device *ndev)struct netdev_hw_addr *ha;unsigned int i, bit, data, crc, tmp;unsigned char hash; +unsigned int hash_high =0 , hash_low =0 ;if (ndev->flags &IFF_PROMISC ) { tmp =readl (fep->hwp +FEC_R_CNTRL );
@@ -2945,11 +2946,7 @@ static void set_multicast_list(struct net_device *ndev)return ; } -/* Clear filter and add the addresses in hash register -*/ -writel (0 , fep->hwp +FEC_GRP_HASH_TABLE_HIGH ); -writel (0 , fep->hwp +FEC_GRP_HASH_TABLE_LOW ); - +/* Add the addresses in hash register */ netdev_for_each_mc_addr (ha, ndev) {/* calculate crc32 value of mac address */ crc =0xffffffff ;
@@ -2967,16 +2964,14 @@ static void set_multicast_list(struct net_device *ndev)*/ hash = (crc >> (32 -FEC_HASH_BITS )) &0x3f ; -if (hash >31 ) { - tmp =readl (fep->hwp +FEC_GRP_HASH_TABLE_HIGH ); - tmp |=1 << (hash -32 ); -writel (tmp, fep->hwp +FEC_GRP_HASH_TABLE_HIGH ); - }else { - tmp =readl (fep->hwp +FEC_GRP_HASH_TABLE_LOW ); - tmp |=1 << hash; -writel (tmp, fep->hwp +FEC_GRP_HASH_TABLE_LOW ); - } +if (hash >31 ) + hash_high |=1 << (hash -32 ); +else + hash_low |=1 << hash; } + +writel (hash_high, fep->hwp +FEC_GRP_HASH_TABLE_HIGH ); +writel (hash_low, fep->hwp +FEC_GRP_HASH_TABLE_LOW ); }/* Set a MAC change in hardware. */
drivers/net/ethernet/mellanox/mlx4/en_clock.c +2 -6
@@ -251,13 +251,9 @@ static u32 freq_to_shift(u16 freq) {u32 freq_khz = freq *1000 ;u64 max_val_cycles = freq_khz *1000 *MLX4_EN_WRAP_AROUND_SEC ; -u64 tmp_rounded = -roundup_pow_of_two (max_val_cycles) > max_val_cycles ? -roundup_pow_of_two (max_val_cycles) -1 :UINT_MAX ; -u64 max_val_cycles_rounded =is_power_of_2 (max_val_cycles +1 ) ? - max_val_cycles : tmp_rounded; +u64 max_val_cycles_rounded =1ULL <<fls64 (max_val_cycles -1 );/* calculate max possible multiplier in order to fit in 64bit */ -u64 max_mul =div_u64 (0xffffffffffffffffULL , max_val_cycles_rounded); +u64 max_mul =div64_u64 (ULLONG_MAX , max_val_cycles_rounded);/* This comes from the reverse of clocksource_khz2mult */ return ilog2 (div_u64 (max_mul * freq_khz,1000000 ));
drivers/net/ethernet/renesas/ravb_main.c +2 -6
@@ -941,14 +941,10 @@ static int ravb_poll(struct napi_struct *napi, int budget)/* Receive error message handling */ priv->rx_over_errors = priv->stats[RAVB_BE ].rx_over_errors; priv->rx_over_errors += priv->stats[RAVB_NC ].rx_over_errors; -if (priv->rx_over_errors != ndev->stats.rx_over_errors) { +if (priv->rx_over_errors != ndev->stats.rx_over_errors) ndev->stats.rx_over_errors = priv->rx_over_errors; -netif_err (priv, rx_err, ndev,"Receive Descriptor Empty\n" ); - } -if (priv->rx_fifo_errors != ndev->stats.rx_fifo_errors) { +if (priv->rx_fifo_errors != ndev->stats.rx_fifo_errors) ndev->stats.rx_fifo_errors = priv->rx_fifo_errors; -netif_err (priv, rx_err, ndev,"Receive FIFO Overflow\n" ); - } out:return budget - quota; }
drivers/net/gtp.c +5 -7
@@ -69,7 +69,6 @@ struct gtp_dev {struct socket *sock0;struct socket *sock1u; -struct net *net;struct net_device *dev;unsigned int hash_size;
@@ -316,7 +315,7 @@ static int gtp_encap_recv(struct sock *sk, struct sk_buff *skb)netdev_dbg (gtp->dev,"encap_recv sk=%p\n" , sk); - xnet = !net_eq (gtp->net,dev_net (gtp->dev)); + xnet = !net_eq (sock_net (sk),dev_net (gtp->dev));switch (udp_sk (sk)->encap_type) {case UDP_ENCAP_GTP0 :
@@ -612,7 +611,7 @@ static netdev_tx_t gtp_dev_xmit(struct sk_buff *skb, struct net_device *dev) pktinfo.fl4.saddr, pktinfo.fl4.daddr, pktinfo.iph->tos,ip4_dst_hoplimit (&pktinfo.rt->dst), -htons (IP_DF ), +0 , pktinfo.gtph_port, pktinfo.gtph_port, true, false);break ;
@@ -658,7 +657,7 @@ static void gtp_link_setup(struct net_device *dev)static int gtp_hashtable_new (struct gtp_dev *gtp,int hsize);static void gtp_hashtable_free (struct gtp_dev *gtp);static int gtp_encap_enable (struct net_device *dev,struct gtp_dev *gtp, -int fd_gtp0,int fd_gtp1,struct net *src_net); +int fd_gtp0,int fd_gtp1);static int gtp_newlink (struct net *src_net,struct net_device *dev,struct nlattr *tb[],struct nlattr *data[])
@@ -675,7 +674,7 @@ static int gtp_newlink(struct net *src_net, struct net_device *dev, fd0 =nla_get_u32 (data[IFLA_GTP_FD0 ]); fd1 =nla_get_u32 (data[IFLA_GTP_FD1 ]); - err =gtp_encap_enable (dev, gtp, fd0, fd1, src_net); + err =gtp_encap_enable (dev, gtp, fd0, fd1);if (err <0 ) goto out_err;
@@ -821,7 +820,7 @@ static void gtp_hashtable_free(struct gtp_dev *gtp) }static int gtp_encap_enable (struct net_device *dev,struct gtp_dev *gtp, -int fd_gtp0,int fd_gtp1,struct net *src_net) +int fd_gtp0,int fd_gtp1) {struct udp_tunnel_sock_cfg tuncfg = {NULL };struct socket *sock0, *sock1u;
@@ -858,7 +857,6 @@ static int gtp_encap_enable(struct net_device *dev, struct gtp_dev *gtp, gtp->sock0 = sock0; gtp->sock1u = sock1u; - gtp->net = src_net; tuncfg.sk_user_data = gtp; tuncfg.encap_rcv = gtp_encap_recv;
drivers/net/phy/micrel.c +1 -1
@@ -1020,7 +1020,7 @@ static struct phy_driver ksphy_driver[] = { .phy_id = PHY_ID_KSZ8795, .phy_id_mask = MICREL_PHY_ID_MASK, .name = "Micrel KSZ8795", - .features = (SUPPORTED_Pause | SUPPORTED_Asym_Pause), + .features = PHY_BASIC_FEATURES, .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, .config_init = kszphy_config_init, .config_aneg = ksz8873mll_config_aneg,
drivers/net/xen-netback/common.h +4 -4
@@ -113,10 +113,10 @@ struct xenvif_stats {* A subset of struct net_device_stats that contains only the * fields that are updated in netback.c for each queue. */ -unsigned int rx_bytes; -unsigned int rx_packets; -unsigned int tx_bytes; -unsigned int tx_packets; +u64 rx_bytes; +u64 rx_packets; +u64 tx_bytes; +u64 tx_packets;/* Additional stats used by xenvif */ unsigned long rx_gso_checksum_fixup;
drivers/net/xen-netback/interface.c +4 -4
@@ -225,10 +225,10 @@ static struct net_device_stats *xenvif_get_stats(struct net_device *dev) {struct xenvif *vif =netdev_priv (dev);struct xenvif_queue *queue =NULL ; -unsigned long rx_bytes =0 ; -unsigned long rx_packets =0 ; -unsigned long tx_bytes =0 ; -unsigned long tx_packets =0 ; +u64 rx_bytes =0 ; +u64 rx_packets =0 ; +u64 tx_bytes =0 ; +u64 tx_packets =0 ;unsigned int index;spin_lock (&vif->lock);
drivers/net/xen-netfront.c +10 -18
@@ -1854,27 +1854,19 @@ static int talk_to_netback(struct xenbus_device *dev,xennet_destroy_queues (info); err =xennet_create_queues (info, &num_queues); -if (err <0 ) - goto destroy_ring; +if (err <0 ) { +xenbus_dev_fatal (dev, err,"creating queues" ); +kfree (info->queues); + info->queues =NULL ; + goto out; + }/* Create shared ring, alloc event channel -- for each queue */ for (i =0 ; i < num_queues; ++i) { queue = &info->queues[i]; err =setup_netfront (dev, queue, feature_split_evtchn); -if (err) { -/* setup_netfront() will tidy up the current -* queue on error, but we need to clean up -* those already allocated. -*/ -if (i >0 ) { -rtnl_lock (); -netif_set_real_num_tx_queues (info->netdev, i); -rtnl_unlock (); - goto destroy_ring; - }else { - goto out; - } - } +if (err) + goto destroy_ring; } again:
@@ -1964,9 +1956,9 @@ static int talk_to_netback(struct xenbus_device *dev,xenbus_transaction_end (xbt,1 ); destroy_ring:xennet_disconnect_backend (info); -kfree (info->queues); - info->queues =NULL ; +xennet_destroy_queues (info); out: +device_unregister (&dev->dev);return err; }
drivers/nvme/target/core.c +3 -0
@@ -816,6 +816,9 @@ static void nvmet_ctrl_free(struct kref *ref)list_del (&ctrl->subsys_entry);mutex_unlock (&subsys->lock); +flush_work (&ctrl->async_event_work); +cancel_work_sync (&ctrl->fatal_err_work); +ida_simple_remove (&subsys->cntlid_ida, ctrl->cntlid);nvmet_subsys_put (subsys);
drivers/scsi/qla2xxx/qla_target.c +1 -7
@@ -668,11 +668,9 @@ static int qlt_reset(struct scsi_qla_host *vha, void *iocb, int mcmd) {struct qla_hw_data *ha = vha->hw;struct qla_tgt_sess *sess =NULL ; -uint32_t unpacked_lun, lun =0 ;uint16_t loop_id;int res =0 ;struct imm_ntfy_from_isp *n = (struct imm_ntfy_from_isp *)iocb; -struct atio_from_isp *a = (struct atio_from_isp *)iocb;unsigned long flags; loop_id =le16_to_cpu (n->u.isp24.nport_handle);
@@ -725,11 +723,7 @@ static int qlt_reset(struct scsi_qla_host *vha, void *iocb, int mcmd)"loop_id %d)\n" , vha->host_no, sess, sess->port_name, mcmd, loop_id); - lun = a->u.isp24.fcp_cmnd.lun; - unpacked_lun =scsilun_to_int ((struct scsi_lun *)&lun); - -return qlt_issue_task_mgmt (sess, unpacked_lun, mcmd, - iocb,QLA24XX_MGMT_SEND_NACK ); +return qlt_issue_task_mgmt (sess,0 , mcmd, iocb,QLA24XX_MGMT_SEND_NACK ); }/* ha->tgt.sess_lock supposed to be held on entry */
drivers/spi/spi-axi-spi-engine.c +3 -1
@@ -553,7 +553,7 @@ static int spi_engine_probe(struct platform_device *pdev)static int spi_engine_remove (struct platform_device *pdev) { -struct spi_master *master =platform_get_drvdata (pdev); +struct spi_master *master =spi_master_get (platform_get_drvdata (pdev));struct spi_engine *spi_engine =spi_master_get_devdata (master);int irq =platform_get_irq (pdev,0 );
@@ -561,6 +561,8 @@ static int spi_engine_remove(struct platform_device *pdev)free_irq (irq, master); +spi_master_put (master); +writel_relaxed (0xff , spi_engine->base +SPI_ENGINE_REG_INT_PENDING );writel_relaxed (0x00 , spi_engine->base +SPI_ENGINE_REG_INT_ENABLE );writel_relaxed (0x01 , spi_engine->base +SPI_ENGINE_REG_RESET );
drivers/spi/spi-sh-msiof.c +1 -1
@@ -862,7 +862,7 @@ static int sh_msiof_transfer_one(struct spi_master *master,break ; copy32 = copy_bswap32; }else if (bits <=16 ) { -if (l &1 ) +if (l &3 )break ; copy32 = copy_wswap32; }else {
drivers/staging/greybus/loopback.c +3 -1
@@ -1034,8 +1034,10 @@ static int gb_loopback_fn(void *data) error =gb_loopback_async_sink (gb, size); } -if (error) +if (error) { gb->error++; + gb->iteration_count++; + } }else {/* We are effectively single threaded here */ if (type ==GB_LOOPBACK_TYPE_PING )
drivers/staging/lustre/lustre/llite/llite_mmap.c +1 -3
@@ -401,15 +401,13 @@ static int ll_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) result =VM_FAULT_LOCKED ;break ;case -ENODATA : +case -EAGAIN :case -EFAULT : result =VM_FAULT_NOPAGE ;break ;case -ENOMEM : result =VM_FAULT_OOM ;break ; -case -EAGAIN : - result =VM_FAULT_RETRY ; -break ;default : result =VM_FAULT_SIGBUS ;break ;
drivers/staging/media/cec/cec-adap.c +3 -4
@@ -608,8 +608,7 @@ int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg, }memset (msg->msg + msg->len,0 ,sizeof (msg->msg) - msg->len);if (msg->len ==1 ) { -if (cec_msg_initiator (msg) !=0xf || -cec_msg_destination (msg) ==0xf ) { +if (cec_msg_destination (msg) ==0xf ) {dprintk (1 ,"cec_transmit_msg: invalid poll message\n" );return -EINVAL ; }
@@ -634,7 +633,7 @@ int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg,dprintk (1 ,"cec_transmit_msg: destination is the adapter itself\n" );return -EINVAL ; } -if (cec_msg_initiator (msg) !=0xf && +if (msg->len >1 && adap->is_configured && !cec_has_log_addr (adap,cec_msg_initiator (msg))) {dprintk (1 ,"cec_transmit_msg: initiator has unknown logical address %d\n" ,cec_msg_initiator (msg));
@@ -883,7 +882,7 @@ static int cec_config_log_addr(struct cec_adapter *adap,/* Send poll message */ msg.len =1 ; - msg.msg[0 ] =0xf0 | log_addr; + msg.msg[0 ] = (log_addr <<4 ) | log_addr; err =cec_transmit_msg_fh (adap, &msg,NULL , true);/*
drivers/staging/rtl8188eu/core/rtw_mlme.c +3 -3
@@ -107,10 +107,10 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)void rtw_free_mlme_priv (struct mlme_priv *pmlmepriv) { -rtw_free_mlme_priv_ie_data (pmlmepriv); - -if (pmlmepriv) +if (pmlmepriv) { +rtw_free_mlme_priv_ie_data (pmlmepriv);vfree (pmlmepriv->free_bss_buf); + } }struct wlan_network *_rtw_alloc_network (struct mlme_priv *pmlmepriv)
drivers/tty/serial/8250/8250_fintek.c +1 -1
@@ -121,7 +121,7 @@ static int fintek_8250_rs485_config(struct uart_port *port,if ((!!(rs485->flags &SER_RS485_RTS_ON_SEND )) == (!!(rs485->flags &SER_RS485_RTS_AFTER_SEND ))) - rs485->flags &=SER_RS485_ENABLED ; + rs485->flags &= ~SER_RS485_ENABLED ;else config |=RS485_URA ;
drivers/tty/serial/8250/8250_pci.c +3 -0
@@ -5568,6 +5568,9 @@ static struct pci_device_id serial_pci_tbl[] = { { PCI_DEVICE(0x1601, 0x0800), .driver_data = pbn_b0_4_1250000 }, { PCI_DEVICE(0x1601, 0xa801), .driver_data = pbn_b0_4_1250000 }, + /* Amazon PCI serial device */ + { PCI_DEVICE(0x1d0f, 0x8250), .driver_data = pbn_b0_1_115200 }, +/* * These entries match devices with class COMMUNICATION_SERIAL, * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
drivers/tty/serial/8250/8250_port.c +4 -1
@@ -2526,8 +2526,11 @@ static void serial8250_set_divisor(struct uart_port *port, unsigned int baud,serial_dl_write (up, quot);/* XR17V35x UARTs have an extra fractional divisor register (DLD) */ -if (up->port.type ==PORT_XR17V35X ) +if (up->port.type ==PORT_XR17V35X ) { +/* Preserve bits not related to baudrate; DLD[7:4]. */ + quot_frac |=serial_port_in (port,0x2 ) &0xf0 ;serial_port_out (port,0x2 , quot_frac); + } } static unsigned int serial8250_get_baud_rate(struct uart_port *port,
drivers/tty/sysrq.c +7 -2
@@ -243,8 +243,10 @@ static void sysrq_handle_showallcpus(int key)* architecture has no support for it: */ if (!trigger_all_cpu_backtrace ()) { -struct pt_regs *regs =get_irq_regs (); +struct pt_regs *regs =NULL ; +if (in_irq ()) + regs =get_irq_regs ();if (regs) {pr_info ("CPU%d:\n" ,smp_processor_id ());show_regs (regs);
@@ -263,7 +265,10 @@ static struct sysrq_key_op sysrq_showallcpus_op = {static void sysrq_handle_showregs (int key) { -struct pt_regs *regs =get_irq_regs (); +struct pt_regs *regs =NULL ; + +if (in_irq ()) + regs =get_irq_regs ();if (regs)show_regs (regs);perf_event_print_debug ();
drivers/usb/core/config.c +24 -4
@@ -900,14 +900,25 @@ void usb_release_bos_descriptor(struct usb_device *dev) } } +static const __u8 bos_desc_len[256 ] = { + [USB_CAP_TYPE_WIRELESS_USB ] =USB_DT_USB_WIRELESS_CAP_SIZE , + [USB_CAP_TYPE_EXT ] =USB_DT_USB_EXT_CAP_SIZE , + [USB_SS_CAP_TYPE ] =USB_DT_USB_SS_CAP_SIZE , + [USB_SSP_CAP_TYPE ] =USB_DT_USB_SSP_CAP_SIZE (1 ), + [CONTAINER_ID_TYPE ] =USB_DT_USB_SS_CONTN_ID_SIZE , + [USB_PTM_CAP_TYPE ] =USB_DT_USB_PTM_ID_SIZE , +}; +/* Get BOS descriptor set */ int usb_get_bos_descriptor (struct usb_device *dev) {struct device *ddev = &dev->dev;struct usb_bos_descriptor *bos;struct usb_dev_cap_header *cap; +struct usb_ssp_cap_descriptor *ssp_cap;unsigned char *buffer; -int length, total_len, num, i; +int length, total_len, num, i, ssac; +__u8 cap_type;int ret; bos =kzalloc (sizeof (struct usb_bos_descriptor ),GFP_KERNEL );
@@ -960,7 +971,13 @@ int usb_get_bos_descriptor(struct usb_device *dev) dev->bos->desc->bNumDeviceCaps = i;break ; } + cap_type = cap->bDevCapabilityType; length = cap->bLength; +if (bos_desc_len[cap_type] && length < bos_desc_len[cap_type]) { + dev->bos->desc->bNumDeviceCaps = i; +break ; + } + total_len -= length;if (cap->bDescriptorType !=USB_DT_DEVICE_CAPABILITY ) {
@@ -968,7 +985,7 @@ int usb_get_bos_descriptor(struct usb_device *dev)continue ; } -switch (cap->bDevCapabilityType) { +switch (cap_type) {case USB_CAP_TYPE_WIRELESS_USB :/* Wireless USB cap descriptor is handled by wusb */ break ;
@@ -981,8 +998,11 @@ int usb_get_bos_descriptor(struct usb_device *dev) (struct usb_ss_cap_descriptor *)buffer;break ;case USB_SSP_CAP_TYPE : - dev->bos->ssp_cap = - (struct usb_ssp_cap_descriptor *)buffer; + ssp_cap = (struct usb_ssp_cap_descriptor *)buffer; + ssac = (le32_to_cpu (ssp_cap->bmAttributes) & +USB_SSP_SUBLINK_SPEED_ATTRIBS ) +1 ; +if (length >=USB_DT_USB_SSP_CAP_SIZE (ssac)) + dev->bos->ssp_cap = ssp_cap;break ;case CONTAINER_ID_TYPE : dev->bos->ss_id =
drivers/usb/core/devio.c +27 -29
99 lines not on this page · raw message
drivers/usb/core/hub.c +9 -0
@@ -4925,6 +4925,15 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,usb_put_dev (udev);if ((status == -ENOTCONN ) || (status == -ENOTSUPP ))break ; + +/* When halfway through our retry count, power-cycle the port */ +if (i == (SET_CONFIG_TRIES /2 ) -1 ) { +dev_info (&port_dev->dev,"attempt power cycle\n" ); +usb_hub_set_port_power (hdev, hub, port1, false); +msleep (2 *hub_power_on_good_delay (hub)); +usb_hub_set_port_power (hdev, hub, port1, true); +msleep (hub_power_on_good_delay (hub)); + } } if (hub->hdev->parent || !hcd->driver->port_handed_over ||
drivers/usb/core/quirks.c +3 -0
@@ -151,6 +151,9 @@ static const struct usb_device_id usb_quirk_list[] = {/* appletouch */ { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Genesys Logic hub, internally used by KY-688 USB 3.1 Type-C Hub */ + { USB_DEVICE(0x05e3, 0x0612), .driver_info = USB_QUIRK_NO_LPM }, + /* Genesys Logic hub, internally used by Moshi USB to Ethernet Adapter */ { USB_DEVICE(0x05e3, 0x0616), .driver_info = USB_QUIRK_NO_LPM },
drivers/usb/gadget/function/f_fs.c +1 -1
@@ -2263,7 +2263,7 @@ static int __ffs_data_do_os_desc(enum ffs_os_desc_type type,if (len <sizeof (*d) || d->bFirstInterfaceNumber >= ffs->interfaces_count || - !d->Reserved1) + d->Reserved1)return -EINVAL ;for (i =0 ; i <ARRAY_SIZE (d->Reserved2); ++i)if (d->Reserved2[i])
drivers/usb/host/ehci-dbg.c +1 -1
@@ -837,7 +837,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)default :/* unknown */ break; } - temp = (cap >>8 ) &0xff ; + offset = (cap >>8 ) &0xff ; } }#endif
drivers/usb/host/xhci-mem.c +7 -0
@@ -996,6 +996,12 @@ void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_id)if (!vdev)return ; +if (vdev->real_port ==0 || + vdev->real_port >HCS_MAX_PORTS (xhci->hcs_params1)) { +xhci_dbg (xhci,"Bad vdev->real_port.\n" ); + goto out; + } + tt_list_head = &(xhci->rh_bw[vdev->real_port -1 ].tts);list_for_each_entry_safe (tt_info, next, tt_list_head, tt_list) {/* is this a hub device that added a tt_info to the tts list */
@@ -1009,6 +1015,7 @@ void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_id) } } } +out:/* we are now at a leaf device */ xhci_free_virt_device (xhci, slot_id); }
drivers/usb/phy/phy-tahvo.c +2 -1
@@ -368,7 +368,8 @@ static int tahvo_usb_probe(struct platform_device *pdev) tu->extcon =devm_extcon_dev_allocate (&pdev->dev, tahvo_cable);if (IS_ERR (tu->extcon)) {dev_err (&pdev->dev,"failed to allocate memory for extcon\n" ); -return -ENOMEM ; + ret =PTR_ERR (tu->extcon); + goto err_disable_clk; } ret =devm_extcon_dev_register (&pdev->dev, tu->extcon);
drivers/usb/serial/option.c +3 -0
@@ -241,6 +241,7 @@ static void option_instat_callback(struct urb *urb);/* These Quectel products use Quectel's vendor ID */ #define QUECTEL_PRODUCT_EC21 0x0121#define QUECTEL_PRODUCT_EC25 0x0125 +#define QUECTEL_PRODUCT_BG96 0x0296#define CMOTECH_VENDOR_ID 0x16d8#define CMOTECH_PRODUCT_6001 0x6001
@@ -1185,6 +1186,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC25), .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003),
drivers/usb/storage/uas-detect.h +4 -0
@@ -111,6 +111,10 @@ static int uas_use_uas_driver(struct usb_interface *intf, } } +/* All Seagate disk enclosures have broken ATA pass-through support */ +if (le16_to_cpu (udev->descriptor.idVendor) ==0x0bc2 ) + flags |=US_FL_NO_ATA_1X ; +usb_stor_adjust_quirks (udev, &flags);if (flags &US_FL_IGNORE_UAS ) {
drivers/vfio/vfio_iommu_spapr_tce.c +5 -6
@@ -1123,12 +1123,11 @@ static long tce_iommu_ioctl(void *iommu_data,mutex_lock (&container->lock); ret =tce_iommu_create_default_window (container); -if (ret) -return ret; - - ret =tce_iommu_create_window (container, create.page_shift, - create.window_size, create.levels, - &create.start_addr); +if (!ret) + ret =tce_iommu_create_window (container, + create.page_shift, + create.window_size, create.levels, + &create.start_addr);mutex_unlock (&container->lock);
fs/dax.c +11 -17
@@ -1265,6 +1265,17 @@ iomap_dax_actor(struct inode *inode, loff_t pos, loff_t length, void *data,if (WARN_ON_ONCE (iomap->type !=IOMAP_MAPPED ))return -EIO ; +/* +* Write can allocate block for an area which has a hole page mapped +* into page tables. We have to tear down these mappings so that data +* written by write(2) is visible in mmap. +*/ +if ((iomap->flags &IOMAP_F_NEW ) && inode->i_mapping->nrpages) { +invalidate_inode_pages2_range (inode->i_mapping, + pos >>PAGE_SHIFT , + (end -1 ) >>PAGE_SHIFT ); + } +while (pos < end) {unsigned offset = pos & (PAGE_SIZE -1 );struct blk_dax_ctl dax = {0 };
@@ -1329,23 +1340,6 @@ iomap_dax_rw(struct kiocb *iocb, struct iov_iter *iter,if (iov_iter_rw (iter) ==WRITE ) flags |=IOMAP_WRITE ; -/* -* Yes, even DAX files can have page cache attached to them: A zeroed -* page is inserted into the pagecache when we have to serve a write -* fault on a hole. It should never be dirtied and can simply be -* dropped from the pagecache once we get real data for the page. -* -* XXX: This is racy against mmap, and there's nothing we can do about -* it. We'll eventually need to shift this down even further so that -* we can check if we allocated blocks over a hole first. -*/ -if (mapping->nrpages) { - ret =invalidate_inode_pages2_range (mapping, - pos >>PAGE_SHIFT , - (pos +iov_iter_count (iter) -1 ) >>PAGE_SHIFT ); -WARN_ON_ONCE (ret); - } -while (iov_iter_count (iter)) { ret =iomap_apply (inode, pos,iov_iter_count (iter), flags, ops, iter, iomap_dax_actor);
fs/libfs.c +2 -1
@@ -245,7 +245,8 @@ struct dentry *mount_pseudo_xattr(struct file_system_type *fs_type, char *name,struct inode *root;struct qstr d_name =QSTR_INIT (name,strlen (name)); - s =sget (fs_type,NULL , set_anon_super,MS_NOUSER ,NULL ); + s =sget_userns (fs_type,NULL , set_anon_super,MS_KERNMOUNT |MS_NOUSER , + &init_user_ns,NULL );if (IS_ERR (s))return ERR_CAST (s);
fs/nfs/nfs4proc.c +0 -3
@@ -38,7 +38,6 @@#include <linux/mm.h> #include <linux/delay.h> #include <linux/errno.h> -#include <linux/file.h> #include <linux/string.h> #include <linux/ratelimit.h> #include <linux/printk.h>
@@ -6006,7 +6005,6 @@ static struct nfs4_lockdata *nfs4_alloc_lockdata(struct file_lock *fl, p->server = server;atomic_inc (&lsp->ls_count); p->ctx =get_nfs_open_context (ctx); -get_file (fl->fl_file);memcpy (&p->fl, fl,sizeof (p->fl));return p; out_free_seqid:
@@ -6119,7 +6117,6 @@ static void nfs4_lock_release(void *calldata)nfs_free_seqid (data->arg.lock_seqid);nfs4_put_lock_state (data->lsp);put_nfs_open_context (data->ctx); -fput (data->fl.fl_file);kfree (data);dprintk ("%s: done!\n" , __func__); }
fs/nfs/nfs4state.c +0 -1
@@ -1718,7 +1718,6 @@ static int nfs4_recovery_handle_error(struct nfs_client *clp, int error)break ;case -NFS4ERR_STALE_CLIENTID :set_bit (NFS4CLNT_LEASE_EXPIRED , &clp->cl_state); -nfs4_state_clear_reclaim_reboot (clp);nfs4_state_start_reclaim_reboot (clp);break ;case -NFS4ERR_EXPIRED :
include/linux/buffer_head.h +1 -3
@@ -239,12 +239,10 @@ static inline int block_page_mkwrite_return(int err) {if (err ==0 )return VM_FAULT_LOCKED ; -if (err == -EFAULT ) +if (err == -EFAULT || err == -EAGAIN )return VM_FAULT_NOPAGE ;if (err == -ENOMEM )return VM_FAULT_OOM ; -if (err == -EAGAIN ) -return VM_FAULT_RETRY ;/* -ENOSPC, -EDQUOT, -EIO ... */ return VM_FAULT_SIGBUS ; }
include/linux/fence.h +62 -5
109 lines not on this page · raw message
include/linux/perf_event.h +1 -0
@@ -1259,6 +1259,7 @@ extern void perf_event_disable(struct perf_event *event);extern void perf_event_disable_local (struct perf_event *event);extern void perf_event_disable_inatomic (struct perf_event *event);extern void perf_event_task_tick (void ); +extern int perf_event_account_interrupt (struct perf_event *event);#else /* !CONFIG_PERF_EVENTS: */ static inline void * perf_aux_output_begin(struct perf_output_handle *handle,
include/uapi/linux/usb/ch9.h +3 -0
@@ -854,6 +854,8 @@ struct usb_wireless_cap_descriptor { /* Ultra Wide Band */__u8 bReserved; } __attribute__((packed)); +#define USB_DT_USB_WIRELESS_CAP_SIZE 11 +/* USB 2.0 Extension descriptor */ #define USB_CAP_TYPE_EXT 2
@@ -1046,6 +1048,7 @@ struct usb_ptm_cap_descriptor {__u8 bDevCapabilityType; } __attribute__((packed)); +#define USB_DT_USB_PTM_ID_SIZE 3/* * The size of the descriptor for the Sublink Speed Attribute Count * (SSAC) specified in bmAttributes[4:0].
kernel/events/core.c +31 -16
62 lines not on this page · raw message
mm/oom_kill.c +4 -3
@@ -524,7 +524,6 @@ static bool __oom_reap_task_mm(struct task_struct *tsk, struct mm_struct *mm)*/ set_bit (MMF_UNSTABLE , &mm->flags); -tlb_gather_mmu (&tlb, mm,0 ,-1 );for (vma = mm->mmap ; vma; vma = vma->vm_next) {if (is_vm_hugetlb_page (vma))continue ;
@@ -546,11 +545,13 @@ static bool __oom_reap_task_mm(struct task_struct *tsk, struct mm_struct *mm)* we do not want to block exit_mmap by keeping mm ref * count elevated without a good reason. */ -if (vma_is_anonymous (vma) || !(vma->vm_flags &VM_SHARED )) +if (vma_is_anonymous (vma) || !(vma->vm_flags &VM_SHARED )) { +tlb_gather_mmu (&tlb, mm, vma->vm_start, vma->vm_end);unmap_page_range (&tlb, vma, vma->vm_start, vma->vm_end, &details); +tlb_finish_mmu (&tlb, vma->vm_start, vma->vm_end); + } } -tlb_finish_mmu (&tlb,0 ,-1 ); pr_info("oom_reaper: reaped process %d (%s), now anon-rss:%lukB, file-rss:%lukB, shmem-rss:%lukB\n", task_pid_nr(tsk), tsk->comm, K(get_mm_counter(mm, MM_ANONPAGES)),
mm/page_alloc.c +4 -11
@@ -2592,30 +2592,23 @@ int __isolate_free_page(struct page *page, unsigned int order)* Update NUMA hit/miss statistics * * Must be called with interrupts disabled. -* -* When __GFP_OTHER_NODE is set assume the node of the preferred -* zone is the local node. This is useful for daemons who allocate -* memory on behalf of other processes. */ static inline void zone_statistics (struct zone *preferred_zone,struct zone *z,gfp_t flags) {#ifdef CONFIG_NUMA -int local_nid =numa_node_id ();enum zone_stat_item local_stat =NUMA_LOCAL ; -if (unlikely (flags & __GFP_OTHER_NODE)) { +if (z->node !=numa_node_id ()) local_stat =NUMA_OTHER ; - local_nid = preferred_zone->node; - } -if (z->node == local_nid) { +if (z->node == preferred_zone->node)__inc_zone_state (z,NUMA_HIT ); -__inc_zone_state (z, local_stat); - }else { +else {__inc_zone_state (z,NUMA_MISS );__inc_zone_state (preferred_zone,NUMA_FOREIGN ); } +__inc_zone_state (z, local_stat);#endif }
net/ipv4/tcp_input.c +1 -1
@@ -5081,7 +5081,7 @@ static void tcp_check_space(struct sock *sk)if (sock_flag (sk,SOCK_QUEUE_SHRUNK )) {sock_reset_flag (sk,SOCK_QUEUE_SHRUNK );/* pairs with tcp_poll() */ -smp_mb__after_atomic (); +smp_mb ();if (sk->sk_socket &&test_bit (SOCK_NOSPACE , &sk->sk_socket->flags))tcp_new_space (sk);
net/ipv6/ip6_vti.c +1 -1
@@ -189,12 +189,12 @@ static int vti6_tnl_create2(struct net_device *dev)struct vti6_net *ip6n =net_generic (net, vti6_net_id);int err; + dev->rtnl_link_ops = &vti6_link_ops; err =register_netdevice (dev);if (err <0 ) goto out;strcpy (t->parms.name, dev->name); - dev->rtnl_link_ops = &vti6_link_ops;dev_hold (dev);vti6_tnl_link (ip6n, t);
net/l2tp/l2tp_ip.c +6 -13
@@ -48,7 +48,8 @@ static inline struct l2tp_ip_sock *l2tp_ip_sk(const struct sock *sk)return (struct l2tp_ip_sock *)sk; } -static struct sock *__l2tp_ip_bind_lookup (struct net *net,__be32 laddr,int dif,u32 tunnel_id) +static struct sock *__l2tp_ip_bind_lookup (const struct net *net,__be32 laddr, +__be32 raddr,int dif,u32 tunnel_id) {struct sock *sk;
@@ -62,6 +63,7 @@ static struct sock *__l2tp_ip_bind_lookup(struct net *net, __be32 laddr, int difif ((l2tp->conn_id == tunnel_id) &&net_eq (sock_net (sk), net) && !(inet->inet_rcv_saddr && inet->inet_rcv_saddr != laddr) && + (!inet->inet_daddr || !raddr || inet->inet_daddr == raddr) && (!sk->sk_bound_dev_if || !dif || sk->sk_bound_dev_if == dif)) goto found;
@@ -72,15 +74,6 @@ static struct sock *__l2tp_ip_bind_lookup(struct net *net, __be32 laddr, int difreturn sk; } -static inline struct sock *l2tp_ip_bind_lookup (struct net *net,__be32 laddr,int dif,u32 tunnel_id) -{ -struct sock *sk =__l2tp_ip_bind_lookup (net, laddr, dif, tunnel_id); -if (sk) -sock_hold (sk); - -return sk; -} -/* When processing receive frames, there are two cases to * consider. Data frames consist of a non-zero session-id and an * optional cookie. Control frames consist of a regular L2TP header
@@ -186,8 +179,8 @@ static int l2tp_ip_recv(struct sk_buff *skb)struct iphdr *iph = (struct iphdr *)skb_network_header (skb);read_lock_bh (&l2tp_ip_lock); - sk =__l2tp_ip_bind_lookup (net, iph->daddr,inet_iif (skb), - tunnel_id); + sk =__l2tp_ip_bind_lookup (net, iph->daddr, iph->saddr, +inet_iif (skb), tunnel_id);if (!sk) {read_unlock_bh (&l2tp_ip_lock); goto discard;
@@ -289,7 +282,7 @@ static int l2tp_ip_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) inet->inet_saddr =0 ;/* Use device */ write_lock_bh (&l2tp_ip_lock); -if (__l2tp_ip_bind_lookup (net, addr->l2tp_addr.s_addr, +if (__l2tp_ip_bind_lookup (net, addr->l2tp_addr.s_addr,0 , sk->sk_bound_dev_if, addr->l2tp_conn_id)) {write_unlock_bh (&l2tp_ip_lock); ret = -EADDRINUSE ;
net/l2tp/l2tp_ip6.c +6 -14
@@ -59,12 +59,14 @@ static inline struct l2tp_ip6_sock *l2tp_ip6_sk(const struct sock *sk)static struct sock *__l2tp_ip6_bind_lookup (struct net *net,struct in6_addr *laddr, +const struct in6_addr *raddr,int dif,u32 tunnel_id) {struct sock *sk;sk_for_each_bound (sk, &l2tp_ip6_bind_table) {const struct in6_addr *sk_laddr =inet6_rcv_saddr (sk); +const struct in6_addr *sk_raddr = &sk->sk_v6_daddr;struct l2tp_ip6_sock *l2tp =l2tp_ip6_sk (sk);if (l2tp ==NULL )
@@ -73,6 +75,7 @@ static struct sock *__l2tp_ip6_bind_lookup(struct net *net,if ((l2tp->conn_id == tunnel_id) &&net_eq (sock_net (sk), net) && (!sk_laddr ||ipv6_addr_any (sk_laddr) ||ipv6_addr_equal (sk_laddr, laddr)) && + (!raddr ||ipv6_addr_any (sk_raddr) ||ipv6_addr_equal (sk_raddr, raddr)) && (!sk->sk_bound_dev_if || !dif || sk->sk_bound_dev_if == dif)) goto found;
@@ -83,17 +86,6 @@ static struct sock *__l2tp_ip6_bind_lookup(struct net *net,return sk; } -static inline struct sock *l2tp_ip6_bind_lookup (struct net *net, -struct in6_addr *laddr, -int dif,u32 tunnel_id) -{ -struct sock *sk =__l2tp_ip6_bind_lookup (net, laddr, dif, tunnel_id); -if (sk) -sock_hold (sk); - -return sk; -} -/* When processing receive frames, there are two cases to * consider. Data frames consist of a non-zero session-id and an * optional cookie. Control frames consist of a regular L2TP header
@@ -200,8 +192,8 @@ static int l2tp_ip6_recv(struct sk_buff *skb)struct ipv6hdr *iph =ipv6_hdr (skb);read_lock_bh (&l2tp_ip6_lock); - sk =__l2tp_ip6_bind_lookup (net, &iph->daddr,inet6_iif (skb), - tunnel_id); + sk =__l2tp_ip6_bind_lookup (net, &iph->daddr, &iph->saddr, +inet6_iif (skb), tunnel_id);if (!sk) {read_unlock_bh (&l2tp_ip6_lock); goto discard;
@@ -339,7 +331,7 @@ static int l2tp_ip6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)rcu_read_unlock ();write_lock_bh (&l2tp_ip6_lock); -if (__l2tp_ip6_bind_lookup (net, &addr->l2tp_addr, bound_dev_if, +if (__l2tp_ip6_bind_lookup (net, &addr->l2tp_addr,NULL , bound_dev_if, addr->l2tp_conn_id)) {write_unlock_bh (&l2tp_ip6_lock); err = -EADDRINUSE ;
net/mac80211/chan.c +0 -3
@@ -231,9 +231,6 @@ ieee80211_get_max_required_bw(struct ieee80211_sub_if_data *sdata) !(sta->sdata->bss && sta->sdata->bss == sdata->bss)) continue; -if (!sta->uploaded || !test_sta_flag (sta,WLAN_STA_ASSOC )) -continue ; - max_bw =max (max_bw,ieee80211_get_sta_bw (&sta->sta)); }rcu_read_unlock ();
net/mac80211/tx.c +7 -10
@@ -1244,7 +1244,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,static struct txq_info *ieee80211_get_txq (struct ieee80211_local *local,struct ieee80211_vif *vif, -struct ieee80211_sta *pubsta, +struct sta_info *sta,struct sk_buff *skb) {struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
@@ -1258,10 +1258,13 @@ static struct txq_info *ieee80211_get_txq(struct ieee80211_local *local,if (!ieee80211_is_data (hdr->frame_control))return NULL ; -if (pubsta) { +if (sta) {u8 tid = skb->priority &IEEE80211_QOS_CTL_TID_MASK ; - txq = pubsta->txq[tid]; +if (!sta->uploaded) +return NULL ; + + txq = sta->sta.txq[tid]; }else if (vif) { txq = vif->txq; }
@@ -1499,23 +1502,17 @@ static bool ieee80211_queue_skb(struct ieee80211_local *local,struct fq *fq = &local->fq;struct ieee80211_vif *vif;struct txq_info *txqi; -struct ieee80211_sta *pubsta;if (!local->ops->wake_tx_queue || sdata->vif.type ==NL80211_IFTYPE_MONITOR )return false; -if (sta && sta->uploaded) - pubsta = &sta->sta; -else - pubsta =NULL ; -if (sdata->vif.type ==NL80211_IFTYPE_AP_VLAN ) sdata =container_of (sdata->bss, struct ieee80211_sub_if_data, u.ap); vif = &sdata->vif; - txqi =ieee80211_get_txq (local, vif, pubsta, skb); + txqi =ieee80211_get_txq (local, vif, sta, skb);if (!txqi)return false;
net/qrtr/qrtr.c +2 -2
@@ -252,7 +252,7 @@ static struct sk_buff *qrtr_alloc_resume_tx(u32 src_node,const int pkt_len =20 ;struct qrtr_hdr *hdr;struct sk_buff *skb; -u32 *buf; +__le32 *buf; skb =alloc_skb (QRTR_HDR_SIZE + pkt_len,GFP_KERNEL );if (!skb)
@@ -269,7 +269,7 @@ static struct sk_buff *qrtr_alloc_resume_tx(u32 src_node, hdr->dst_node_id =cpu_to_le32 (dst_node); hdr->dst_port_id =cpu_to_le32 (QRTR_PORT_CTRL ); - buf = (u32 *)skb_put (skb, pkt_len); + buf = (__le32 *)skb_put (skb, pkt_len);memset (buf,0 , pkt_len); buf[0 ] =cpu_to_le32 (QRTR_TYPE_RESUME_TX ); buf[1 ] =cpu_to_le32 (src_node);
net/sctp/debug.c +1 -1
@@ -166,7 +166,7 @@ static const char *const sctp_timer_tbl[] = {/* Lookup timer debug name. */ const char *sctp_tname (const sctp_subtype_t id) { -if (id.timeout <=SCTP_EVENT_TIMEOUT_MAX ) +if (id.timeout <ARRAY_SIZE (sctp_timer_tbl))return sctp_timer_tbl[id.timeout];return "unknown_timer" ; }
net/tipc/server.c +6 -14
@@ -86,7 +86,6 @@ struct outqueue_entry {static void tipc_recv_work (struct work_struct *work);static void tipc_send_work (struct work_struct *work);static void tipc_clean_outqueues (struct tipc_conn *con); -static void tipc_sock_release (struct tipc_conn *con);static void tipc_conn_kref_release (struct kref *kref) {
@@ -104,7 +103,6 @@ static void tipc_conn_kref_release(struct kref *kref) } saddr->scope = -TIPC_NODE_SCOPE ;kernel_bind (sock, (struct sockaddr *)saddr,sizeof (*saddr)); -tipc_sock_release (con);sock_release (sock); con->sock =NULL ;
@@ -194,19 +192,15 @@ static void tipc_unregister_callbacks(struct tipc_conn *con)write_unlock_bh (&sk->sk_callback_lock); } -static void tipc_sock_release (struct tipc_conn *con) +static void tipc_close_conn (struct tipc_conn *con) {struct tipc_server *s = con->server; -if (con->conid) - s->tipc_conn_release (con->conid, con->usr_data); - -tipc_unregister_callbacks (con); -} - -static void tipc_close_conn (struct tipc_conn *con) -{if (test_and_clear_bit (CF_CONNECTED , &con->flags)) { +tipc_unregister_callbacks (con); + +if (con->conid) + s->tipc_conn_release (con->conid, con->usr_data);/* We shouldn't flush pending works as we may be in the * thread. In fact the races with pending rx/tx work structs
@@ -625,14 +619,12 @@ int tipc_server_start(struct tipc_server *s)void tipc_server_stop (struct tipc_server *s) {struct tipc_conn *con; -int total =0 ;int id;spin_lock_bh (&s->idr_lock); -for (id =0 ; total < s->idr_in_use; id++) { +for (id =0 ; s->idr_in_use; id++) { con =idr_find (&s->conn_idr, id);if (con) { - total++;spin_unlock_bh (&s->idr_lock);tipc_close_conn (con);spin_lock_bh (&s->idr_lock);
security/integrity/ima/ima_main.c +4 -0
@@ -51,6 +51,8 @@ static int __init hash_setup(char *str) ima_hash_algo =HASH_ALGO_SHA1 ; else if (strncmp(str, "md5", 3) == 0) ima_hash_algo =HASH_ALGO_MD5 ; + else + return 1; goto out; }
@@ -60,6 +62,8 @@ static int __init hash_setup(char *str)break ; } } +if (i ==HASH_ALGO__LAST ) +return 1 ; out: hash_setup_done =1 ;return 1 ;
tools/include/linux/poison.h +5 -0
@@ -14,6 +14,10 @@# define POISON_POINTER_DELTA 0#endif +#ifdef __cplusplus +#define LIST_POISON1 NULL +#define LIST_POISON2 NULL +#else /* * These are non-NULL pointers that will result in page faults * under normal circumstances, used to verify that nobody uses
@@ -21,6 +25,7 @@*/ #define LIST_POISON1 ((void *) 0x100 + POISON_POINTER_DELTA)#define LIST_POISON2 ((void *) 0x200 + POISON_POINTER_DELTA) +#endif /********** include/linux/timer.h **********/ /*
tools/perf/tests/attr.c +1 -1
@@ -150,7 +150,7 @@ static int run_dir(const char *d, const char *perf)snprintf (cmd,3 *PATH_MAX ,PYTHON " %s/attr.py -d %s/attr/ -p %s %.*s" , d, d, perf, vcnt, v); -return system (cmd); +return system (cmd) ?TEST_FAIL :TEST_OK ; }int test__attr (int subtest__maybe_unused )
tools/testing/selftests/x86/ldt_gdt.c +16 -1
@@ -360,9 +360,24 @@ static void do_simple_tests(void)install_invalid (&desc, false); desc.seg_not_present =0 ; - desc.read_exec_only =0 ; desc.seg_32bit =1 ; + desc.read_exec_only =0 ; + desc.limit =0xfffff ; +install_valid (&desc,AR_DPL3 |AR_TYPE_RWDATA |AR_S |AR_P |AR_DB ); + + desc.limit_in_pages =1 ; + +install_valid (&desc,AR_DPL3 |AR_TYPE_RWDATA |AR_S |AR_P |AR_DB |AR_G ); + desc.read_exec_only =1 ; +install_valid (&desc,AR_DPL3 |AR_TYPE_RODATA |AR_S |AR_P |AR_DB |AR_G ); + desc.contents =1 ; + desc.read_exec_only =0 ; +install_valid (&desc,AR_DPL3 |AR_TYPE_RWDATA_EXPDOWN |AR_S |AR_P |AR_DB |AR_G ); + desc.read_exec_only =1 ; +install_valid (&desc,AR_DPL3 |AR_TYPE_RODATA_EXPDOWN |AR_S |AR_P |AR_DB |AR_G ); + + desc.limit =0 ;install_invalid (&desc, true); }
tools/usb/usbip/Makefile.am +2 -1
@@ -1,6 +1,7 @@ SUBDIRS := libsrc src includedir = @includedir@/usbip include_HEADERS := $(addprefix libsrc/, \ - usbip_common.h vhci_driver.h usbip_host_driver.h) + usbip_common.h vhci_driver.h usbip_host_driver.h \ + list.h sysfs_utils.h usbip_host_common.h) dist_man_MANS := $(addprefix doc/, usbip.8 usbipd.8)
virt/kvm/arm/arch_timer.c +0 -3
@@ -89,9 +89,6 @@ static void kvm_timer_inject_irq_work(struct work_struct *work)struct kvm_vcpu *vcpu; vcpu = container_of(work, struct kvm_vcpu, arch.timer_cpu.expired); - vcpu->arch.timer_cpu.armed = false; - -WARN_ON (!kvm_timer_should_fire (vcpu));/* * If the vcpu is blocked we want to wake it up so that it will see