Linux 4.4.286
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.4.286 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/alpha/include/asm/io.h | 6 +- arch/arm64/Kconfig | 2 arch/arm64/kernel/process.c | 2 arch/arm64/mm/proc.S | 4 - arch/m68k/include/asm/raw_io.h | 20 +++---- arch/parisc/include/asm/page.h | 2 arch/sparc/kernel/mdesc.c | 3 - arch/x86/xen/enlighten.c | 15 +++-- drivers/edac/synopsys_edac.c | 2 drivers/hid/hid-betopff.c | 13 +++- drivers/hid/usbhid/hid-core.c | 13 ++++ drivers/ipack/devices/ipoctal.c | 63 +++++++++++++++++----- drivers/net/ethernet/i825xx/82596.c | 2 drivers/net/ethernet/intel/e100.c | 22 +++++-- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 3 + drivers/net/hamradio/6pack.c | 4 - drivers/net/usb/hso.c | 12 +--- drivers/scsi/scsi_transport_iscsi.c | 8 +- drivers/spi/spi-tegra20-slink.c | 4 - drivers/tty/vt/vt.c | 21 ++++++- drivers/usb/gadget/udc/r8a66597-udc.c | 2 drivers/usb/musb/tusb6010.c | 1 drivers/usb/serial/cp210x.c | 1 drivers/usb/serial/mos7840.c | 2 drivers/usb/serial/option.c | 11 +++ fs/cifs/connect.c | 5 + fs/ext4/dir.c | 6 +- fs/qnx4/dir.c | 69 ++++++++++++++++++------- include/linux/compiler.h | 2 include/linux/cred.h | 14 +++-- kernel/trace/blktrace.c | 8 ++ net/mac80211/wpa.c | 6 ++ net/netfilter/ipset/ip_set_hash_gen.h | 4 - net/netfilter/ipvs/ip_vs_conn.c | 4 + 35 files changed, 253 insertions(+), 105 deletions(-)
Andrea Claudi (1):
ipvs: check that ip_vs_conn_tab_bits is between 8 and 20
Anirudh Rayabharam (1):
HID: usbhid: free raw_report buffers in usbhid_stop
Aya Levin (1):
net/mlx4_en: Don't allow aRFS for encapsulated packets
Baokun Li (1):
scsi: iscsi: Adjust iface sysfs attr detection
Carlo Lobrano (1):
USB: serial: option: add Telit LN920 compositions
Dan Carpenter (2):
usb: gadget: r8a66597: fix a loop in set_feature()
usb: musb: tusb6010: uninitialized data in tusb_fifo_write_unaligned()
Dan Li (1):
arm64: Mark __stack_chk_guard as __ro_after_init
F.A.Sulaiman (1):
HID: betop: fix slab-out-of-bounds Write in betop_probe
Greg Kroah-Hartman (1):
Linux 4.4.286
Guenter Roeck (5):
m68k: Double cast io functions to unsigned long
compiler.h: Introduce absolute_pointer macro
net: i825xx: Use absolute_pointer for memcpy from fixed memory location
alpha: Declare virt_to_phys and virt_to_bus parameter as pointer to volatile
net: 6pack: Fix tx timeout and slot time
Helge Deller (1):
parisc: Use absolute_pointer() to define PAGE0
Igor Matheus Andrade Torrente (1):
tty: Fix out-of-bound vmalloc access in imageblit
Jacob Keller (2):
e100: fix length calculation in e100_get_regs_len
e100: fix buffer overrun in e100_get_regs
Jan Beulich (1):
xen/x86: fix PV trap handling on secondary processors
Johan Hovold (6):
net: hso: fix muxed tty registration
ipack: ipoctal: fix stack information leak
ipack: ipoctal: fix tty registration race
ipack: ipoctal: fix tty-registration error handling
ipack: ipoctal: fix missing allocation-failure check
ipack: ipoctal: fix module reference leak
Johannes Berg (1):
mac80211: fix use-after-free in CCMP/GCMP RX
Jozsef Kadlecsik (1):
netfilter: ipset: Fix oversized kvmalloc() calls
Krzysztof Kozlowski (2):
USB: serial: mos7840: remove duplicated 0xac24 device ID
USB: serial: option: remove duplicate USB device ID
Linus Torvalds (4):
sparc: avoid stringop-overread errors
qnx4: avoid stringop-overread errors
spi: Fix tegra20 build with CONFIG_PM=n
qnx4: work around gcc false positive warning bug
NeilBrown (1):
cred: allow get_cred() and put_cred() to be given NULL.
Sai Krishna Potthuri (1):
EDAC/synopsys: Fix wrong value type assignment for edac_mode
Slark Xiao (1):
USB: serial: option: add device id for Foxconn T99W265
Steve French (1):
cifs: fix incorrect check for null pointer in header_assemble
Suzuki K Poulose (1):
arm64: Extend workaround for erratum 1024718 to all versions of Cortex-A55
Uwe Brandt (1):
USB: serial: cp210x: add ID for GW Instek GDM-834x Digital Multimeter
Zhihao Cheng (1):
blktrace: Fix uaf in blk_trace access after removing by sysfs
yangerkun (1):
ext4: fix potential infinite loop in ext4_dx_readdir()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 285 +SUBLEVEL = 286 EXTRAVERSION = NAME = Blurry Fish Butt
arch/alpha/include/asm/io.h +3 -3
@@ -60,7 +60,7 @@ extern inline void set_hae(unsigned long new_hae)* Change virtual addresses to physical addresses and vv. */ #ifdef USE_48_BIT_KSEG -static inline unsigned long virt_to_phys (void *address) +static inline unsigned long virt_to_phys (volatile void *address) {return (unsigned long )address -IDENT_ADDR ; }
@@ -70,7 +70,7 @@ static inline void * phys_to_virt(unsigned long address) return (void *) (address + IDENT_ADDR); }#else -static inline unsigned long virt_to_phys (void *address) +static inline unsigned long virt_to_phys (volatile void *address) {unsigned long phys = (unsigned long )address;
@@ -111,7 +111,7 @@ static inline dma_addr_t __deprecated isa_page_to_bus(struct page *page)extern unsigned long __direct_map_base;extern unsigned long __direct_map_size; -static inline unsigned long __deprecated virt_to_bus (void *address) +static inline unsigned long __deprecated virt_to_bus (volatile void *address) {unsigned long phys =virt_to_phys (address);unsigned long bus = phys + __direct_map_base;
arch/arm64/Kconfig +1 -1
@@ -381,7 +381,7 @@ config ARM64_ERRATUM_1024718 help This option adds work around for Arm Cortex-A55 Erratum 1024718. - Affected Cortex-A55 cores (r0p0, r0p1, r1p0) could cause incorrect + Affected Cortex-A55 cores (all revisions) could cause incorrect update of the hardware dirty bit when the DBM/AP bits are updated without a break-before-make. The work around is to disable the usage of hardware DBM locally on the affected cores. CPUs not affected by
arch/arm64/kernel/process.c +1 -1
@@ -55,7 +55,7 @@#ifdef CONFIG_CC_STACKPROTECTOR #include <linux/stackprotector.h> -unsigned long __stack_chk_guard__read_mostly ; +unsigned long __stack_chk_guard__ro_after_init ;EXPORT_SYMBOL (__stack_chk_guard);#endif
arch/arm64/mm/proc.S +2 -2
@@ -222,8 +222,8 @@ ENTRY(__cpu_setup) cmp x9, #2 b.lt 1f #ifdef CONFIG_ARM64_ERRATUM_1024718 - /* Disable hardware DBM on Cortex-A55 r0p0, r0p1 & r1p0 */ - cpu_midr_match MIDR_CORTEX_A55, MIDR_CPU_VAR_REV(0, 0), MIDR_CPU_VAR_REV(1, 0), x1, x2, x3, x4 + /* Disable hardware DBM on Cortex-A55 all versions */ + cpu_midr_match MIDR_CORTEX_A55, MIDR_CPU_VAR_REV(0, 0), MIDR_CPU_VAR_REV(0xf, 0xf), x1, x2, x3, x4 cbnz x1, 1f #endif orr x10, x10, #TCR_HD // hardware Dirty flag update
arch/m68k/include/asm/raw_io.h +10 -10
@@ -30,21 +30,21 @@ extern void __iounmap(void *addr, unsigned long size);* two accesses to memory, which may be undesirable for some devices. */ #define in_8 (addr) \ - ({ u8 __v = (*(__force volatile u8 *) (addr)); __v; }) + ({ u8 __v = (*(__force volatile u8 *) (unsigned long)(addr)); __v; })#define in_be16 (addr) \ - ({ u16 __v = (*(__force volatile u16 *) (addr)); __v; }) + ({ u16 __v = (*(__force volatile u16 *) (unsigned long)(addr)); __v; })#define in_be32 (addr) \ - ({ u32 __v = (*(__force volatile u32 *) (addr)); __v; }) + ({ u32 __v = (*(__force volatile u32 *) (unsigned long)(addr)); __v; })#define in_le16 (addr) \ - ({ u16 __v = le16_to_cpu(*(__force volatile __le16 *) (addr)); __v; }) + ({ u16 __v = le16_to_cpu(*(__force volatile __le16 *) (unsigned long)(addr)); __v; })#define in_le32 (addr) \ - ({ u32 __v = le32_to_cpu(*(__force volatile __le32 *) (addr)); __v; }) + ({ u32 __v = le32_to_cpu(*(__force volatile __le32 *) (unsigned long)(addr)); __v; }) -#define out_8 (addr,b) (void)((*(__force volatile u8 *) (addr)) = (b)) -#define out_be16 (addr,w) (void)((*(__force volatile u16 *) (addr)) = (w)) -#define out_be32 (addr,l) (void)((*(__force volatile u32 *) (addr)) = (l)) -#define out_le16 (addr,w) (void)((*(__force volatile __le16 *) (addr)) = cpu_to_le16(w)) -#define out_le32 (addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l)) +#define out_8 (addr,b) (void)((*(__force volatile u8 *) (unsigned long)(addr)) = (b)) +#define out_be16 (addr,w) (void)((*(__force volatile u16 *) (unsigned long)(addr)) = (w)) +#define out_be32 (addr,l) (void)((*(__force volatile u32 *) (unsigned long)(addr)) = (l)) +#define out_le16 (addr,w) (void)((*(__force volatile __le16 *) (unsigned long)(addr)) = cpu_to_le16(w)) +#define out_le32 (addr,l) (void)((*(__force volatile __le32 *) (unsigned long)(addr)) = cpu_to_le32(l))#define raw_inb in_8#define raw_inw in_be16
arch/parisc/include/asm/page.h +1 -1
@@ -174,7 +174,7 @@ extern int npmem_ranges;#include <asm-generic/getorder.h> #include <asm/pdc.h> -#define PAGE0 ((struct zeropage *)__PAGE_OFFSET) +#define PAGE0 ((struct zeropage *)absolute_pointer(__PAGE_OFFSET))/* DEFINITION OF THE ZERO-PAGE (PAG0) */ /* based on work by Jason Eckhardt ([email protected]) */
arch/sparc/kernel/mdesc.c +2 -1
@@ -37,6 +37,7 @@ struct mdesc_hdr {u32 node_sz;/* node block size */ u32 name_sz;/* name block size */ u32 data_sz;/* data block size */ +char data[]; } __attribute__((aligned(16)));struct mdesc_elem {
@@ -369,7 +370,7 @@ out:static struct mdesc_elem *node_block (struct mdesc_hdr *mdesc) { -return (struct mdesc_elem *) (mdesc +1 ); +return (struct mdesc_elem *) mdesc->data; }static void *name_block (struct mdesc_hdr *mdesc)
arch/x86/xen/enlighten.c +9 -6
@@ -861,8 +861,8 @@ static void xen_write_idt_entry(gate_desc *dt, int entrynum, const gate_desc *g)preempt_enable (); } -static void xen_convert_trap_info (const struct desc_ptr *desc, -struct trap_info *traps) +static unsigned xen_convert_trap_info (const struct desc_ptr *desc, +struct trap_info *traps,bool full) {unsigned in, out, count;
@@ -872,17 +872,18 @@ static void xen_convert_trap_info(const struct desc_ptr *desc,for (in = out =0 ; in < count; in++) {gate_desc *entry = (gate_desc *)(desc->address) + in; -if (cvt_gate_to_trap (in, entry, &traps[out])) +if (cvt_gate_to_trap (in, entry, &traps[out]) || full) out++; } - traps[out].address =0 ; + +return out; }void xen_copy_trap_info (struct trap_info *traps) {const struct desc_ptr *desc =this_cpu_ptr (&idt_desc); -xen_convert_trap_info (desc, traps); +xen_convert_trap_info (desc, traps, true); }/* Load a new IDT into Xen. In principle this can be per-CPU, so we
@@ -892,6 +893,7 @@ static void xen_load_idt(const struct desc_ptr *desc) {static DEFINE_SPINLOCK (lock);static struct trap_info traps[257 ]; +unsigned out;trace_xen_cpu_load_idt (desc);
@@ -899,7 +901,8 @@ static void xen_load_idt(const struct desc_ptr *desc)memcpy (this_cpu_ptr (&idt_desc), desc,sizeof (idt_desc)); -xen_convert_trap_info (desc, traps); + out =xen_convert_trap_info (desc, traps, false); +memset (&traps[out],0 ,sizeof (traps[0 ]));xen_mc_flush ();if (HYPERVISOR_set_trap_table (traps))
drivers/edac/synopsys_edac.c +1 -1
@@ -371,7 +371,7 @@ static int synps_edac_init_csrows(struct mem_ctl_info *mci)for (j =0 ; j < csi->nr_channels; j++) { dimm = csi->channels[j]->dimm; - dimm->edac_mode =EDAC_FLAG_SECDED ; + dimm->edac_mode =EDAC_SECDED ; dimm->mtype =synps_edac_get_mtype (priv->baseaddr); dimm->nr_pages = (size >>PAGE_SHIFT ) / csi->nr_channels; dimm->grain =SYNPS_EDAC_ERR_GRAIN ;
drivers/hid/hid-betopff.c +10 -3
@@ -59,15 +59,22 @@ static int betopff_init(struct hid_device *hid) {struct betopff_device *betopff;struct hid_report *report; -struct hid_input *hidinput = - list_first_entry(&hid->inputs, struct hid_input, list); +struct hid_input *hidinput;struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT ].report_list; -struct input_dev *dev = hidinput->input; +struct input_dev *dev;int field_count =0 ;int error;int i, j; +if (list_empty (&hid->inputs)) { +hid_err (hid,"no inputs found\n" ); +return -ENODEV ; + } + + hidinput = list_first_entry(&hid->inputs, struct hid_input, list); + dev = hidinput->input; +if (list_empty (report_list)) {hid_err (hid,"no output reports found\n" );return -ENODEV ;
drivers/hid/usbhid/hid-core.c +12 -1
@@ -500,7 +500,7 @@ static void hid_ctrl(struct urb *urb)if (unplug) { usbhid->ctrltail = usbhid->ctrlhead; - }else { + }else if (usbhid->ctrlhead != usbhid->ctrltail) { usbhid->ctrltail = (usbhid->ctrltail +1 ) & (HID_CONTROL_FIFO_SIZE -1 ); if (usbhid->ctrlhead != usbhid->ctrltail &&
@@ -1185,9 +1185,20 @@ static void usbhid_stop(struct hid_device *hid) usbhid->intf->needs_remote_wakeup =0 ;clear_bit (HID_STARTED , &usbhid->iofl); +spin_lock_irq (&usbhid->lock);/* Sync with error and led handlers */ set_bit (HID_DISCONNECTED , &usbhid->iofl); +while (usbhid->ctrltail != usbhid->ctrlhead) { +if (usbhid->ctrl[usbhid->ctrltail].dir ==USB_DIR_OUT ) { +kfree (usbhid->ctrl[usbhid->ctrltail].raw_report); + usbhid->ctrl[usbhid->ctrltail].raw_report =NULL ; + } + + usbhid->ctrltail = (usbhid->ctrltail +1 ) & + (HID_CONTROL_FIFO_SIZE -1 ); + }spin_unlock_irq (&usbhid->lock); +usb_kill_urb (usbhid->urbin);usb_kill_urb (usbhid->urbout);usb_kill_urb (usbhid->urbctrl);
drivers/ipack/devices/ipoctal.c +47 -16
142 lines not on this page · raw message
drivers/net/ethernet/i825xx/82596.c +1 -1
@@ -1155,7 +1155,7 @@ struct net_device * __init i82596_probe(int unit) err = -ENODEV ; goto out; } -memcpy (eth_addr, (void *)0xfffc1f2c ,ETH_ALEN );/* YUCK! Get addr from NOVRAM */ +memcpy (eth_addr,absolute_pointer (0xfffc1f2c ),ETH_ALEN );/* YUCK! Get addr from NOVRAM */ dev->base_addr =MVME_I596_BASE ; dev->irq = (unsigned ) MVME16x_IRQ_I596; goto found;
drivers/net/ethernet/intel/e100.c +15 -7
@@ -2462,11 +2462,15 @@ static void e100_get_drvinfo(struct net_device *netdev, sizeof(info->bus_info)); } -#define E100_PHY_REGS 0x1C +#define E100_PHY_REGS 0x1Dstatic int e100_get_regs_len (struct net_device *netdev) {struct nic *nic =netdev_priv (netdev); -return 1 +E100_PHY_REGS +sizeof (nic->mem->dump_buf); + +/* We know the number of registers, and the size of the dump buffer. +* Calculate the total size in bytes. +*/ +return (1 +E100_PHY_REGS ) *sizeof (u32) +sizeof (nic->mem->dump_buf); } static void e100_get_regs(struct net_device *netdev,
@@ -2480,14 +2484,18 @@ static void e100_get_regs(struct net_device *netdev, buff[0 ] =ioread8 (&nic->csr->scb.cmd_hi) <<24 |ioread8 (&nic->csr->scb.cmd_lo) <<16 |ioread16 (&nic->csr->scb.status); -for (i =E100_PHY_REGS ; i >=0 ; i--) - buff[1 +E100_PHY_REGS - i] = -mdio_read (netdev, nic->mii.phy_id, i); +for (i =0 ; i <E100_PHY_REGS ; i++) +/* Note that we read the registers in reverse order. This +* ordering is the ABI apparently used by ethtool and other +* applications. +*/ + buff[1 + i] =mdio_read (netdev, nic->mii.phy_id, +E100_PHY_REGS -1 - i);memset (nic->mem->dump_buf,0 ,sizeof (nic->mem->dump_buf));e100_exec_cb (nic,NULL , e100_dump);msleep (10 ); -memcpy (&buff[2 +E100_PHY_REGS ], nic->mem->dump_buf, -sizeof (nic->mem->dump_buf)); +memcpy (&buff[1 +E100_PHY_REGS ], nic->mem->dump_buf, +sizeof (nic->mem->dump_buf)); }static void e100_get_wol (struct net_device *netdev,struct ethtool_wolinfo *wol)
drivers/net/ethernet/mellanox/mlx4/en_netdev.c +3 -0
@@ -311,6 +311,9 @@ mlx4_en_filter_rfs(struct net_device *net_dev, const struct sk_buff *skb,int nhoff =skb_network_offset (skb);int ret =0 ; +if (skb->encapsulation) +return -EPROTONOSUPPORT ; +if (skb->protocol !=htons (ETH_P_IP ))return -EPROTONOSUPPORT ;
drivers/net/hamradio/6pack.c +2 -2
@@ -68,9 +68,9 @@#define SIXP_DAMA_OFF 0/* default level 2 parameters */ -#define SIXP_TXDELAY (HZ/4)/* in 1 s */ +#define SIXP_TXDELAY 25/* 250 ms */ #define SIXP_PERSIST 50/* in 256ths */ -#define SIXP_SLOTTIME (HZ/10)/* in 1 s */ +#define SIXP_SLOTTIME 10/* 100 ms */ #define SIXP_INIT_RESYNC_TIMEOUT (3*HZ/2)/* in 1 s */ #define SIXP_RESYNC_TIMEOUT 5*HZ/* in 1 s */
drivers/net/usb/hso.c +5 -7
@@ -2729,14 +2729,14 @@ struct hso_device *hso_create_mux_serial_device(struct usb_interface *interface, serial =kzalloc (sizeof (*serial),GFP_KERNEL );if (!serial) - goto exit; + goto err_free_dev; hso_dev->port_data.dev_serial = serial; serial->parent = hso_dev;if (hso_serial_common_create (serial,1 ,CTRL_URB_RX_SIZE ,CTRL_URB_TX_SIZE )) - goto exit; + goto err_free_serial; serial->tx_data_length--; serial->write_data = hso_mux_serial_write_data;
@@ -2752,11 +2752,9 @@ struct hso_device *hso_create_mux_serial_device(struct usb_interface *interface,/* done, return it */ return hso_dev; -exit: -if (serial) { -tty_unregister_device (tty_drv, serial->minor); -kfree (serial); - } +err_free_serial: +kfree (serial); +err_free_dev:kfree (hso_dev);return NULL ;
drivers/scsi/scsi_transport_iscsi.c +4 -4
@@ -429,9 +429,7 @@ static umode_t iscsi_iface_attr_is_visible(struct kobject *kobj,struct iscsi_transport *t = iface->transport;int param =-1 ; -if (attr == &dev_attr_iface_enabled.attr) - param =ISCSI_NET_PARAM_IFACE_ENABLE ; -else if (attr == &dev_attr_iface_def_taskmgmt_tmo.attr) +if (attr == &dev_attr_iface_def_taskmgmt_tmo.attr) param =ISCSI_IFACE_PARAM_DEF_TASKMGMT_TMO ;else if (attr == &dev_attr_iface_header_digest.attr) param =ISCSI_IFACE_PARAM_HDRDGST_EN ;
@@ -471,7 +469,9 @@ static umode_t iscsi_iface_attr_is_visible(struct kobject *kobj,if (param !=-1 )return t->attr_is_visible (ISCSI_IFACE_PARAM , param); -if (attr == &dev_attr_iface_vlan_id.attr) +if (attr == &dev_attr_iface_enabled.attr) + param =ISCSI_NET_PARAM_IFACE_ENABLE ; +else if (attr == &dev_attr_iface_vlan_id.attr) param =ISCSI_NET_PARAM_VLAN_ID ;else if (attr == &dev_attr_iface_vlan_priority.attr) param =ISCSI_NET_PARAM_VLAN_PRIORITY ;
drivers/spi/spi-tegra20-slink.c +2 -2
@@ -1210,7 +1210,7 @@ static int tegra_slink_resume(struct device *dev) }#endif -static int tegra_slink_runtime_suspend (struct device *dev) +static int __maybe_unused tegra_slink_runtime_suspend (struct device *dev) {struct spi_master *master =dev_get_drvdata (dev);struct tegra_slink_data *tspi =spi_master_get_devdata (master);
@@ -1222,7 +1222,7 @@ static int tegra_slink_runtime_suspend(struct device *dev)return 0 ; } -static int tegra_slink_runtime_resume (struct device *dev) +static int __maybe_unused tegra_slink_runtime_resume (struct device *dev) {struct spi_master *master =dev_get_drvdata (dev);struct tegra_slink_data *tspi =spi_master_get_devdata (master);
drivers/tty/vt/vt.c +19 -2
@@ -882,8 +882,25 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc, new_row_size = new_cols <<1 ; new_screen_size = new_row_size * new_rows; -if (new_cols == vc->vc_cols && new_rows == vc->vc_rows) -return 0 ; +if (new_cols == vc->vc_cols && new_rows == vc->vc_rows) { +/* +* This function is being called here to cover the case +* where the userspace calls the FBIOPUT_VSCREENINFO twice, +* passing the same fb_var_screeninfo containing the fields +* yres/xres equal to a number non-multiple of vc_font.height +* and yres_virtual/xres_virtual equal to number lesser than the +* vc_font.height and yres/xres. +* In the second call, the struct fb_var_screeninfo isn't +* being modified by the underlying driver because of the +* if above, and this causes the fbcon_display->vrows to become +* negative and it eventually leads to out-of-bound +* access by the imageblit function. +* To give the correct values to the struct and to not have +* to deal with possible errors from the code below, we call +* the resize_screen here as well. +*/ +return resize_screen (vc, new_cols, new_rows, user); + }if (new_screen_size > (4 <<20 ))return -EINVAL ;
drivers/usb/gadget/udc/r8a66597-udc.c +1 -1
@@ -1253,7 +1253,7 @@ static void set_feature(struct r8a66597 *r8a66597, struct usb_ctrlrequest *ctrl)do { tmp =r8a66597_read (r8a66597,INTSTS0 ) &CTSQ ;udelay (1 ); - }while (tmp !=CS_IDST || timeout-- >0 ); + }while (tmp !=CS_IDST && timeout-- >0 );if (tmp ==CS_IDST ) r8a66597_bset(r8a66597,
drivers/usb/musb/tusb6010.c +1 -0
@@ -193,6 +193,7 @@ tusb_fifo_write_unaligned(void __iomem *fifo, const u8 *buf, u16 len) }if (len >0 ) {/* Write the rest 1 - 3 bytes to FIFO */ + val =0 ;memcpy (&val, buf, len);musb_writel (fifo,0 , val); }
drivers/usb/serial/cp210x.c +1 -0
@@ -230,6 +230,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x1FB9, 0x0602) }, /* Lake Shore Model 648 Magnet Power Supply */ { USB_DEVICE(0x1FB9, 0x0700) }, /* Lake Shore Model 737 VSM Controller */ { USB_DEVICE(0x1FB9, 0x0701) }, /* Lake Shore Model 776 Hall Matrix */ + { USB_DEVICE(0x2184, 0x0030) }, /* GW Instek GDM-834x Digital Multimeter */ { USB_DEVICE(0x2626, 0xEA60) }, /* Aruba Networks 7xxx USB Serial Console */ { USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */ { USB_DEVICE(0x3195, 0xF280) }, /* Link Instruments MSO-28 */
drivers/usb/serial/mos7840.c +0 -2
@@ -126,7 +126,6 @@#define BANDB_DEVICE_ID_USOPTL4_2P 0xBC02#define BANDB_DEVICE_ID_USOPTL4_4 0xAC44#define BANDB_DEVICE_ID_USOPTL4_4P 0xBC03 -#define BANDB_DEVICE_ID_USOPTL2_4 0xAC24/* This driver also supports * ATEN UC2324 device using Moschip MCS7840
@@ -207,7 +206,6 @@ static const struct usb_device_id id_table[] = { {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2P)}, {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)}, {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4P)}, - {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL2_4)}, {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2324)}, {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2322)}, {USB_DEVICE(USB_VENDOR_ID_MOXA, MOXA_DEVICE_ID_2210)},
drivers/usb/serial/option.c +10 -1
@@ -1187,6 +1187,14 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) | RSVD(1) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff), /* Telit FD980 */ .driver_info = NCTRL(2) | RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1060, 0xff), /* Telit LN920 (rmnet) */ + .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1061, 0xff), /* Telit LN920 (MBIM) */ + .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1062, 0xff), /* Telit LN920 (RNDIS) */ + .driver_info = NCTRL(2) | RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1063, 0xff), /* Telit LN920 (ECM) */ + .driver_info = NCTRL(0) | RSVD(1) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
@@ -1632,7 +1640,6 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0060, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0094, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff), .driver_info = RSVD(1) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0133, 0xff, 0xff, 0xff),
@@ -2052,6 +2059,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, { USB_DEVICE(0x0489, 0xe0b5), /* Foxconn T77W968 ESIM */ .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, + { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0db, 0xff), /* Foxconn T99W265 MBIM */ + .driver_info = RSVD(3) }, { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */ .driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, { USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */
fs/cifs/connect.c +3 -2
@@ -2961,9 +2961,10 @@ cifs_match_super(struct super_block *sb, void *data)spin_lock (&cifs_tcp_ses_lock); cifs_sb =CIFS_SB (sb); tlink =cifs_get_tlink (cifs_sb_master_tlink (cifs_sb)); -if (IS_ERR (tlink)) { +if (tlink ==NULL ) { +/* can not match superblock if tlink were ever null */ spin_unlock (&cifs_tcp_ses_lock); -return rc; +return 0 ; } tcon =tlink_tcon (tlink); ses = tcon->ses;
fs/ext4/dir.c +3 -3
@@ -521,7 +521,7 @@ static int ext4_dx_readdir(struct file *file, struct dir_context *ctx)struct dir_private_info *info = file->private_data;struct inode *inode =file_inode (file);struct fname *fname; -int ret; +int ret =0 ;if (!info) { info =ext4_htree_create_dir_info (file, ctx->pos);
@@ -569,7 +569,7 @@ static int ext4_dx_readdir(struct file *file, struct dir_context *ctx) info->curr_minor_hash, &info->next_hash);if (ret <0 ) -return ret; + goto finished;if (ret ==0 ) { ctx->pos =ext4_get_htree_eof (file);break ;
@@ -600,7 +600,7 @@ static int ext4_dx_readdir(struct file *file, struct dir_context *ctx) } finished: info->last_pos = ctx->pos; -return 0 ; +return ret <0 ? ret :0 ; }static int ext4_dir_open (struct inode * inode,struct file * filp)
fs/qnx4/dir.c +52 -17
92 lines not on this page · raw message
include/linux/compiler.h +2 -0
@@ -208,6 +208,8 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); (typeof(ptr)) (__ptr + (off)); })#endif +#define absolute_pointer (val) RELOC_HIDE((void *)(val), 0) +#ifndef OPTIMIZER_HIDE_VAR #define OPTIMIZER_HIDE_VAR (var) barrier()#endif
include/linux/cred.h +9 -5
@@ -243,7 +243,7 @@ static inline struct cred *get_new_cred(struct cred *cred)* @cred: The credentials to reference * * Get a reference on the specified set of credentials. The caller must -* release the reference. +* release the reference. If %NULL is passed, it is returned with no action. * * This is used to deal with a committed set of credentials. Although the * pointer is const, this will temporarily discard the const and increment the
@@ -254,6 +254,8 @@ static inline struct cred *get_new_cred(struct cred *cred)static inline const struct cred *get_cred (const struct cred *cred) {struct cred *nonconst_cred = (struct cred *) cred; +if (!cred) +return cred;validate_creds (cred); nonconst_cred->non_rcu =0 ;return get_new_cred (nonconst_cred);
@@ -264,7 +266,7 @@ static inline const struct cred *get_cred(const struct cred *cred)* @cred: The credentials to release * * Release a reference to a set of credentials, deleting them when the last ref -* is released. +* is released. If %NULL is passed, nothing is done. * * This takes a const pointer to a set of credentials because the credentials * on task_struct are attached by const pointers to prevent accidental
@@ -274,9 +276,11 @@ static inline void put_cred(const struct cred *_cred) {struct cred *cred = (struct cred *) _cred; -validate_creds (cred); -if (atomic_dec_and_test (&(cred)->usage)) -__put_cred (cred); +if (cred) { +validate_creds (cred); +if (atomic_dec_and_test (&(cred)->usage)) +__put_cred (cred); + } }/**
kernel/trace/blktrace.c +8 -0
@@ -1581,6 +1581,14 @@ static int blk_trace_remove_queue(struct request_queue *q)if (bt ==NULL )return -EINVAL ; +if (bt->trace_state == Blktrace_running) { + bt->trace_state = Blktrace_stopped; +spin_lock_irq (&running_trace_lock); +list_del_init (&bt->running_list); +spin_unlock_irq (&running_trace_lock); +relay_flush (bt->rchan); + } +put_probe_ref ();synchronize_rcu ();blk_trace_free (bt);
net/mac80211/wpa.c +6 -0
@@ -519,6 +519,9 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx,return RX_DROP_UNUSABLE ; } +/* reload hdr - skb might have been reallocated */ + hdr = (void *)rx->skb->data; + data_len = skb->len - hdrlen -IEEE80211_CCMP_HDR_LEN - mic_len;if (!rx->sta || data_len <0 )return RX_DROP_UNUSABLE ;
@@ -751,6 +754,9 @@ ieee80211_crypto_gcmp_decrypt(struct ieee80211_rx_data *rx)return RX_DROP_UNUSABLE ; } +/* reload hdr - skb might have been reallocated */ + hdr = (void *)rx->skb->data; + data_len = skb->len - hdrlen -IEEE80211_GCMP_HDR_LEN - mic_len;if (!rx->sta || data_len <0 )return RX_DROP_UNUSABLE ;
net/netfilter/ipset/ip_set_hash_gen.h +2 -2
@@ -102,11 +102,11 @@ htable_size(u8 hbits) {size_t hsize; -/* We must fit both into u32 in jhash and size_t */ +/* We must fit both into u32 in jhash and INT_MAX in kvmalloc_node() */ if (hbits >31 )return 0 ; hsize =jhash_size (hbits); -if ((((size_t )-1 ) -sizeof (struct htable )) /sizeof (struct hbucket *) +if ((INT_MAX -sizeof (struct htable )) /sizeof (struct hbucket *) < hsize)return 0 ;
net/netfilter/ipvs/ip_vs_conn.c +4 -0
@@ -1368,6 +1368,10 @@ int __init ip_vs_conn_init(void)int idx;/* Compute size and mask */ +if (ip_vs_conn_tab_bits <8 || ip_vs_conn_tab_bits >20 ) { +pr_info ("conn_tab_bits not in [8, 20]. Using default value\n" ); + ip_vs_conn_tab_bits =CONFIG_IP_VS_TAB_BITS ; + } ip_vs_conn_tab_size =1 << ip_vs_conn_tab_bits; ip_vs_conn_tab_mask = ip_vs_conn_tab_size -1 ;