Linux 4.9.189
Greg KH
maintainerI'm announcing the release of the 4.9.189 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:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/kernel-parameters.txt | 9 +- Makefile | 2 arch/arm/boot/dts/logicpd-som-lv.dtsi | 18 ++++ arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 16 +++ arch/arm64/include/asm/cpufeature.h | 7 - arch/arm64/kernel/cpufeature.c | 14 ++- arch/x86/entry/calling.h | 18 ++++ arch/x86/entry/entry_64.S | 21 ++++ arch/x86/include/asm/cpufeatures.h | 8 - arch/x86/kernel/cpu/bugs.c | 105 +++++++++++++++++++++--- arch/x86/kernel/cpu/common.c | 42 ++++++--- block/blk-core.c | 1 drivers/atm/iphase.c | 8 + drivers/hid/hid-ids.h | 1 drivers/hid/usbhid/hid-quirks.c | 1 drivers/hid/wacom_wac.c | 12 +- drivers/infiniband/core/addr.c | 15 +-- drivers/infiniband/core/sa_query.c | 10 +- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 5 - drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 5 - drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 drivers/net/ethernet/mellanox/mlx5/core/dev.c | 2 drivers/net/ppp/pppoe.c | 3 drivers/net/ppp/pppox.c | 13 ++ drivers/net/ppp/pptp.c | 3 drivers/scsi/fcoe/fcoe_ctlr.c | 51 ++++------- drivers/scsi/libfc/fc_rport.c | 5 - drivers/spi/spi-bcm2835.c | 3 fs/compat_ioctl.c | 3 include/linux/ceph/ceph_debug.h | 6 - include/linux/if_pppox.h | 3 include/net/tcp.h | 17 +++ include/scsi/libfcoe.h | 1 net/bridge/br_multicast.c | 3 net/bridge/br_vlan.c | 5 + net/ceph/ceph_common.c | 13 -- net/core/dev.c | 2 net/ipv4/tcp_output.c | 11 ++ net/ipv6/ip6_tunnel.c | 8 - net/l2tp/l2tp_ppp.c | 3 net/sched/act_ife.c | 3 net/sched/sch_codel.c | 6 - net/tipc/netlink_compat.c | 11 +- tools/objtool/check.c | 2 44 files changed, 362 insertions(+), 135 deletions(-)
Aaron Armstrong Skomra (1):
HID: wacom: fix bit shift for Cintiq Companion 2
Adam Ford (3):
ARM: dts: Add pinmuxing for i2c2 and i2c3 for LogicPD SOM-LV
ARM: dts: Add pinmuxing for i2c2 and i2c3 for LogicPD torpedo
ARM: dts: logicpd-som-lv: Fix Audio Mute
Arnd Bergmann (1):
compat_ioctl: pppoe: fix PPPOEIOCSFWD handling
Ben Hutchings (1):
x86: cpufeatures: Sort feature word 7
Cong Wang (1):
ife: error out when nla attributes are empty
Eric Dumazet (1):
tcp: be more careful in tcp_fragment()
Greg Kroah-Hartman (2):
IB: directly cast the sockaddr union to aockaddr Linux 4.9.189
Gustavo A. R. Silva (1):
atm: iphase: Fix Spectre v1 vulnerability
Haishuang Yan (1):
ip6_tunnel: fix possible use-after-free on xmit
Hannes Reinecke (1):
scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure
Ilya Dryomov (1):
libceph: use kbasename() and kill ceph_file_part()
Jason Gunthorpe (1):
RDMA: Directly cast the sockaddr union to sockaddr
Jia-Ju Bai (1):
net: sched: Fix a possible null-pointer dereference in dequeue_func()
Jiri Pirko (1):
net: fix ifindex collision during namespace removal
Josh Poimboeuf (5):
objtool: Add machine_real_restart() to the noreturn list
objtool: Add rewind_stack_do_exit() to the noreturn list x86/speculation: Prepare entry code for Spectre v1 swapgs mitigations x86/speculation: Enable Spectre v1 swapgs mitigations x86/entry/64: Use JMP instead of JMPQ
Lukas Wunner (1):
spi: bcm2835: Fix 3-wire mode if DMA is enabled
Mark Zhang (1):
net/mlx5: Use reversed order when unregister devices
Nikolay Aleksandrov (2):
net: bridge: delete local fdb on device init failure
net: bridge: mcast: don't delete permanent entries when fast leave is enabled
Sebastian Parschauer (1):
HID: Add quirk for HP X1200 PIXART OEM mouse
Sudarsana Reddy Kalluru (1):
bnx2x: Disable multi-cos feature.
Taras Kondratiuk (1):
tipc: compat: allow tipc commands without arguments
Thomas Gleixner (1):
x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS
Will Deacon (2):
arm64: cpufeature: Fix CTR_EL0 field definitions
arm64: cpufeature: Fix feature comparison for CTR_EL0.{CWG,ERG}
xiao jin (1):
block: blk_init_allocated_queue() set q->fq as NULL in the fail case
Greg KH
maintainerDocumentation/kernel-parameters.txt +5 -4
@@ -2484,6 +2484,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. improves system performance, but it may also expose users to several CPU vulnerabilities. Equivalent to: nopti [X86] + nospectre_v1 [X86] nospectre_v2 [X86] spectre_v2_user=off [X86] spec_store_bypass_disable=off [X86]
@@ -2819,10 +2820,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. nohugeiomap [KNL,x86] Disable kernel huge I/O mappings. - nospectre_v1 [PPC] Disable mitigations for Spectre Variant 1 (bounds - check bypass). With this option data leaks are possible - in the system. - nosmt [KNL,S390] Disable symmetric multithreading (SMT). Equivalent to smt=1.
@@ -2830,6 +2827,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. nosmt=force: Force disable SMT, cannot be undone via the sysfs control file. + nospectre_v1 [X86,PPC] Disable mitigations for Spectre Variant 1 + (bounds check bypass). With this option data leaks are + possible in the system. + nospectre_v2 [X86,PPC_FSL_BOOK3E] Disable all mitigations for the Spectre variant 2 (indirect branch prediction) vulnerability. System may allow data leaks with this option, which is equivalent
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 188 +SUBLEVEL = 189 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/boot/dts/logicpd-som-lv.dtsi +18 -0
@@ -108,16 +108,21 @@ twl_audio: audio { compatible = "ti,twl4030-audio"; codec { + ti,hs_extmute_gpio = <&gpio2 25 GPIO_ACTIVE_HIGH>; }; }; }; }; &i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; clock-frequency = <400000>; }; &i2c3 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins>; clock-frequency = <400000>; };
@@ -221,6 +226,7 @@ pinctrl-single,pins = < OMAP3_CORE1_IOPAD(0x21ba, PIN_INPUT | MUX_MODE0) /* i2c1_scl.i2c1_scl */ OMAP3_CORE1_IOPAD(0x21bc, PIN_INPUT | MUX_MODE0) /* i2c1_sda.i2c1_sda */ + OMAP3_CORE1_IOPAD(0x20ba, PIN_OUTPUT | MUX_MODE4) /* gpmc_ncs6.gpio_57 */ >; }; };
@@ -239,6 +245,18 @@ OMAP3_WKUP_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE4) /* sys_boot1.gpio_3 */ >; }; + i2c2_pins: pinmux_i2c2_pins { + pinctrl-single,pins = < + OMAP3_CORE1_IOPAD(0x21be, PIN_INPUT | MUX_MODE0) /* i2c2_scl */ + OMAP3_CORE1_IOPAD(0x21c0, PIN_INPUT | MUX_MODE0) /* i2c2_sda */ + >; + }; + i2c3_pins: pinmux_i2c3_pins { + pinctrl-single,pins = < + OMAP3_CORE1_IOPAD(0x21c2, PIN_INPUT | MUX_MODE0) /* i2c3_scl */ + OMAP3_CORE1_IOPAD(0x21c4, PIN_INPUT | MUX_MODE0) /* i2c3_sda */ + >; + }; }; &omap3_pmx_core2 {
arch/arm/boot/dts/logicpd-torpedo-som.dtsi +16 -0
@@ -117,10 +117,14 @@ }; &i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; clock-frequency = <400000>; }; &i2c3 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins>; clock-frequency = <400000>; at24@50 { compatible = "atmel,24c64";
@@ -215,6 +219,18 @@ OMAP3_CORE1_IOPAD(0x21bc, PIN_INPUT | MUX_MODE0) /* i2c1_sda.i2c1_sda */ >; }; + i2c2_pins: pinmux_i2c2_pins { + pinctrl-single,pins = < + OMAP3_CORE1_IOPAD(0x21be, PIN_INPUT | MUX_MODE0) /* i2c2_scl */ + OMAP3_CORE1_IOPAD(0x21c0, PIN_INPUT | MUX_MODE0) /* i2c2_sda */ + >; + }; + i2c3_pins: pinmux_i2c3_pins { + pinctrl-single,pins = < + OMAP3_CORE1_IOPAD(0x21c2, PIN_INPUT | MUX_MODE0) /* i2c3_scl */ + OMAP3_CORE1_IOPAD(0x21c4, PIN_INPUT | MUX_MODE0) /* i2c3_sda */ + >; + }; }; &uart2 {
arch/arm64/include/asm/cpufeature.h +4 -3
@@ -31,9 +31,10 @@/* CPU feature register tracking */ enum ftr_type { -FTR_EXACT ,/* Use a predefined safe value */ -FTR_LOWER_SAFE ,/* Smaller value is safe */ -FTR_HIGHER_SAFE ,/* Bigger value is safe */ +FTR_EXACT ,/* Use a predefined safe value */ +FTR_LOWER_SAFE ,/* Smaller value is safe */ +FTR_HIGHER_SAFE ,/* Bigger value is safe */ +FTR_HIGHER_OR_ZERO_SAFE ,/* Bigger value is safe, but 0 is biggest */ };#define FTR_STRICT true/* SANITY check strict matching required */
arch/arm64/kernel/cpufeature.c +10 -4
@@ -148,10 +148,12 @@ static const struct arm64_ftr_bits ftr_id_aa64mmfr2[] = { };static const struct arm64_ftr_bits ftr_ctr[] = { -ARM64_FTR_BITS (FTR_STRICT ,FTR_EXACT ,31 ,1 ,1 ),/* RAO */ -ARM64_FTR_BITS (FTR_STRICT ,FTR_EXACT ,28 ,3 ,0 ), -ARM64_FTR_BITS (FTR_STRICT ,FTR_HIGHER_SAFE ,24 ,4 ,0 ),/* CWG */ -ARM64_FTR_BITS (FTR_STRICT ,FTR_LOWER_SAFE ,20 ,4 ,0 ),/* ERG */ +ARM64_FTR_BITS (FTR_STRICT ,FTR_EXACT ,31 ,1 ,1 ),/* RES1 */ +ARM64_FTR_BITS (FTR_STRICT ,FTR_EXACT ,30 ,1 ,0 ), +ARM64_FTR_BITS (FTR_STRICT ,FTR_LOWER_SAFE ,29 ,1 ,1 ),/* DIC */ +ARM64_FTR_BITS (FTR_STRICT ,FTR_LOWER_SAFE ,28 ,1 ,1 ),/* IDC */ +ARM64_FTR_BITS (FTR_STRICT ,FTR_HIGHER_OR_ZERO_SAFE ,24 ,4 ,0 ),/* CWG */ +ARM64_FTR_BITS (FTR_STRICT ,FTR_HIGHER_OR_ZERO_SAFE ,20 ,4 ,0 ),/* ERG */ ARM64_FTR_BITS (FTR_STRICT ,FTR_LOWER_SAFE ,CTR_DMINLINE_SHIFT ,4 ,1 ),/* * Linux can handle differing I-cache policies. Userspace JITs will
@@ -390,6 +392,10 @@ static s64 arm64_ftr_safe_value(const struct arm64_ftr_bits *ftrp, s64 new,case FTR_LOWER_SAFE : ret = new < cur ? new : cur;break ; +case FTR_HIGHER_OR_ZERO_SAFE : +if (!cur || !new) +break ; +/* Fallthrough */ case FTR_HIGHER_SAFE : ret = new > cur ? new : cur;break ;
arch/x86/entry/calling.h +18 -0
@@ -1,4 +1,5 @@#include <linux/jump_label.h> +#include <asm/cpufeatures.h> /*
@@ -201,6 +202,23 @@ For 32-bit we have the following conventions - kernel is built with .byte 0xf1 .endm +/* +* Mitigate Spectre v1 for conditional swapgs code paths. +* +* FENCE_SWAPGS_USER_ENTRY is used in the user entry swapgs code path, to +* prevent a speculative swapgs when coming from kernel space. +* +* FENCE_SWAPGS_KERNEL_ENTRY is used in the kernel entry non-swapgs code path, +* to prevent the swapgs from getting speculatively skipped when coming from +* user space. +*/ +.macro FENCE_SWAPGS_USER_ENTRY + ALTERNATIVE "", "lfence", X86_FEATURE_FENCE_SWAPGS_USER +.endm +.macro FENCE_SWAPGS_KERNEL_ENTRY +ALTERNATIVE "" ,"lfence" ,X86_FEATURE_FENCE_SWAPGS_KERNEL +.endm +#endif /* CONFIG_X86_64 */ /*
arch/x86/entry/entry_64.S +19 -2
@@ -420,6 +420,7 @@ END(irq_entries_start) * tracking that we're in kernel mode. */ SWAPGS + FENCE_SWAPGS_USER_ENTRY SWITCH_KERNEL_CR3 /*
@@ -433,8 +434,10 @@ END(irq_entries_start) TRACE_IRQS_OFF CALL_enter_from_user_mode - + jmp 2f 1: + FENCE_SWAPGS_KERNEL_ENTRY +2: /* * Save previous stack pointer, optionally switch to interrupt stack. * irq_count is used to check if a CPU is already on an interrupt stack
@@ -1004,6 +1007,13 @@ ENTRY(paranoid_entry) movq %rax, %cr3 2: #endif + /* + * The above doesn't do an unconditional CR3 write, even in the PTI + * case. So do an lfence to prevent GS speculation, regardless of + * whether PTI is enabled. + */ + FENCE_SWAPGS_KERNEL_ENTRY + ret END(paranoid_entry)
@@ -1065,6 +1075,7 @@ ENTRY(error_entry) * from user mode due to an IRET fault. */ SWAPGS + FENCE_SWAPGS_USER_ENTRY .Lerror_entry_from_usermode_after_swapgs: /*
@@ -1076,6 +1087,8 @@ ENTRY(error_entry) CALL_enter_from_user_mode ret +.Lerror_entry_done_lfence: + FENCE_SWAPGS_KERNEL_ENTRY .Lerror_entry_done: TRACE_IRQS_OFF ret
@@ -1094,7 +1107,7 @@ ENTRY(error_entry) cmpq %rax, RIP+8(%rsp) je .Lbstep_iret cmpq $.Lgs_change, RIP+8(%rsp) - jne .Lerror_entry_done + jne .Lerror_entry_done_lfence /* * hack: .Lgs_change can fail with user gsbase. If this happens, fix up
@@ -1102,6 +1115,7 @@ ENTRY(error_entry) * .Lgs_change's error handler with kernel gsbase. */ SWAPGS + FENCE_SWAPGS_USER_ENTRY jmp .Lerror_entry_done .Lbstep_iret:
@@ -1115,6 +1129,7 @@ ENTRY(error_entry) * Switch to kernel gsbase: */ SWAPGS + FENCE_SWAPGS_USER_ENTRY /* * Pretend that the exception came from user mode: set up pt_regs
@@ -1211,6 +1226,7 @@ ENTRY(nmi) * to switch CR3 here. */ cld + FENCE_SWAPGS_USER_ENTRY movq %rsp, %rdx movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp pushq 5*8(%rdx) /* pt_regs->ss */
@@ -1499,6 +1515,7 @@ end_repeat_nmi: movq %rax, %cr3 2: #endif + FENCE_SWAPGS_KERNEL_ENTRY /* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */ call do_nmi
arch/x86/include/asm/cpufeatures.h +4 -4
@@ -192,7 +192,8 @@#define X86_FEATURE_HW_PSTATE ( 7*32+ 8)/* AMD HW-PState */ #define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9)/* AMD ProcFeedbackInterface */ - +#define X86_FEATURE_FENCE_SWAPGS_USER ( 7*32+10)/* "" LFENCE in user entry SWAPGS path */ +#define X86_FEATURE_FENCE_SWAPGS_KERNEL ( 7*32+11)/* "" LFENCE in kernel entry SWAPGS path */ #define X86_FEATURE_RETPOLINE ( 7*32+12)/* "" Generic Retpoline mitigation for Spectre variant 2 */ #define X86_FEATURE_RETPOLINE_AMD ( 7*32+13)/* "" AMD Retpoline mitigation for Spectre variant 2 */
@@ -201,9 +202,6 @@#define X86_FEATURE_RSB_CTXSW ( 7*32+19)/* "" Fill RSB on context switches */ -/* Because the ALTERNATIVE scheme is for members of the X86_FEATURE club... */ -#define X86_FEATURE_KAISER ( 7*32+31)/* CONFIG_PAGE_TABLE_ISOLATION w/o nokaiser */ -#define X86_FEATURE_USE_IBPB ( 7*32+21)/* "" Indirect Branch Prediction Barrier enabled */ #define X86_FEATURE_USE_IBRS_FW ( 7*32+22)/* "" Use IBRS during runtime firmware calls */ #define X86_FEATURE_SPEC_STORE_BYPASS_DISABLE ( 7*32+23)/* "" Disable Speculative Store Bypass. */
@@ -214,6 +212,7 @@#define X86_FEATURE_ZEN ( 7*32+28)/* "" CPU is AMD family 0x17 (Zen) */ #define X86_FEATURE_L1TF_PTEINV ( 7*32+29)/* "" L1TF workaround PTE inversion */ #define X86_FEATURE_IBRS_ENHANCED ( 7*32+30)/* Enhanced IBRS */ +#define X86_FEATURE_KAISER ( 7*32+31)/* CONFIG_PAGE_TABLE_ISOLATION w/o nokaiser */ /* Virtualization flags: Linux defined, word 8 */ #define X86_FEATURE_TPR_SHADOW ( 8*32+ 0)/* Intel TPR Shadow */
@@ -357,5 +356,6 @@#define X86_BUG_L1TF X86_BUG(18)/* CPU is affected by L1 Terminal Fault */ #define X86_BUG_MDS X86_BUG(19)/* CPU is affected by Microarchitectural data sampling */ #define X86_BUG_MSBDS_ONLY X86_BUG(20)/* CPU is only affected by the MSDBS variant of BUG_MDS */ +#define X86_BUG_SWAPGS X86_BUG(21)/* CPU is affected by speculation through SWAPGS */ #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/kernel/cpu/bugs.c +96 -9
132 lines not on this page · raw message
arch/x86/kernel/cpu/common.c +27 -15
68 lines not on this page · raw message
block/blk-core.c +1 -0
@@ -881,6 +881,7 @@ blk_init_allocated_queue(struct request_queue *q, request_fn_proc *rfn, fail:blk_free_flush_queue (q->fq); + q->fq =NULL ;return NULL ; }EXPORT_SYMBOL (blk_init_allocated_queue);
drivers/atm/iphase.c +6 -2
@@ -63,6 +63,7 @@#include <asm/byteorder.h> #include <linux/vmalloc.h> #include <linux/jiffies.h> +#include <linux/nospec.h> #include "iphase.h" #include "suni.h" #define swap_byte_order (x) (((x & 0xff) << 8) | ((x & 0xff00) >> 8))
@@ -2760,8 +2761,11 @@ static int ia_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg) }if (copy_from_user (&ia_cmds, arg,sizeof ia_cmds))return -EFAULT ; board = ia_cmds.status; -if ((board <0 ) || (board > iadev_count)) - board =0 ; + +if ((board <0 ) || (board > iadev_count)) + board =0 ; + board =array_index_nospec (board, iadev_count +1 ); + iadev = ia_dev[board];switch (ia_cmds.cmd) {case MEMDUMP :
drivers/hid/hid-ids.h +1 -0
@@ -509,6 +509,7 @@#define USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0A4A 0x0a4a#define USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A 0x0b4a#define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE 0x134a +#define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0641 0x0641#define USB_VENDOR_ID_HUION 0x256c#define USB_DEVICE_ID_HUION_TABLET 0x006e
drivers/hid/usbhid/hid-quirks.c +1 -0
@@ -98,6 +98,7 @@ static const struct hid_blacklist { { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0A4A, HID_QUIRK_ALWAYS_POLL }, { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A, HID_QUIRK_ALWAYS_POLL }, { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE, HID_QUIRK_ALWAYS_POLL }, + { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0641, HID_QUIRK_ALWAYS_POLL }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_C077, HID_QUIRK_ALWAYS_POLL }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KEYBOARD_G710_PLUS, HID_QUIRK_NOGET }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C01A, HID_QUIRK_ALWAYS_POLL },
drivers/hid/wacom_wac.c +6 -6
@@ -529,14 +529,14 @@ static int wacom_intuos_pad(struct wacom_wac *wacom)*/ buttons = (data[4 ] <<1 ) | (data[3 ] &0x01 ); }else if (features->type ==CINTIQ_COMPANION_2 ) { -/* d-pad right -> data[4] & 0x10 -* d-pad up -> data[4] & 0x20 -* d-pad left -> data[4] & 0x40 -* d-pad down -> data[4] & 0x80 -* d-pad center -> data[3] & 0x01 +/* d-pad right -> data[2] & 0x10 +* d-pad up -> data[2] & 0x20 +* d-pad left -> data[2] & 0x40 +* d-pad down -> data[2] & 0x80 +* d-pad center -> data[1] & 0x01 */ buttons = ((data[2 ] >>4 ) <<7 ) | - ((data[1 ] &0x04 ) <<6 ) | + ((data[1 ] &0x04 ) <<4 ) | ((data[2 ] &0x0F ) <<2 ) | (data[1 ] &0x03 ); }else if (features->type >=INTUOS5S && features->type <=INTUOSPL ) {
drivers/infiniband/core/addr.c +7 -8
@@ -735,14 +735,13 @@ int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid,struct net_device *dev;union { -struct sockaddr _sockaddr;struct sockaddr_in _sockaddr_in;struct sockaddr_in6 _sockaddr_in6; } sgid_addr, dgid_addr; -rdma_gid2ip (&sgid_addr._sockaddr, sgid); -rdma_gid2ip (&dgid_addr._sockaddr, dgid); +rdma_gid2ip ((struct sockaddr *)&sgid_addr, sgid); +rdma_gid2ip ((struct sockaddr *)&dgid_addr, dgid);memset (&dev_addr,0 ,sizeof (dev_addr));if (if_index)
@@ -751,8 +750,9 @@ int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid, ctx.addr = &dev_addr;init_completion (&ctx.comp); - ret =rdma_resolve_ip (&self, &sgid_addr._sockaddr, &dgid_addr._sockaddr, - &dev_addr,1000 , resolve_cb, &ctx); + ret =rdma_resolve_ip (&self, (struct sockaddr *)&sgid_addr, + (struct sockaddr *)&dgid_addr, &dev_addr,1000 , + resolve_cb, &ctx);if (ret)return ret;
@@ -782,16 +782,15 @@ int rdma_addr_find_smac_by_sgid(union ib_gid *sgid, u8 *smac, u16 *vlan_id)int ret =0 ;struct rdma_dev_addr dev_addr;union { -struct sockaddr _sockaddr;struct sockaddr_in _sockaddr_in;struct sockaddr_in6 _sockaddr_in6; } gid_addr; -rdma_gid2ip (&gid_addr._sockaddr, sgid); +rdma_gid2ip ((struct sockaddr *)&gid_addr, sgid);memset (&dev_addr,0 ,sizeof (dev_addr)); dev_addr.net = &init_net; - ret =rdma_translate_ip (&gid_addr._sockaddr, &dev_addr, vlan_id); + ret =rdma_translate_ip ((struct sockaddr *)&gid_addr, &dev_addr, vlan_id);if (ret)return ret;
drivers/infiniband/core/sa_query.c +5 -5
@@ -1109,7 +1109,6 @@ int ib_init_ah_from_path(struct ib_device *device, u8 port_num, .net = rec->net ? rec->net : &init_net};union { -struct sockaddr _sockaddr;struct sockaddr_in _sockaddr_in;struct sockaddr_in6 _sockaddr_in6; } sgid_addr, dgid_addr;
@@ -1117,12 +1116,13 @@ int ib_init_ah_from_path(struct ib_device *device, u8 port_num,if (!device->get_netdev)return -EOPNOTSUPP ; -rdma_gid2ip (&sgid_addr._sockaddr, &rec->sgid); -rdma_gid2ip (&dgid_addr._sockaddr, &rec->dgid); +rdma_gid2ip ((struct sockaddr *)&sgid_addr, &rec->sgid); +rdma_gid2ip ((struct sockaddr *)&dgid_addr, &rec->dgid);/* validate the route */ - ret =rdma_resolve_ip_route (&sgid_addr._sockaddr, - &dgid_addr._sockaddr, &dev_addr); + ret =rdma_resolve_ip_route ((struct sockaddr *)&sgid_addr, + (struct sockaddr *)&dgid_addr, + &dev_addr);if (ret)return ret;
drivers/infiniband/hw/ocrdma/ocrdma_ah.c +2 -3
@@ -82,7 +82,6 @@ static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah,u8 nxthdr =0x11 ;struct iphdr ipv4;union { -struct sockaddr _sockaddr;struct sockaddr_in _sockaddr_in;struct sockaddr_in6 _sockaddr_in6; } sgid_addr, dgid_addr;
@@ -131,9 +130,9 @@ static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah, ipv4.tot_len =htons (0 ); ipv4.ttl = attr->grh.hop_limit; ipv4.protocol = nxthdr; -rdma_gid2ip (&sgid_addr._sockaddr, sgid); +rdma_gid2ip ((struct sockaddr *)&sgid_addr, sgid); ipv4.saddr = sgid_addr._sockaddr_in.sin_addr.s_addr; -rdma_gid2ip (&dgid_addr._sockaddr, &attr->grh.dgid); +rdma_gid2ip ((struct sockaddr *)&dgid_addr, &attr->grh.dgid); ipv4.daddr = dgid_addr._sockaddr_in.sin_addr.s_addr;memcpy ((u8 *)ah->av + eth_sz, &ipv4,sizeof (struct iphdr )); }else {
drivers/infiniband/hw/ocrdma/ocrdma_hw.c +2 -3
@@ -2505,7 +2505,6 @@ static int ocrdma_set_av_params(struct ocrdma_qp *qp,u32 vlan_id =0xFFFF ;u8 mac_addr[6 ], hdr_type;union { -struct sockaddr _sockaddr;struct sockaddr_in _sockaddr_in;struct sockaddr_in6 _sockaddr_in6; } sgid_addr, dgid_addr;
@@ -2550,8 +2549,8 @@ static int ocrdma_set_av_params(struct ocrdma_qp *qp, hdr_type =ib_gid_to_network_type (sgid_attr.gid_type, &sgid);if (hdr_type ==RDMA_NETWORK_IPV4 ) { -rdma_gid2ip (&sgid_addr._sockaddr, &sgid); -rdma_gid2ip (&dgid_addr._sockaddr, &ah_attr->grh.dgid); +rdma_gid2ip ((struct sockaddr *)&sgid_addr, &sgid); +rdma_gid2ip ((struct sockaddr *)&dgid_addr, &ah_attr->grh.dgid);memcpy (&cmd->params.dgid[0 ], &dgid_addr._sockaddr_in.sin_addr.s_addr,4 ); memcpy(&cmd->params.sgid[0],
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +1 -1
@@ -1939,7 +1939,7 @@ u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb, }/* select a non-FCoE queue */ -return fallback (dev, skb) % (BNX2X_NUM_ETH_QUEUES (bp) * bp->max_cos); +return fallback (dev, skb) % (BNX2X_NUM_ETH_QUEUES (bp)); }void bnx2x_set_num_queues (struct bnx2x *bp)
drivers/net/ethernet/mellanox/mlx5/core/dev.c +1 -1
@@ -207,7 +207,7 @@ void mlx5_unregister_device(struct mlx5_core_dev *dev)struct mlx5_interface *intf;mutex_lock (&mlx5_intf_mutex); -list_for_each_entry (intf, &intf_list, list) +list_for_each_entry_reverse (intf, &intf_list, list)mlx5_remove_device (intf, priv);list_del (&priv->dev_list);mutex_unlock (&mlx5_intf_mutex);
drivers/net/ppp/pppoe.c +3 -0
@@ -1134,6 +1134,9 @@ static const struct proto_ops pppoe_ops = { .recvmsg = pppoe_recvmsg, .mmap = sock_no_mmap, .ioctl = pppox_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = pppox_compat_ioctl, +#endif };static const struct pppox_proto pppoe_proto = {
drivers/net/ppp/pppox.c +13 -0
@@ -22,6 +22,7 @@#include <linux/string.h> #include <linux/module.h> #include <linux/kernel.h> +#include <linux/compat.h> #include <linux/errno.h> #include <linux/netdevice.h> #include <linux/net.h>
@@ -103,6 +104,18 @@ int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)EXPORT_SYMBOL (pppox_ioctl); +#ifdef CONFIG_COMPAT +int pppox_compat_ioctl (struct socket *sock,unsigned int cmd,unsigned long arg) +{ +if (cmd ==PPPOEIOCSFWD32 ) + cmd =PPPOEIOCSFWD ; + +return pppox_ioctl (sock, cmd, (unsigned long )compat_ptr (arg)); +} + +EXPORT_SYMBOL (pppox_compat_ioctl); +#endif +static int pppox_create (struct net *net,struct socket *sock,int protocol,int kern) {
drivers/net/ppp/pptp.c +3 -0
@@ -638,6 +638,9 @@ static const struct proto_ops pptp_ops = { .recvmsg = sock_no_recvmsg, .mmap = sock_no_mmap, .ioctl = pppox_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = pppox_compat_ioctl, +#endif };static const struct pppox_proto pppox_pptp_proto = {
drivers/scsi/fcoe/fcoe_ctlr.c +20 -31
151 lines not on this page · raw message
drivers/scsi/libfc/fc_rport.c +4 -1
@@ -127,12 +127,15 @@ static struct fc_rport_priv *fc_rport_create(struct fc_lport *lport, u32 port_id) {struct fc_rport_priv *rdata; +size_t rport_priv_size =sizeof (*rdata); rdata = lport->tt.rport_lookup (lport, port_id);if (rdata)return rdata; - rdata =kzalloc (sizeof (*rdata) + lport->rport_priv_size,GFP_KERNEL ); +if (lport->rport_priv_size >0 ) + rport_priv_size = lport->rport_priv_size; + rdata =kzalloc (rport_priv_size,GFP_KERNEL );if (!rdata)return NULL ;
drivers/spi/spi-bcm2835.c +2 -1
@@ -554,7 +554,8 @@ static int bcm2835_spi_transfer_one(struct spi_master *master,bcm2835_wr (bs,BCM2835_SPI_CLK , cdiv);/* handle all the 3-wire mode */ -if ((spi->mode &SPI_3WIRE ) && (tfr->rx_buf)) +if (spi->mode &SPI_3WIRE && tfr->rx_buf && + tfr->rx_buf != master->dummy_rx) cs |=BCM2835_SPI_CS_REN ;else cs &= ~BCM2835_SPI_CS_REN ;
fs/compat_ioctl.c +0 -3
@@ -1038,9 +1038,6 @@ COMPATIBLE_IOCTL(PPPIOCDISCONN) COMPATIBLE_IOCTL(PPPIOCATTCHAN) COMPATIBLE_IOCTL(PPPIOCGCHAN) COMPATIBLE_IOCTL(PPPIOCGL2TPSTATS) -/* PPPOX */ -COMPATIBLE_IOCTL(PPPOEIOCSFWD) -COMPATIBLE_IOCTL(PPPOEIOCDFWD) /* Big A */ /* sparc only */ /* Big Q for sound/OSS */
include/linux/ceph/ceph_debug.h +3 -3
@@ -3,6 +3,8 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/string.h> +#ifdef CONFIG_CEPH_LIB_PRETTYDEBUG /*
@@ -12,12 +14,10 @@*/ # if defined(DEBUG ) || defined(CONFIG_DYNAMIC_DEBUG ) -extern const char *ceph_file_part (const char *s,int len);# define dout (fmt, ...) \ pr_debug("%.*s %12.12s:%-4d : " fmt, \ 8 - (int)sizeof(KBUILD_MODNAME), " ", \ - ceph_file_part(__FILE__, sizeof(__FILE__)), \ - __LINE__, ##__VA_ARGS__) + kbasename(__FILE__), __LINE__, ##__VA_ARGS__)# else /* faux printk call just to see any compiler warnings. */ # define dout (fmt, ...) do { \
include/linux/if_pppox.h +3 -0
@@ -84,6 +84,9 @@ extern int register_pppox_proto(int proto_num, const struct pppox_proto *pp);extern void unregister_pppox_proto (int proto_num);extern void pppox_unbind_sock (struct sock *sk);/* delete ppp-channel binding */ extern int pppox_ioctl (struct socket *sock,unsigned int cmd,unsigned long arg); +extern int pppox_compat_ioctl (struct socket *sock,unsigned int cmd,unsigned long arg); + +#define PPPOEIOCSFWD32 _IOW(0xB1 ,0, compat_size_t)/* PPPoX socket states */ enum {
include/net/tcp.h +17 -0
@@ -1595,6 +1595,23 @@ static inline void tcp_check_send_head(struct sock *sk, struct sk_buff *skb_unlitcp_sk (sk)->highest_sack =NULL ; } +static inline struct sk_buff *tcp_rtx_queue_head (const struct sock *sk) +{ +struct sk_buff *skb =tcp_write_queue_head (sk); + +if (skb ==tcp_send_head (sk)) + skb =NULL ; + +return skb; +} + +static inline struct sk_buff *tcp_rtx_queue_tail (const struct sock *sk) +{ +struct sk_buff *skb =tcp_send_head (sk); + +return skb ?tcp_write_queue_prev (sk, skb) :tcp_write_queue_tail (sk); +} +static inline void __tcp_add_write_queue_tail (struct sock *sk,struct sk_buff *skb) {__skb_queue_tail (&sk->sk_write_queue, skb);
include/scsi/libfcoe.h +1 -0
@@ -241,6 +241,7 @@ struct fcoe_fcf {* @vn_mac: VN_Node assigned MAC address for data */ struct fcoe_rport { +struct fc_rport_priv rdata;unsigned long time;u16 fcoe_len;u16 flags;
net/bridge/br_multicast.c +3 -0
@@ -1489,6 +1489,9 @@ br_multicast_leave_group(struct net_bridge *br,if (p->port != port)continue ; +if (p->flags &MDB_PG_FLAGS_PERMANENT ) +break ; +rcu_assign_pointer (*pp, p->next);hlist_del_init (&p->mglist);del_timer (&p->timer);
net/bridge/br_vlan.c +5 -0
@@ -622,6 +622,11 @@ void br_vlan_flush(struct net_bridge *br)ASSERT_RTNL (); +/* delete auto-added default pvid local fdb before flushing vlans +* otherwise it will be leaked on bridge device init failure +*/ +br_fdb_delete_by_port (br,NULL ,0 ,1 ); + vg =br_vlan_group (br);__vlan_flush (vg);RCU_INIT_POINTER (br->vlgrp,NULL );
net/ceph/ceph_common.c +0 -13
@@ -45,19 +45,6 @@ bool libceph_compatible(void *data) }EXPORT_SYMBOL (libceph_compatible); -/* -* find filename portion of a path (/foo/bar/baz -> baz) -*/ -const char *ceph_file_part (const char *s,int len) -{ -const char *e = s + len; - -while (e != s && *(e-1 ) !='/' ) - e--; -return e; -} -EXPORT_SYMBOL (ceph_file_part); -const char *ceph_msg_type_name (int type) {switch (type) {
net/core/dev.c +2 -0
@@ -8296,6 +8296,8 @@ static void __net_exit default_device_exit(struct net *net)/* Push remaining network devices to init_net */ snprintf (fb_name,IFNAMSIZ ,"dev%d" , dev->ifindex); +if (__dev_get_by_name (&init_net, fb_name)) +snprintf (fb_name,IFNAMSIZ ,"dev%%d" ); err =dev_change_net_namespace (dev, &init_net, fb_name);if (err) { pr_emerg("%s: failed to move %s to init_net: %d\n",
net/ipv4/tcp_output.c +10 -1
@@ -1175,6 +1175,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,struct tcp_sock *tp =tcp_sk (sk);struct sk_buff *buff;int nsize, old_factor; +long limit;int nlen;u8 flags;
@@ -1185,7 +1186,15 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,if (nsize <0 ) nsize =0 ; -if (unlikely ((sk->sk_wmem_queued >>1 ) > sk->sk_sndbuf +0x20000 )) { +/* tcp_sendmsg() can overshoot sk_wmem_queued by one full size skb. +* We need some allowance to not penalize applications setting small +* SO_SNDBUF values. +* Also allow first and last skb in retransmit queue to be split. +*/ + limit = sk->sk_sndbuf +2 *SKB_TRUESIZE (GSO_MAX_SIZE ); +if (unlikely ((sk->sk_wmem_queued >>1 ) > limit && + skb !=tcp_rtx_queue_head (sk) && + skb !=tcp_rtx_queue_tail (sk))) {NET_INC_STATS (sock_net (sk),LINUX_MIB_TCPWQUEUETOOBIG );return -ENOMEM ; }
net/ipv6/ip6_tunnel.c +4 -4
@@ -1275,11 +1275,11 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) fl6.flowi6_mark = skb->mark; } + dsfield =INET_ECN_encapsulate (dsfield,ipv4_get_dsfield (iph)); +if (iptunnel_handle_offloads (skb,SKB_GSO_IPXIP6 ))return -1 ; - dsfield =INET_ECN_encapsulate (dsfield,ipv4_get_dsfield (iph)); -skb_set_inner_ipproto (skb,IPPROTO_IPIP ); err = ip6_tnl_xmit(skb, dev, dsfield, &fl6, encap_limit, &mtu,
@@ -1362,11 +1362,11 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) fl6.flowi6_mark = skb->mark; } + dsfield =INET_ECN_encapsulate (dsfield,ipv6_get_dsfield (ipv6h)); +if (iptunnel_handle_offloads (skb,SKB_GSO_IPXIP6 ))return -1 ; - dsfield =INET_ECN_encapsulate (dsfield,ipv6_get_dsfield (ipv6h)); -skb_set_inner_ipproto (skb,IPPROTO_IPV6 ); err = ip6_tnl_xmit(skb, dev, dsfield, &fl6, encap_limit, &mtu,
net/l2tp/l2tp_ppp.c +3 -0
@@ -1790,6 +1790,9 @@ static const struct proto_ops pppol2tp_ops = { .recvmsg = pppol2tp_recvmsg, .mmap = sock_no_mmap, .ioctl = pppox_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = pppox_compat_ioctl, +#endif };static const struct pppox_proto pppol2tp_proto = {
net/sched/act_ife.c +3 -0
@@ -477,6 +477,9 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla,int ret =0 ;int err; +if (!nla) +return -EINVAL ; + err =nla_parse_nested (tb,TCA_IFE_MAX , nla, ife_policy);if (err <0 )return err;
net/sched/sch_codel.c +3 -3
@@ -71,10 +71,10 @@ static struct sk_buff *dequeue_func(struct codel_vars *vars, void *ctx)struct Qdisc *sch = ctx;struct sk_buff *skb =__qdisc_dequeue_head (&sch->q); -if (skb) +if (skb) { sch->qstats.backlog -=qdisc_pkt_len (skb); - -prefetch (&skb->end);/* we'll need skb_shinfo() */ +prefetch (&skb->end);/* we'll need skb_shinfo() */ + }return skb; }
net/tipc/netlink_compat.c +7 -4
@@ -55,6 +55,7 @@ struct tipc_nl_compat_msg {int rep_type;int rep_size;int req_type; +int req_size;struct net *net;struct sk_buff *rep;struct tlv_desc *req;
@@ -252,7 +253,8 @@ static int tipc_nl_compat_dumpit(struct tipc_nl_compat_cmd_dump *cmd,int err;struct sk_buff *arg; -if (msg->req_type && !TLV_CHECK_TYPE (msg->req, msg->req_type)) +if (msg->req_type && (!msg->req_size || + !TLV_CHECK_TYPE (msg->req, msg->req_type)))return -EINVAL ; msg->rep =tipc_tlv_alloc (msg->rep_size);
@@ -345,7 +347,8 @@ static int tipc_nl_compat_doit(struct tipc_nl_compat_cmd_doit *cmd, {int err; -if (msg->req_type && !TLV_CHECK_TYPE (msg->req, msg->req_type)) +if (msg->req_type && (!msg->req_size || + !TLV_CHECK_TYPE (msg->req, msg->req_type)))return -EINVAL ; err =__tipc_nl_compat_doit (cmd, msg);
@@ -1267,8 +1270,8 @@ static int tipc_nl_compat_recv(struct sk_buff *skb, struct genl_info *info) goto send; } - len =nlmsg_attrlen (req_nlh,GENL_HDRLEN +TIPC_GENL_HDRLEN ); -if (!len || !TLV_OK (msg.req, len)) { + msg.req_size =nlmsg_attrlen (req_nlh,GENL_HDRLEN +TIPC_GENL_HDRLEN ); +if (msg.req_size && !TLV_OK (msg.req, msg.req_size)) { msg.rep =tipc_get_err_tlv (TIPC_CFG_NOT_SUPPORTED ); err = -EOPNOTSUPP ; goto send;
tools/objtool/check.c +2 -0
@@ -165,6 +165,8 @@ static int __dead_end_function(struct objtool_file *file, struct symbol *func,"__reiserfs_panic" ,"lbug_with_loc" ,"fortify_panic" , +"machine_real_restart" , + "rewind_stack_do_exit", };if (func->bind ==STB_WEAK )