Linux 4.4.277
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.4.277 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.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/bcm63138.dtsi | 2 arch/arm/boot/dts/bcm7445-bcm97445svmb.dts | 4 arch/arm/boot/dts/bcm7445.dtsi | 2 arch/arm/boot/dts/bcm963138dvt.dts | 4 arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi | 5 - arch/arm/mach-imx/suspend-imx53.S | 4 arch/powerpc/kvm/book3s_rtas.c | 25 +++++ arch/s390/include/asm/ftrace.h | 1 arch/s390/kernel/ftrace.c | 2 arch/s390/kernel/mcount.S | 4 arch/s390/net/bpf_jit_comp.c | 2 arch/x86/include/asm/fpu/internal.h | 30 +------ arch/x86/kernel/fpu/xstate.c | 37 +++++++- drivers/iio/accel/bma180.c | 75 +++++++++++------ drivers/media/pci/ngene/ngene-core.c | 2 drivers/media/pci/ngene/ngene.h | 14 +-- drivers/memory/fsl_ifc.c | 4 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 21 +--- drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c | 6 - drivers/net/ethernet/intel/i40evf/i40evf_main.c | 1 drivers/net/ethernet/intel/igb/igb_main.c | 9 +- drivers/net/ethernet/moxa/moxart_ether.c | 4 drivers/net/ethernet/ti/tlan.c | 3 drivers/scsi/aic7xxx/aic7xxx_core.c | 2 drivers/scsi/scsi_transport_iscsi.c | 90 +++++++-------------- drivers/target/target_core_sbc.c | 35 +++----- drivers/thermal/thermal_core.c | 2 drivers/usb/core/hub.c | 68 +++++++++++++-- drivers/usb/core/quirks.c | 4 drivers/usb/host/max3421-hcd.c | 44 +++------- drivers/usb/host/xhci-hub.c | 3 drivers/usb/renesas_usbhs/fifo.c | 7 + drivers/usb/serial/cp210x.c | 5 - drivers/usb/serial/option.c | 3 drivers/usb/storage/unusual_uas.h | 7 + fs/btrfs/inode.c | 2 fs/proc/base.c | 2 include/net/dst_metadata.h | 4 include/net/ip6_route.h | 2 kernel/sched/fair.c | 4 kernel/trace/ring_buffer.c | 28 +++++- net/caif/caif_socket.c | 3 net/decnet/af_decnet.c | 27 ++---- net/ipv4/tcp_ipv4.c | 4 net/ipv4/tcp_output.c | 1 net/ipv6/tcp_ipv6.c | 19 +++- net/ipv6/xfrm6_output.c | 2 net/netrom/nr_timer.c | 20 ++-- scripts/mkcompile_h | 14 ++- sound/isa/sb/sb16_csp.c | 4 tools/perf/tests/bpf.c | 2 tools/perf/util/probe-file.c | 4 53 files changed, 402 insertions(+), 273 deletions(-)
Aleksandr Loktionov (1):
igb: Check if num of q_vectors is smaller than max before array access
Christophe JAILLET (1):
iavf: Fix an error handling path in 'iavf_probe()'
Colin Ian King (2):
scsi: aic7xxx: Fix unintentional sign extension issue on left shift of u8 s390/bpf: Perform r1 range checking before accessing jit->seen_reg[r1]
David Sterba (1):
btrfs: compression: don't try to compress if we don't have enough pages
Dmitry Bogdanov (1):
scsi: target: Fix protect handling in WRITE SAME(32)
Doug Berger (1):
net: bcmgenet: ensure EXT_ENERGY_DET_MASK is clear
Eric Dumazet (2):
tcp: annotate data races around tp->mtu_info
ipv6: tcp: drop silly ICMPv6 packet too big messages
Florian Fainelli (1):
net: bcmgenet: Ensure all TX/RX queues DMAs are disabled
Greg Kroah-Hartman (2):
Revert "memory: fsl_ifc: fix leak of IO mapping on probe failure" Linux 4.4.277
Gustavo A. R. Silva (1):
media: ngene: Fix out-of-bounds bug in ngene_command_config_free_buf()
Haoran Luo (1):
tracing: Fix bug in rb_per_cpu_empty() that might cause deadloop.
Ian Ray (1):
USB: serial: cp210x: fix comments for GE CS1000
John Keeping (1):
USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick
Jonathan Neuschäfer (1):
ARM: imx: pm-imx5: Fix references to imx5_cpu_suspend_info
Julian Sikorski (1):
USB: usb-storage: Add LaCie Rugged USB3-FW to IGNORE_UAS
Linus Walleij (1):
iio: accel: bma180: Use explicit member assignment
Marcelo Henrique Cerri (1):
proc: Avoid mixing integer types in mem_rw()
Marco De Marco (1):
USB: serial: option: add support for u-blox LARA-R6 family
Mark Tomlinson (1):
usb: max-3421: Prevent corruption of freed memory
Mathias Nyman (2):
xhci: Fix lost USB 2 remote wake
usb: hub: Disable USB 3 device initiated lpm if exit latency is too high
Matthias Maennich (1):
kbuild: mkcompile_h: consider timestamp if KBUILD_BUILD_TIMESTAMP is set
Mike Christie (1):
scsi: iscsi: Fix iface sysfs attr detection
Nguyen Dinh Phi (1):
netrom: Decrease sock refcount when sock timers expire
Nicholas Piggin (1):
KVM: PPC: Book3S: Fix H_RTAS rets buffer overflow
Odin Ugedal (1):
sched/fair: Fix CFS bandwidth hrtimer expiry type
Pavel Skripkin (2):
net: moxa: fix UAF in moxart_mac_probe
net: ti: fix UAF in tlan_remove_one
Primoz Fiser (1):
ARM: dts: imx6: phyFLEX: Fix UART hardware flow control
Rafał Miłecki (2):
ARM: brcmstb: dts: fix NAND nodes names
ARM: dts: BCM63xx: Fix NAND nodes names
Riccardo Mancini (2):
perf test bpf: Free obj_buf
perf probe-file: Delete namelist in del_events() on the error path
Stephan Gerhold (1):
iio: accel: bma180: Fix BMA25x bandwidth register values
Taehee Yoo (1):
net: validate lwtstate->data before returning from skb_tunnel_info()
Takashi Iwai (1):
ALSA: sb: Fix potential ABBA deadlock in CSP driver
Thomas Gleixner (1):
x86/fpu: Make init_fpstate correct with optimized XSAVE
Vadim Fedorenko (1):
net: ipv6: fix return value of ip6_skb_dst_mtu
Vasily Gorbik (1):
s390/ftrace: fix ftrace_update_ftrace_func implementation
Vincent Palatin (1):
Revert "USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem"
Yajun Deng (1):
net: decnet: Fix sleeping inside in af_decnet
Yang Yingliang (1):
thermal/core: Correct function name thermal_zone_device_unregister()
Yoshihiro Shimoda (1):
usb: renesas_usbhs: Fix superfluous irqs happen after usb_pkt_pop()
Ziyang Xuan (1):
net: fix uninit-value in caif_seqpkt_sendmsg
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 276 +SUBLEVEL = 277 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arm/boot/dts/bcm63138.dtsi +1 -1
@@ -152,7 +152,7 @@ status = "disabled"; }; - nand: nand@2000 { + nand_controller: nand-controller@2000 { #address-cells = <1>; #size-cells = <0>; compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.0", "brcm,brcmnand";
arch/arm/boot/dts/bcm7445-bcm97445svmb.dts +2 -2
@@ -13,10 +13,10 @@ }; }; -&nand { +&nand_controller { status = "okay"; - nandcs@1 { + nand@1 { compatible = "brcm,nandcs"; reg = <1>; nand-ecc-step-size = <512>;
arch/arm/boot/dts/bcm7445.dtsi +1 -1
@@ -149,7 +149,7 @@ reg-names = "aon-ctrl", "aon-sram"; }; - nand: nand@3e2800 { + nand_controller: nand-controller@3e2800 { status = "disabled"; #address-cells = <1>; #size-cells = <0>;
arch/arm/boot/dts/bcm963138dvt.dts +2 -2
@@ -29,10 +29,10 @@ status = "okay"; }; -&nand { +&nand_controller { status = "okay"; - nandcs@0 { + nand@0 { compatible = "brcm,nandcs"; reg = <0>; nand-ecc-strength = <4>;
arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi +3 -2
@@ -307,8 +307,8 @@ fsl,pins = < MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1 MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1 - MX6QDL_PAD_EIM_D30__UART3_RTS_B 0x1b0b1 - MX6QDL_PAD_EIM_D31__UART3_CTS_B 0x1b0b1 + MX6QDL_PAD_EIM_D31__UART3_RTS_B 0x1b0b1 + MX6QDL_PAD_EIM_D30__UART3_CTS_B 0x1b0b1 >; };
@@ -383,6 +383,7 @@ &uart3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart3>; + uart-has-rtscts; status = "disabled"; };
arch/arm/mach-imx/suspend-imx53.S +2 -2
@@ -33,11 +33,11 @@ * ^ * ^ * imx53_suspend code - * PM_INFO structure(imx53_suspend_info) + * PM_INFO structure(imx5_cpu_suspend_info) * ======================== low address ======================= */ -/* Offsets of members of struct imx53_suspend_info */ +/* Offsets of members of struct imx5_cpu_suspend_info */ #define SUSPEND_INFO_MX53_M4IF_V_OFFSET 0x0 #define SUSPEND_INFO_MX53_IOMUXC_V_OFFSET 0x4 #define SUSPEND_INFO_MX53_IO_COUNT_OFFSET 0x8
arch/powerpc/kvm/book3s_rtas.c +22 -3
@@ -230,6 +230,17 @@ int kvmppc_rtas_hcall(struct kvm_vcpu *vcpu)* value so we can restore it on the way out. */ orig_rets = args.rets; +if (be32_to_cpu (args.nargs) >=ARRAY_SIZE (args.args)) { +/* +* Don't overflow our args array: ensure there is room for +* at least rets[0] (even if the call specifies 0 nret). +* +* Each handler must then check for the correct nargs and nret +* values, but they may always return failure in rets[0]. +*/ + rc = -EINVAL ; + goto fail; + } args.rets = &args.args[be32_to_cpu (args.nargs)];mutex_lock (&vcpu->kvm->arch.rtas_token_lock);
@@ -257,9 +268,17 @@ int kvmppc_rtas_hcall(struct kvm_vcpu *vcpu) fail:/* * We only get here if the guest has called RTAS with a bogus -* args pointer. That means we can't get to the args, and so we -* can't fail the RTAS call. So fail right out to userspace, -* which should kill the guest. +* args pointer or nargs/nret values that would overflow the +* array. That means we can't get to the args, and so we can't +* fail the RTAS call. So fail right out to userspace, which +* should kill the guest. +* +* SLOF should actually pass the hcall return value from the +* rtas handler call in r3, so enter_rtas could be modified to +* return a failure indication in r3 and we could return such +* errors to the guest rather than failing to host userspace. +* However old guests that don't test for failure could then +* continue silently after errors, so for now we won't do this. */ return rc; }
arch/s390/include/asm/ftrace.h +1 -0
@@ -19,6 +19,7 @@ void ftrace_caller(void);extern char ftrace_graph_caller_end;extern unsigned long ftrace_plt; +extern void *ftrace_func;struct dyn_arch_ftrace { };
arch/s390/kernel/ftrace.c +2 -0
@@ -55,6 +55,7 @@* > brasl %r0,ftrace_caller # offset 0 */ +void *ftrace_func__read_mostly = ftrace_stub;unsigned long ftrace_plt;static inline void ftrace_generate_orig_insn (struct ftrace_insn *insn)
@@ -164,6 +165,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)int ftrace_update_ftrace_func (ftrace_func_t func) { + ftrace_func = func;return 0 ; }
arch/s390/kernel/mcount.S +2 -2
@@ -56,13 +56,13 @@ ENTRY(ftrace_caller) #ifdef CONFIG_HAVE_MARCH_Z196_FEATURES aghik %r2,%r0,-MCOUNT_INSN_SIZE lgrl %r4,function_trace_op - lgrl %r1,ftrace_trace_function + lgrl %r1,ftrace_func #else lgr %r2,%r0 aghi %r2,-MCOUNT_INSN_SIZE larl %r4,function_trace_op lg %r4,0(%r4) - larl %r1,ftrace_trace_function + larl %r1,ftrace_func lg %r1,0(%r1) #endif lgr %r3,%r14
arch/s390/net/bpf_jit_comp.c +1 -1
@@ -115,7 +115,7 @@ static inline void reg_set_seen(struct bpf_jit *jit, u32 b1) {u32 r1 = reg2hex[b1]; -if (!jit->seen_reg[r1] && r1 >=6 && r1 <=15 ) +if (r1 >=6 && r1 <=15 && !jit->seen_reg[r1]) jit->seen_reg[r1] =1 ; }
arch/x86/include/asm/fpu/internal.h +8 -22
@@ -217,6 +217,14 @@ static inline void copy_fxregs_to_kernel(struct fpu *fpu) } } +static inline void fxsave (struct fxregs_state *fx) +{ +if (IS_ENABLED (CONFIG_X86_32 )) + asmvolatile ("fxsave %[fx]" : [fx]"=m" (*fx)); +else + asmvolatile ("fxsaveq %[fx]" : [fx]"=m" (*fx)); +} +/* These macros all use (%edi)/(%rdi) as the single memory argument. */ #define XSAVE ".byte " REX_PREFIX "0x0f,0xae,0x27"#define XSAVEOPT ".byte " REX_PREFIX "0x0f,0xae,0x37"
@@ -286,28 +294,6 @@ static inline void copy_fxregs_to_kernel(struct fpu *fpu) : "D" (st), "m" (*st), "a" (lmask), "d" (hmask) \ : "memory") -/* -* This function is called only during boot time when x86 caps are not set -* up and alternative can not be used yet. -*/ -static inline void copy_xregs_to_kernel_booting (struct xregs_state *xstate) -{ -u64 mask =-1 ; -u32 lmask = mask; -u32 hmask = mask >>32 ; -int err; - -WARN_ON (system_state !=SYSTEM_BOOTING ); - -if (static_cpu_has (X86_FEATURE_XSAVES )) -XSTATE_OP (XSAVES , xstate, lmask, hmask, err); -else -XSTATE_OP (XSAVE , xstate, lmask, hmask, err); - -/* We should never fault when copying to a kernel buffer: */ -WARN_ON_FPU (err); -} -/* * This function is called only during boot time when x86 caps are not set * up and alternative can not be used yet.
arch/x86/kernel/fpu/xstate.c +34 -3
@@ -292,6 +292,23 @@ static void __init setup_xstate_comp(void) } } +/* +* All supported features have either init state all zeros or are +* handled in setup_init_fpu() individually. This is an explicit +* feature list and does not use XFEATURE_MASK*SUPPORTED to catch +* newly added supported features at build time and make people +* actually look at the init state for the new feature. +*/ +#define XFEATURES_INIT_FPSTATE_HANDLED \ + (XFEATURE_MASK_FP | \ + XFEATURE_MASK_SSE | \ + XFEATURE_MASK_YMM | \ + XFEATURE_MASK_OPMASK | \ + XFEATURE_MASK_ZMM_Hi256 | \ + XFEATURE_MASK_Hi16_ZMM | \ + XFEATURE_MASK_BNDREGS | \ + XFEATURE_MASK_BNDCSR) +/* * setup the xstate image representing the init state */
@@ -299,6 +316,8 @@ static void __init setup_init_fpu_buf(void) {static int on_boot_cpu =1 ; +BUILD_BUG_ON (XCNTXT_MASK !=XFEATURES_INIT_FPSTATE_HANDLED ); +WARN_ON_FPU (!on_boot_cpu); on_boot_cpu =0 ;
@@ -319,10 +338,22 @@ static void __init setup_init_fpu_buf(void)copy_kernel_to_xregs_booting (&init_fpstate.xsave);/* -* Dump the init state again. This is to identify the init state -* of any feature which is not represented by all zero's. +* All components are now in init state. Read the state back so +* that init_fpstate contains all non-zero init state. This only +* works with XSAVE, but not with XSAVEOPT and XSAVES because +* those use the init optimization which skips writing data for +* components in init state. +* +* XSAVE could be used, but that would require to reshuffle the +* data when XSAVES is available because XSAVES uses xstate +* compaction. But doing so is a pointless exercise because most +* components have an all zeros init state except for the legacy +* ones (FP and SSE). Those can be saved with FXSAVE into the +* legacy area. Adding new features requires to ensure that init +* state is all zeroes or if not to add the necessary handling +* here. */ -copy_xregs_to_kernel_booting (&init_fpstate.xsave); +fxsave (&init_fpstate.fxsave); }static int xfeature_is_supervisor (int xfeature_nr)
drivers/iio/accel/bma180.c +49 -26
101 lines not on this page · raw message
drivers/media/pci/ngene/ngene-core.c +1 -1
@@ -402,7 +402,7 @@ static int ngene_command_config_free_buf(struct ngene *dev, u8 *config) com.cmd.hdr.Opcode =CMD_CONFIGURE_FREE_BUFFER ; com.cmd.hdr.Length =6 ; -memcpy (&com.cmd.ConfigureBuffers.config, config,6 ); +memcpy (&com.cmd.ConfigureFreeBuffers.config, config,6 ); com.in_len =6 ; com.out_len =0 ;
drivers/media/pci/ngene/ngene.h +8 -6
@@ -407,12 +407,14 @@ enum _BUFFER_CONFIGS {struct FW_CONFIGURE_FREE_BUFFERS {struct FW_HEADER hdr; -u8 UVI1_BufferLength; -u8 UVI2_BufferLength; -u8 TVO_BufferLength; -u8 AUD1_BufferLength; -u8 AUD2_BufferLength; -u8 TVA_BufferLength; +struct { +u8 UVI1_BufferLength; +u8 UVI2_BufferLength; +u8 TVO_BufferLength; +u8 AUD1_BufferLength; +u8 AUD2_BufferLength; +u8 TVA_BufferLength; + } __packed config; } __attribute__ ((__packed__ ));struct FW_CONFIGURE_UART {
drivers/memory/fsl_ifc.c +2 -2
@@ -228,7 +228,8 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev) fsl_ifc_ctrl_dev->regs =of_iomap (dev->dev.of_node,0 );if (!fsl_ifc_ctrl_dev->regs) {dev_err (&dev->dev,"failed to get memory region\n" ); -return -ENODEV ; + ret = -ENODEV ; + goto err; } version = ifc_in32(&fsl_ifc_ctrl_dev->regs->ifc_rev) &
@@ -305,7 +306,6 @@ err_irq:free_irq (fsl_ifc_ctrl_dev->irq, fsl_ifc_ctrl_dev);irq_dispose_mapping (fsl_ifc_ctrl_dev->irq); err: -iounmap (fsl_ifc_ctrl_dev->gregs);return ret; }
drivers/net/ethernet/broadcom/genet/bcmgenet.c +7 -14
@@ -1094,7 +1094,7 @@ static void bcmgenet_power_up(struct bcmgenet_priv *priv,switch (mode) {case GENET_POWER_PASSIVE : reg &= ~(EXT_PWR_DOWN_DLL |EXT_PWR_DOWN_PHY | -EXT_PWR_DOWN_BIAS ); +EXT_PWR_DOWN_BIAS |EXT_ENERGY_DET_MASK );/* fallthrough */ case GENET_POWER_CABLE_SENSE :/* enable APD */
@@ -2663,15 +2663,21 @@ static void bcmgenet_set_hw_addr(struct bcmgenet_priv *priv,/* Returns a reusable dma control register value */ static u32 bcmgenet_dma_disable (struct bcmgenet_priv *priv) { +unsigned int i;u32 reg;u32 dma_ctrl;/* disable DMA */ dma_ctrl =1 << (DESC_INDEX +DMA_RING_BUF_EN_SHIFT ) |DMA_EN ; +for (i =0 ; i < priv->hw_params->tx_queues; i++) + dma_ctrl |= (1 << (i +DMA_RING_BUF_EN_SHIFT )); reg =bcmgenet_tdma_readl (priv,DMA_CTRL ); reg &= ~dma_ctrl;bcmgenet_tdma_writel (priv, reg,DMA_CTRL ); + dma_ctrl =1 << (DESC_INDEX +DMA_RING_BUF_EN_SHIFT ) |DMA_EN ; +for (i =0 ; i < priv->hw_params->rx_queues; i++) + dma_ctrl |= (1 << (i +DMA_RING_BUF_EN_SHIFT )); reg =bcmgenet_rdma_readl (priv,DMA_CTRL ); reg &= ~dma_ctrl;bcmgenet_rdma_writel (priv, reg,DMA_CTRL );
@@ -2902,12 +2908,6 @@ static int bcmgenet_open(struct net_device *dev)bcmgenet_set_hw_addr (priv, dev->dev_addr); -if (priv->internal_phy) { - reg =bcmgenet_ext_readl (priv,EXT_EXT_PWR_MGMT ); - reg |=EXT_ENERGY_DET_MASK ; -bcmgenet_ext_writel (priv, reg,EXT_EXT_PWR_MGMT ); - } -/* Disable RX/TX DMA and flush TX queues */ dma_ctrl =bcmgenet_dma_disable (priv);
@@ -3595,7 +3595,6 @@ static int bcmgenet_resume(struct device *d)struct bcmgenet_priv *priv =netdev_priv (dev);unsigned long dma_ctrl;int ret; -u32 reg;if (!netif_running (dev))return 0 ;
@@ -3630,12 +3629,6 @@ static int bcmgenet_resume(struct device *d)bcmgenet_set_hw_addr (priv, dev->dev_addr); -if (priv->internal_phy) { - reg =bcmgenet_ext_readl (priv,EXT_EXT_PWR_MGMT ); - reg |=EXT_ENERGY_DET_MASK ; -bcmgenet_ext_writel (priv, reg,EXT_EXT_PWR_MGMT ); - } -if (priv->wolopts)bcmgenet_power_up (priv,GENET_POWER_WOL_MAGIC );
drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c +0 -6
@@ -167,12 +167,6 @@ int bcmgenet_wol_power_down_cfg(struct bcmgenet_priv *priv, reg |=CMD_RX_EN ;bcmgenet_umac_writel (priv, reg,UMAC_CMD ); -if (priv->hw_params->flags &GENET_HAS_EXT ) { - reg =bcmgenet_ext_readl (priv,EXT_EXT_PWR_MGMT ); - reg &= ~EXT_ENERGY_DET_MASK ; -bcmgenet_ext_writel (priv, reg,EXT_EXT_PWR_MGMT ); - } -/* Enable the MPD interrupt */ cpu_mask_clear =UMAC_IRQ_MPD_R ;
drivers/net/ethernet/intel/i40evf/i40evf_main.c +1 -0
@@ -2503,6 +2503,7 @@ static int i40evf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) err_ioremap:free_netdev (netdev); err_alloc_etherdev: +pci_disable_pcie_error_reporting (pdev);pci_release_regions (pdev); err_pci_reg: err_dma:
drivers/net/ethernet/intel/igb/igb_main.c +8 -1
@@ -945,6 +945,7 @@ static void igb_configure_msix(struct igb_adapter *adapter)**/ static int igb_request_msix (struct igb_adapter *adapter) { +unsigned int num_q_vectors = adapter->num_q_vectors;struct net_device *netdev = adapter->netdev;int i, err =0 , vector =0 , free_vector =0 ;
@@ -953,7 +954,13 @@ static int igb_request_msix(struct igb_adapter *adapter)if (err) goto err_out; -for (i =0 ; i < adapter->num_q_vectors; i++) { +if (num_q_vectors >MAX_Q_VECTORS ) { + num_q_vectors =MAX_Q_VECTORS ; +dev_warn (&adapter->pdev->dev, +"The number of queue vectors (%d) is higher than max allowed (%d)\n" , + adapter->num_q_vectors,MAX_Q_VECTORS ); + } +for (i =0 ; i < num_q_vectors; i++) {struct igb_q_vector *q_vector = adapter->q_vector[i]; vector++;
drivers/net/ethernet/moxa/moxart_ether.c +1 -3
@@ -518,10 +518,8 @@ static int moxart_mac_probe(struct platform_device *pdev)SET_NETDEV_DEV (ndev, &pdev->dev); ret =register_netdev (ndev); -if (ret) { -free_netdev (ndev); +if (ret) goto init_fail; - }netdev_dbg (ndev,"%s: IRQ=%d address=%pM\n" , __func__, ndev->irq, ndev->dev_addr);
drivers/net/ethernet/ti/tlan.c +1 -2
@@ -313,9 +313,8 @@ static void tlan_remove_one(struct pci_dev *pdev)pci_release_regions (pdev);#endif -free_netdev (dev); -cancel_work_sync (&priv->tlan_tqueue); +free_netdev (dev); }static void tlan_start (struct net_device *dev)
drivers/scsi/aic7xxx/aic7xxx_core.c +1 -1
@@ -500,7 +500,7 @@ ahc_inq(struct ahc_softc *ahc, u_int port)return ((ahc_inb (ahc, port)) | (ahc_inb (ahc, port+1 ) <<8 ) | (ahc_inb (ahc, port+2 ) <<16 ) - | (ahc_inb (ahc, port+3 ) <<24 ) + | (((uint64_t )ahc_inb (ahc, port+3 )) <<24 ) | (((uint64_t )ahc_inb (ahc, port+4 )) <<32 ) | (((uint64_t )ahc_inb (ahc, port+5 )) <<40 ) | (((uint64_t)ahc_inb(ahc, port+6)) << 48)
drivers/scsi/scsi_transport_iscsi.c +34 -56
111 lines not on this page · raw message
drivers/target/target_core_sbc.c +17 -18
@@ -37,7 +37,7 @@#include "target_core_alua.h" static sense_reason_t -sbc_check_prot (struct se_device *,struct se_cmd *,unsigned char *,u32 ,bool ); +sbc_check_prot (struct se_device *,struct se_cmd *,unsigned char ,u32 ,bool );static sense_reason_t sbc_execute_unmap (struct se_cmd *cmd); static sense_reason_t
@@ -311,14 +311,14 @@ static inline unsigned long long transport_lba_64_ext(unsigned char *cdb) }static sense_reason_t -sbc_setup_write_same (struct se_cmd *cmd,unsigned char *flags,struct sbc_ops *ops) +sbc_setup_write_same (struct se_cmd *cmd,unsigned char flags,struct sbc_ops *ops) {struct se_device *dev = cmd->se_dev;sector_t end_lba = dev->transport->get_blocks (dev) +1 ;unsigned int sectors =sbc_get_write_same_sectors (cmd);sense_reason_t ret; -if ((flags[0 ] &0x04 ) || (flags[0 ] &0x02 )) { +if ((flags &0x04 ) || (flags &0x02 )) {pr_err ("WRITE_SAME PBDATA and LBDATA" " bits not supported for Block Discard" " Emulation\n" );
@@ -340,7 +340,7 @@ sbc_setup_write_same(struct se_cmd *cmd, unsigned char *flags, struct sbc_ops *o }/* We always have ANC_SUP == 0 so setting ANCHOR is always an error */ -if (flags[0 ] &0x10 ) { +if (flags &0x10 ) {pr_warn ("WRITE SAME with ANCHOR not supported\n" );return TCM_INVALID_CDB_FIELD ; }
@@ -348,7 +348,7 @@ sbc_setup_write_same(struct se_cmd *cmd, unsigned char *flags, struct sbc_ops *o* Special case for WRITE_SAME w/ UNMAP=1 that ends up getting * translated into block discard requests within backend code. */ -if (flags[0 ] &0x08 ) { +if (flags &0x08 ) {if (!ops->execute_unmap)return TCM_UNSUPPORTED_SCSI_OPCODE ;
@@ -363,7 +363,7 @@ sbc_setup_write_same(struct se_cmd *cmd, unsigned char *flags, struct sbc_ops *oif (!ops->execute_write_same)return TCM_UNSUPPORTED_SCSI_OPCODE ; - ret =sbc_check_prot (dev, cmd, &cmd->t_task_cdb[0 ], sectors, true); + ret =sbc_check_prot (dev, cmd, flags >>5 , sectors, true);if (ret)return ret;
@@ -721,10 +721,9 @@ sbc_set_prot_op_checks(u8 protect, bool fabric_prot, enum target_prot_type prot_ }static sense_reason_t -sbc_check_prot (struct se_device *dev,struct se_cmd *cmd,unsigned char *cdb, +sbc_check_prot (struct se_device *dev,struct se_cmd *cmd,unsigned char protect,u32 sectors,bool is_write) { -u8 protect = cdb[1 ] >>5 ;int sp_ops = cmd->se_sess->sup_prot_ops;int pi_prot_type = dev->dev_attrib.pi_prot_type;bool fabric_prot = false;
@@ -772,7 +771,7 @@ sbc_check_prot(struct se_device *dev, struct se_cmd *cmd, unsigned char *cdb,/* Fallthrough */ default :pr_err ("Unable to determine pi_prot_type for CDB: 0x%02x " -"PROTECT: 0x%02x\n" , cdb[0 ], protect); +"PROTECT: 0x%02x\n" , cmd->t_task_cdb[0 ], protect);return TCM_INVALID_CDB_FIELD ; }
@@ -847,7 +846,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)if (sbc_check_dpofua (dev, cmd, cdb))return TCM_INVALID_CDB_FIELD ; - ret =sbc_check_prot (dev, cmd, cdb, sectors, false); + ret =sbc_check_prot (dev, cmd, cdb[1 ] >>5 , sectors, false);if (ret)return ret;
@@ -861,7 +860,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)if (sbc_check_dpofua (dev, cmd, cdb))return TCM_INVALID_CDB_FIELD ; - ret =sbc_check_prot (dev, cmd, cdb, sectors, false); + ret =sbc_check_prot (dev, cmd, cdb[1 ] >>5 , sectors, false);if (ret)return ret;
@@ -875,7 +874,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)if (sbc_check_dpofua (dev, cmd, cdb))return TCM_INVALID_CDB_FIELD ; - ret =sbc_check_prot (dev, cmd, cdb, sectors, false); + ret =sbc_check_prot (dev, cmd, cdb[1 ] >>5 , sectors, false);if (ret)return ret;
@@ -896,7 +895,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)if (sbc_check_dpofua (dev, cmd, cdb))return TCM_INVALID_CDB_FIELD ; - ret =sbc_check_prot (dev, cmd, cdb, sectors, true); + ret =sbc_check_prot (dev, cmd, cdb[1 ] >>5 , sectors, true);if (ret)return ret;
@@ -910,7 +909,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)if (sbc_check_dpofua (dev, cmd, cdb))return TCM_INVALID_CDB_FIELD ; - ret =sbc_check_prot (dev, cmd, cdb, sectors, true); + ret =sbc_check_prot (dev, cmd, cdb[1 ] >>5 , sectors, true);if (ret)return ret;
@@ -924,7 +923,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)if (sbc_check_dpofua (dev, cmd, cdb))return TCM_INVALID_CDB_FIELD ; - ret =sbc_check_prot (dev, cmd, cdb, sectors, true); + ret =sbc_check_prot (dev, cmd, cdb[1 ] >>5 , sectors, true);if (ret)return ret;
@@ -983,7 +982,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) size =sbc_get_size (cmd,1 ); cmd->t_task_lba =get_unaligned_be64 (&cdb[12 ]); - ret =sbc_setup_write_same (cmd, &cdb[10 ], ops); + ret =sbc_setup_write_same (cmd, cdb[10 ], ops);if (ret)return ret;break ;
@@ -1076,7 +1075,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) size =sbc_get_size (cmd,1 ); cmd->t_task_lba =get_unaligned_be64 (&cdb[2 ]); - ret =sbc_setup_write_same (cmd, &cdb[1 ], ops); + ret =sbc_setup_write_same (cmd, cdb[1 ], ops);if (ret)return ret;break ;
@@ -1094,7 +1093,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)* Follow sbcr26 with WRITE_SAME (10) and check for the existence * of byte 1 bit 3 UNMAP instead of original reserved field */ - ret =sbc_setup_write_same (cmd, &cdb[1 ], ops); + ret =sbc_setup_write_same (cmd, cdb[1 ], ops);if (ret)return ret;break ;
drivers/thermal/thermal_core.c +1 -1
@@ -1956,7 +1956,7 @@ unregister:EXPORT_SYMBOL_GPL (thermal_zone_device_register);/** -* thermal_device_unregister - removes the registered thermal zone device +* thermal_zone_device_unregister - removes the registered thermal zone device * @tz: the thermal zone device to remove */ void thermal_zone_device_unregister (struct thermal_zone_device *tz)
drivers/usb/core/hub.c +56 -12
82 lines not on this page · raw message
drivers/usb/core/quirks.c +0 -4
@@ -325,10 +325,6 @@ static const struct usb_device_id usb_quirk_list[] = {/* DJI CineSSD */ { USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM }, - /* Fibocom L850-GL LTE Modem */ - { USB_DEVICE(0x2cb7, 0x0007), .driver_info = - USB_QUIRK_IGNORE_REMOTE_WAKEUP }, - /* INTEL VALUE SSD */ { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
drivers/usb/host/max3421-hcd.c +14 -30
95 lines not on this page · raw message
drivers/usb/host/xhci-hub.c +2 -1
@@ -1268,11 +1268,12 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf)* Inform the usbcore about resume-in-progress by returning * a non-zero value even if there are no status changes. */ +spin_lock_irqsave (&xhci->lock, flags); + status = bus_state->resuming_ports; mask =PORT_CSC |PORT_PEC |PORT_OCC |PORT_PLC |PORT_WRC |PORT_CEC ; -spin_lock_irqsave (&xhci->lock, flags);/* For each port, did anything change? If so, set that bit in buf. */ for (i =0 ; i < max_ports; i++) { temp =readl (port_array[i]);
drivers/usb/renesas_usbhs/fifo.c +7 -0
@@ -115,6 +115,8 @@ static struct dma_chan *usbhsf_dma_chan_get(struct usbhs_fifo *fifo,#define usbhsf_dma_map (p) __usbhsf_dma_map_ctrl(p, 1)#define usbhsf_dma_unmap (p) __usbhsf_dma_map_ctrl(p, 0)static int __usbhsf_dma_map_ctrl (struct usbhs_pkt *pkt,int map); +static void usbhsf_tx_irq_ctrl (struct usbhs_pipe *pipe,int enable); +static void usbhsf_rx_irq_ctrl (struct usbhs_pipe *pipe,int enable);struct usbhs_pkt *usbhs_pkt_pop (struct usbhs_pipe *pipe,struct usbhs_pkt *pkt) {struct usbhs_priv *priv =usbhs_pipe_to_priv (pipe);
@@ -138,6 +140,11 @@ struct usbhs_pkt *usbhs_pkt_pop(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt)dmaengine_terminate_all (chan);usbhsf_fifo_clear (pipe, fifo);usbhsf_dma_unmap (pkt); + }else { +if (usbhs_pipe_is_dir_in (pipe)) +usbhsf_rx_irq_ctrl (pipe,0 ); +else +usbhsf_tx_irq_ctrl (pipe,0 ); }usbhs_pipe_running (pipe,0 );
drivers/usb/serial/cp210x.c +3 -2
@@ -152,6 +152,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x10C4, 0x89A4) }, /* CESINEL FTBC Flexible Thyristor Bridge Controller */ { USB_DEVICE(0x10C4, 0x89FB) }, /* Qivicon ZigBee USB Radio Stick */ { USB_DEVICE(0x10C4, 0x8A2A) }, /* HubZ dual ZigBee and Z-Wave dongle */ + { USB_DEVICE(0x10C4, 0x8A5B) }, /* CEL EM3588 ZigBee USB Stick */ { USB_DEVICE(0x10C4, 0x8A5E) }, /* CEL EM3588 ZigBee USB Stick Long Range */ { USB_DEVICE(0x10C4, 0x8B34) }, /* Qivicon ZigBee USB Radio Stick */ { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
@@ -199,8 +200,8 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x1901, 0x0194) }, /* GE Healthcare Remote Alarm Box */ { USB_DEVICE(0x1901, 0x0195) }, /* GE B850/B650/B450 CP2104 DP UART interface */ { USB_DEVICE(0x1901, 0x0196) }, /* GE B850 CP2105 DP UART interface */ - { USB_DEVICE(0x1901, 0x0197) }, /* GE CS1000 Display serial interface */ - { USB_DEVICE(0x1901, 0x0198) }, /* GE CS1000 M.2 Key E serial interface */ + { USB_DEVICE(0x1901, 0x0197) }, /* GE CS1000 M.2 Key E serial interface */ + { USB_DEVICE(0x1901, 0x0198) }, /* GE CS1000 Display serial interface */ { USB_DEVICE(0x199B, 0xBA30) }, /* LORD WSDA-200-USB */ { USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */ { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
drivers/usb/serial/option.c +3 -0
@@ -241,6 +241,7 @@ static void option_instat_callback(struct urb *urb);#define QUECTEL_PRODUCT_UC15 0x9090/* These u-blox products use Qualcomm's vendor ID */ #define UBLOX_PRODUCT_R410M 0x90b2 +#define UBLOX_PRODUCT_R6XX 0x90fa/* These Yuga products use Qualcomm's vendor ID */ #define YUGA_PRODUCT_CLM920_NC5 0x9625
@@ -1098,6 +1099,8 @@ static const struct usb_device_id option_ids[] = {/* u-blox products using Qualcomm vendor ID */ { USB_DEVICE(QUALCOMM_VENDOR_ID, UBLOX_PRODUCT_R410M), .driver_info = RSVD(1) | RSVD(3) }, + { USB_DEVICE(QUALCOMM_VENDOR_ID, UBLOX_PRODUCT_R6XX), + .driver_info = RSVD(3) }, /* Quectel products using Quectel vendor ID */ { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21), .driver_info = RSVD(4) },
drivers/usb/storage/unusual_uas.h +7 -0
@@ -54,6 +54,13 @@ UNUSUAL_DEV(0x059f, 0x105f, 0x0000, 0x9999, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_REPORT_OPCODES), +/* Reported-by: Julian Sikorski <[email protected]> */ +UNUSUAL_DEV (0x059f ,0x1061 ,0x0000 ,0x9999 , +"LaCie" , +"Rugged USB3-FW" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , + US_FL_IGNORE_UAS), +/* * Apricorn USB3 dongle sometimes returns "USBSUSBSUSBS" in response to SCSI * commands in UAS mode. Observed with the 1.28 firmware; are there others?
fs/btrfs/inode.c +1 -1
@@ -476,7 +476,7 @@ again:* inode has not been flagged as nocompress. This flag can * change at any time if we discover bad compression ratios. */ -if (inode_need_compress (inode)) { +if (nr_pages >1 &&inode_need_compress (inode)) {WARN_ON (pages); pages =kcalloc (nr_pages,sizeof (struct page *),GFP_NOFS );if (!pages) {
fs/proc/base.c +1 -1
@@ -887,7 +887,7 @@ static ssize_t mem_rw(struct file *file, char __user *buf, flags |=FOLL_WRITE ;while (count >0 ) { -int this_len =min_t (int, count,PAGE_SIZE ); +size_t this_len =min_t (size_t, count,PAGE_SIZE );if (write &©_from_user (page, buf, this_len)) { copied = -EFAULT ;
include/net/dst_metadata.h +3 -1
@@ -31,7 +31,9 @@ static inline struct ip_tunnel_info *skb_tunnel_info(struct sk_buff *skb)return &md_dst->u.tun_info; dst =skb_dst (skb); -if (dst && dst->lwtstate) +if (dst && dst->lwtstate && + (dst->lwtstate->type ==LWTUNNEL_ENCAP_IP || + dst->lwtstate->type ==LWTUNNEL_ENCAP_IP6 ))return lwt_tun_info (dst->lwtstate);return NULL ;
include/net/ip6_route.h +1 -1
@@ -181,7 +181,7 @@ static inline bool ipv6_anycast_destination(const struct dst_entry *dst,int ip6_fragment (struct net *net,struct sock *sk,struct sk_buff *skb,int (*output)(struct net *,struct sock *,struct sk_buff *)); -static inline int ip6_skb_dst_mtu (struct sk_buff *skb) +static inline unsigned int ip6_skb_dst_mtu (struct sk_buff *skb) {struct ipv6_pinfo *np = skb->sk && !dev_recursion_level () ?inet6_sk (skb->sk) :NULL ;
kernel/sched/fair.c +2 -2
@@ -3852,7 +3852,7 @@ static const u64 cfs_bandwidth_slack_period = 5 * NSEC_PER_MSEC;static int runtime_refresh_within (struct cfs_bandwidth *cfs_b,u64 min_expire) {struct hrtimer *refresh_timer = &cfs_b->period_timer; -u64 remaining; +s64 remaining;/* if the call-back is running a quota refresh is already occurring */ if (hrtimer_callback_running (refresh_timer))
@@ -3860,7 +3860,7 @@ static int runtime_refresh_within(struct cfs_bandwidth *cfs_b, u64 min_expire)/* is a quota refresh about to occur? */ remaining =ktime_to_ns (hrtimer_expires_remaining (refresh_timer)); -if (remaining < min_expire) +if (remaining < (s64 )min_expire)return 1 ;return 0 ;
kernel/trace/ring_buffer.c +24 -4
@@ -3086,10 +3086,30 @@ static bool rb_per_cpu_empty(struct ring_buffer_per_cpu *cpu_buffer)if (unlikely (!head))return true; -return reader->read ==rb_page_commit (reader) && - (commit == reader || - (commit == head && - head->read ==rb_page_commit (commit))); +/* Reader should exhaust content in reader page */ +if (reader->read !=rb_page_commit (reader)) +return false; + +/* +* If writers are committing on the reader page, knowing all +* committed content has been read, the ring buffer is empty. +*/ +if (commit == reader) +return true; + +/* +* If writers are committing on a page other than reader page +* and head page, there should always be content to read. +*/ +if (commit != head) +return false; + +/* +* Writers are committing on the head page, we just need +* to care about there're committed data, and the reader will +* swap reader page with head page when it is to read data. +*/ +return rb_page_commit (commit) ==0 ; }/**
net/caif/caif_socket.c +2 -1
@@ -539,7 +539,8 @@ static int caif_seqpkt_sendmsg(struct socket *sock, struct msghdr *msg, goto err; ret = -EINVAL ; -if (unlikely (msg->msg_iter.iov->iov_base ==NULL )) +if (unlikely (msg->msg_iter.nr_segs ==0 ) || +unlikely (msg->msg_iter.iov->iov_base ==NULL )) goto err; noblock = msg->msg_flags &MSG_DONTWAIT ;
net/decnet/af_decnet.c +12 -15
@@ -823,7 +823,7 @@ static int dn_auto_bind(struct socket *sock)static int dn_confirm_accept (struct sock *sk,long *timeo,gfp_t allocation) {struct dn_scp *scp =DN_SK (sk); -DEFINE_WAIT (wait); +DEFINE_WAIT_FUNC (wait, woken_wake_function);int err;if (scp->state !=DN_CR )
@@ -833,11 +833,11 @@ static int dn_confirm_accept(struct sock *sk, long *timeo, gfp_t allocation) scp->segsize_loc =dst_metric_advmss (__sk_dst_get (sk));dn_send_conn_conf (sk, allocation); -prepare_to_wait (sk_sleep (sk), &wait,TASK_INTERRUPTIBLE ); +add_wait_queue (sk_sleep (sk), &wait);for (;;) {release_sock (sk);if (scp->state ==DN_CC ) - *timeo =schedule_timeout (*timeo); + *timeo =wait_woken (&wait,TASK_INTERRUPTIBLE , *timeo);lock_sock (sk); err =0 ;if (scp->state ==DN_RUN )
@@ -851,9 +851,8 @@ static int dn_confirm_accept(struct sock *sk, long *timeo, gfp_t allocation) err = -EAGAIN ;if (!*timeo)break ; -prepare_to_wait (sk_sleep (sk), &wait,TASK_INTERRUPTIBLE ); } -finish_wait (sk_sleep (sk), &wait); +remove_wait_queue (sk_sleep (sk), &wait);if (err ==0 ) { sk->sk_socket->state =SS_CONNECTED ; }else if (scp->state !=DN_CC ) {
@@ -865,7 +864,7 @@ static int dn_confirm_accept(struct sock *sk, long *timeo, gfp_t allocation)static int dn_wait_run (struct sock *sk,long *timeo) {struct dn_scp *scp =DN_SK (sk); -DEFINE_WAIT (wait); +DEFINE_WAIT_FUNC (wait, woken_wake_function);int err =0 ;if (scp->state ==DN_RUN )
@@ -874,11 +873,11 @@ static int dn_wait_run(struct sock *sk, long *timeo)if (!*timeo)return -EALREADY ; -prepare_to_wait (sk_sleep (sk), &wait,TASK_INTERRUPTIBLE ); +add_wait_queue (sk_sleep (sk), &wait);for (;;) {release_sock (sk);if (scp->state ==DN_CI || scp->state ==DN_CC ) - *timeo =schedule_timeout (*timeo); + *timeo =wait_woken (&wait,TASK_INTERRUPTIBLE , *timeo);lock_sock (sk); err =0 ;if (scp->state ==DN_RUN )
@@ -892,9 +891,8 @@ static int dn_wait_run(struct sock *sk, long *timeo) err = -ETIMEDOUT ;if (!*timeo)break ; -prepare_to_wait (sk_sleep (sk), &wait,TASK_INTERRUPTIBLE ); } -finish_wait (sk_sleep (sk), &wait); +remove_wait_queue (sk_sleep (sk), &wait); out:if (err ==0 ) { sk->sk_socket->state =SS_CONNECTED ;
@@ -1039,16 +1037,16 @@ static void dn_user_copy(struct sk_buff *skb, struct optdata_dn *opt)static struct sk_buff *dn_wait_for_connect (struct sock *sk,long *timeo) { -DEFINE_WAIT (wait); +DEFINE_WAIT_FUNC (wait, woken_wake_function);struct sk_buff *skb =NULL ;int err =0 ; -prepare_to_wait (sk_sleep (sk), &wait,TASK_INTERRUPTIBLE ); +add_wait_queue (sk_sleep (sk), &wait);for (;;) {release_sock (sk); skb =skb_dequeue (&sk->sk_receive_queue);if (skb ==NULL ) { - *timeo =schedule_timeout (*timeo); + *timeo =wait_woken (&wait,TASK_INTERRUPTIBLE , *timeo); skb =skb_dequeue (&sk->sk_receive_queue); }lock_sock (sk);
@@ -1063,9 +1061,8 @@ static struct sk_buff *dn_wait_for_connect(struct sock *sk, long *timeo) err = -EAGAIN ;if (!*timeo)break ; -prepare_to_wait (sk_sleep (sk), &wait,TASK_INTERRUPTIBLE ); } -finish_wait (sk_sleep (sk), &wait); +remove_wait_queue (sk_sleep (sk), &wait);return skb ==NULL ?ERR_PTR (err) : skb; }
net/ipv4/tcp_ipv4.c +2 -2
@@ -277,7 +277,7 @@ void tcp_v4_mtu_reduced(struct sock *sk)if ((1 << sk->sk_state) & (TCPF_LISTEN |TCPF_CLOSE ))return ; - mtu =tcp_sk (sk)->mtu_info; + mtu =READ_ONCE (tcp_sk (sk)->mtu_info); dst =inet_csk_update_pmtu (sk, mtu);if (!dst)return ;
@@ -444,7 +444,7 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)if (sk->sk_state ==TCP_LISTEN ) goto out; - tp->mtu_info = info; +WRITE_ONCE (tp->mtu_info, info);if (!sock_owned_by_user (sk)) {tcp_v4_mtu_reduced (sk); }else {
net/ipv4/tcp_output.c +1 -0
@@ -1353,6 +1353,7 @@ int tcp_mtu_to_mss(struct sock *sk, int pmtu)return __tcp_mtu_to_mss (sk, pmtu) - (tcp_sk (sk)->tcp_header_len -sizeof (struct tcphdr )); } +EXPORT_SYMBOL (tcp_mtu_to_mss);/* Inverse of above */ int tcp_mss_to_mtu (struct sock *sk,int mss)
net/ipv6/tcp_ipv6.c +17 -2
@@ -308,11 +308,20 @@ failure:static void tcp_v6_mtu_reduced (struct sock *sk) {struct dst_entry *dst; +u32 mtu;if ((1 << sk->sk_state) & (TCPF_LISTEN |TCPF_CLOSE ))return ; - dst =inet6_csk_update_pmtu (sk,tcp_sk (sk)->mtu_info); + mtu =READ_ONCE (tcp_sk (sk)->mtu_info); + +/* Drop requests trying to increase our current mss. +* Check done in __ip6_rt_update_pmtu() is too late. +*/ +if (tcp_mtu_to_mss (sk, mtu) >=tcp_sk (sk)->mss_cache) +return ; + + dst =inet6_csk_update_pmtu (sk, mtu);if (!dst)return ;
@@ -391,6 +400,8 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, }if (type ==ICMPV6_PKT_TOOBIG ) { +u32 mtu =ntohl (info); +/* We are not interested in TCP_LISTEN and open_requests * (SYN-ACKs send out by Linux are always <576bytes so * they should go through unfragmented).
@@ -401,7 +412,11 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,if (!ip6_sk_accept_pmtu (sk)) goto out; - tp->mtu_info =ntohl (info); +if (mtu <IPV6_MIN_MTU ) + goto out; + +WRITE_ONCE (tp->mtu_info, mtu); +if (!sock_owned_by_user (sk))tcp_v6_mtu_reduced (sk); else if (!test_and_set_bit(TCP_MTU_REDUCED_DEFERRED,
net/ipv6/xfrm6_output.c +1 -1
@@ -141,7 +141,7 @@ static int __xfrm6_output(struct net *net, struct sock *sk, struct sk_buff *skb) {struct dst_entry *dst =skb_dst (skb);struct xfrm_state *x = dst->xfrm; -int mtu; +unsigned int mtu;bool toobig;#ifdef CONFIG_NETFILTER
net/netrom/nr_timer.c +11 -9
@@ -125,11 +125,9 @@ static void nr_heartbeat_expiry(unsigned long param)is accepted() it isn't 'dead' so doesn't get removed. */ if (sock_flag (sk,SOCK_DESTROY ) || (sk->sk_state ==TCP_LISTEN &&sock_flag (sk,SOCK_DEAD ))) { -sock_hold (sk);bh_unlock_sock (sk);nr_destroy_socket (sk); -sock_put (sk); -return ; + goto out; }break ;
@@ -150,6 +148,8 @@ static void nr_heartbeat_expiry(unsigned long param)nr_start_heartbeat (sk);bh_unlock_sock (sk); +out: +sock_put (sk); }static void nr_t2timer_expiry (unsigned long param)
@@ -163,6 +163,7 @@ static void nr_t2timer_expiry(unsigned long param)nr_enquiry_response (sk); }bh_unlock_sock (sk); +sock_put (sk); }static void nr_t4timer_expiry (unsigned long param)
@@ -172,6 +173,7 @@ static void nr_t4timer_expiry(unsigned long param)bh_lock_sock (sk);nr_sk (sk)->condition &= ~NR_COND_PEER_RX_BUSY ;bh_unlock_sock (sk); +sock_put (sk); }static void nr_idletimer_expiry (unsigned long param)
@@ -200,6 +202,7 @@ static void nr_idletimer_expiry(unsigned long param)sock_set_flag (sk,SOCK_DEAD ); }bh_unlock_sock (sk); +sock_put (sk); }static void nr_t1timer_expiry (unsigned long param)
@@ -212,8 +215,7 @@ static void nr_t1timer_expiry(unsigned long param)case NR_STATE_1 :if (nr->n2count == nr->n2) {nr_disconnect (sk,ETIMEDOUT ); -bh_unlock_sock (sk); -return ; + goto out; }else { nr->n2count++;nr_write_internal (sk,NR_CONNREQ );
@@ -223,8 +225,7 @@ static void nr_t1timer_expiry(unsigned long param)case NR_STATE_2 :if (nr->n2count == nr->n2) {nr_disconnect (sk,ETIMEDOUT ); -bh_unlock_sock (sk); -return ; + goto out; }else { nr->n2count++;nr_write_internal (sk,NR_DISCREQ );
@@ -234,8 +235,7 @@ static void nr_t1timer_expiry(unsigned long param)case NR_STATE_3 :if (nr->n2count == nr->n2) {nr_disconnect (sk,ETIMEDOUT ); -bh_unlock_sock (sk); -return ; + goto out; }else { nr->n2count++;nr_requeue_frames (sk);
@@ -244,5 +244,7 @@ static void nr_t1timer_expiry(unsigned long param) }nr_start_t1timer (sk); +out:bh_unlock_sock (sk); +sock_put (sk); }
scripts/mkcompile_h +11 -3
@@ -82,15 +82,23 @@ UTS_TRUNCATE="cut -b -$UTS_LEN" # Only replace the real compile.h if the new one is different, # in order to preserve the timestamp and avoid unnecessary # recompilations. -# We don't consider the file changed if only the date/time changed. +# We don't consider the file changed if only the date/time changed, +# unless KBUILD_BUILD_TIMESTAMP was explicitly set (e.g. for +# reproducible builds with that value referring to a commit timestamp). # A kernel config change will increase the generation number, thus # causing compile.h to be updated (including date/time) due to the # changed comment in the # first line. +if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then + IGNORE_PATTERN="UTS_VERSION" +else + IGNORE_PATTERN="NOT_A_PATTERN_TO_BE_MATCHED" +fi + if [ -r $TARGET ] && \ - grep -v 'UTS_VERSION' $TARGET > .tmpver.1 && \ - grep -v 'UTS_VERSION' .tmpcompile > .tmpver.2 && \ + grep -v $IGNORE_PATTERN $TARGET > .tmpver.1 && \ + grep -v $IGNORE_PATTERN .tmpcompile > .tmpver.2 && \ cmp -s .tmpver.1 .tmpver.2; then rm -f .tmpcompile else
sound/isa/sb/sb16_csp.c +4 -0
@@ -828,6 +828,7 @@ static int snd_sb_csp_start(struct snd_sb_csp * p, int sample_width, int channel mixR =snd_sbmixer_read (p->chip,SB_DSP4_PCM_DEV +1 );snd_sbmixer_write (p->chip,SB_DSP4_PCM_DEV , mixL &0x7 );snd_sbmixer_write (p->chip,SB_DSP4_PCM_DEV +1 , mixR &0x7 ); +spin_unlock_irqrestore (&p->chip->mixer_lock, flags);spin_lock (&p->chip->reg_lock);set_mode_register (p->chip,0xc0 );/* c0 = STOP */
@@ -867,6 +868,7 @@ static int snd_sb_csp_start(struct snd_sb_csp * p, int sample_width, int channelspin_unlock (&p->chip->reg_lock);/* restore PCM volume */ +spin_lock_irqsave (&p->chip->mixer_lock, flags);snd_sbmixer_write (p->chip,SB_DSP4_PCM_DEV , mixL);snd_sbmixer_write (p->chip,SB_DSP4_PCM_DEV +1 , mixR);spin_unlock_irqrestore (&p->chip->mixer_lock, flags);
@@ -892,6 +894,7 @@ static int snd_sb_csp_stop(struct snd_sb_csp * p) mixR =snd_sbmixer_read (p->chip,SB_DSP4_PCM_DEV +1 );snd_sbmixer_write (p->chip,SB_DSP4_PCM_DEV , mixL &0x7 );snd_sbmixer_write (p->chip,SB_DSP4_PCM_DEV +1 , mixR &0x7 ); +spin_unlock_irqrestore (&p->chip->mixer_lock, flags);spin_lock (&p->chip->reg_lock);if (p->running &SNDRV_SB_CSP_ST_QSOUND ) {
@@ -906,6 +909,7 @@ static int snd_sb_csp_stop(struct snd_sb_csp * p)spin_unlock (&p->chip->reg_lock);/* restore PCM volume */ +spin_lock_irqsave (&p->chip->mixer_lock, flags);snd_sbmixer_write (p->chip,SB_DSP4_PCM_DEV , mixL);snd_sbmixer_write (p->chip,SB_DSP4_PCM_DEV +1 , mixR);spin_unlock_irqrestore (&p->chip->mixer_lock, flags);
tools/perf/tests/bpf.c +2 -0
@@ -1,4 +1,5 @@#include <stdio.h> +#include <stdlib.h> #include <sys/epoll.h> #include <util/bpf-loader.h> #include <util/evlist.h>
@@ -176,6 +177,7 @@ static int __test__bpf(int idx) bpf_testcase_table[idx].target_func, bpf_testcase_table[idx].expect_result); out: +free (obj_buf);bpf__clear ();return ret; }
tools/perf/util/probe-file.c +2 -2
@@ -318,10 +318,10 @@ int probe_file__del_events(int fd, struct strfilter *filter) ret =probe_file__get_events (fd, filter, namelist);if (ret <0 ) -return ret; + goto out; ret =probe_file__del_strlist (fd, namelist); +out:strlist__delete (namelist); -return ret; }