Linux 4.4.218
Greg KH
maintainerI'm announcing the release of the 4.4.218 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
------------
Documentation/devicetree/bindings/powerpc/fsl/fman.txt | 7 Makefile | 2 arch/arm/boot/dts/dra7.dtsi | 2 arch/arm64/kernel/smp.c | 17 +- arch/powerpc/kernel/vmlinux.lds.S | 6 arch/x86/kvm/vmx.c | 4 arch/x86/mm/fault.c | 26 +++ drivers/acpi/apei/ghes.c | 2 drivers/gpu/drm/drm_dp_mst_topology.c | 15 -- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 12 - drivers/hwspinlock/hwspinlock_core.c | 2 drivers/hwtracing/intel_th/msu.c | 6 drivers/i2c/busses/i2c-hix5hd2.c | 1 drivers/infiniband/ulp/ipoib/ipoib_fs.c | 2 drivers/media/usb/b2c2/flexcop-usb.c | 6 drivers/media/usb/dvb-usb/dib0700_core.c | 4 drivers/media/usb/gspca/ov519.c | 10 + drivers/media/usb/gspca/stv06xx/stv06xx.c | 19 ++ drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c | 4 drivers/media/usb/gspca/xirlink_cit.c | 18 ++ drivers/media/usb/usbtv/usbtv-core.c | 2 drivers/misc/altera-stapl/altera.c | 12 - drivers/net/can/slcan.c | 3 drivers/net/ethernet/micrel/ks8851_mll.c | 56 +++++++ drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 2 drivers/net/vxlan.c | 11 + drivers/nfc/fdp/fdp.c | 5 drivers/rtc/Kconfig | 1 drivers/scsi/ipr.c | 3 drivers/scsi/ipr.h | 1 drivers/scsi/sd.c | 4 drivers/spi/spi-qup.c | 5 drivers/spi/spi-zynqmp-gqspi.c | 3 drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 drivers/staging/speakup/main.c | 3 drivers/staging/wlan-ng/hfa384x_usb.c | 2 drivers/tty/vt/selection.c | 5 drivers/tty/vt/vt.c | 30 +++- drivers/tty/vt/vt_ioctl.c | 80 +++++------ drivers/usb/class/cdc-acm.c | 20 +- drivers/usb/core/quirks.c | 6 drivers/usb/host/xhci-plat.c | 1 drivers/usb/musb/musb_host.c | 17 -- drivers/usb/serial/io_edgeport.c | 2 drivers/usb/serial/option.c | 8 + drivers/usb/serial/pl2303.c | 1 drivers/usb/serial/pl2303.h | 1 drivers/vhost/net.c | 13 - fs/inode.c | 1 fs/libfs.c | 8 - include/linux/fs.h | 1 include/linux/futex.h | 17 +- include/linux/kref.h | 5 include/linux/selection.h | 4 include/linux/vmalloc.h | 5 include/linux/vt_kern.h | 2 include/uapi/linux/if.h | 4 kernel/bpf/syscall.c | 3 kernel/futex.c | 93 +++++++------ kernel/irq/manage.c | 11 + kernel/notifier.c | 2 mm/memcontrol.c | 10 + mm/nommu.c | 10 - mm/slub.c | 32 ++-- mm/vmalloc.c | 11 - net/dsa/tag_brcm.c | 2 net/hsr/hsr_framereg.c | 10 - net/hsr/hsr_netlink.c | 74 +++++----- net/hsr/hsr_slave.c | 8 - net/ipv4/Kconfig | 1 net/ipv4/ip_vti.c | 38 ++++- net/ipv4/route.c | 7 net/ipv6/ip6_vti.c | 34 +++- net/mac80211/mesh_hwmp.c | 3 net/mac80211/sta_info.c | 6 net/sched/cls_route.c | 4 net/sched/cls_tcindex.c | 1 net/xfrm/xfrm_policy.c | 2 net/xfrm/xfrm_user.c | 6 scripts/Makefile.extrawarn | 1 scripts/dtc/dtc-lexer.l | 1 scripts/dtc/dtc-lexer.lex.c_shipped | 1 sound/core/oss/pcm_plugin.c | 12 + sound/core/seq/oss/seq_oss_midi.c | 1 sound/core/seq/seq_virmidi.c | 1 sound/pci/hda/patch_realtek.c | 2 sound/usb/line6/driver.c | 2 sound/usb/line6/midibuf.c | 2 tools/perf/Makefile | 2 tools/perf/util/map.c | 2 tools/perf/util/probe-finder.c | 11 + tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c | 2 tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c | 2 tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c | 2 tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h | 2 tools/scripts/Makefile.include | 4 96 files changed, 631 insertions(+), 298 deletions(-)
Alaa Hleihel (1):
IB/ipoib: Do not warn if IPoIB debugfs doesn't exist
Alexander Shishkin (1):
intel_th: Fix user-visible error codes
Anthony Mallet (2):
USB: cdc-acm: fix close_delay and closing_wait units in TIOCSSERIAL
USB: cdc-acm: fix rounding error in TIOCSSERIAL
Chuhong Yuan (1):
i2c: hix5hd2: add missed clk_disable_unprepare in remove
Chunguang Xu (1):
memcg: fix NULL pointer dereference in __mem_cgroup_usage_unregister_event
Cong Wang (2):
net_sched: cls_route: remove the right filter from hashtable
net_sched: keep alloc_hash updated after hash allocation
Corentin Labbe (1):
rtc: max8907: add missing select REGMAP_IRQ
Cristian Marussi (1):
arm64: smp: fix smp_send_stop() behaviour
Dan Carpenter (1):
NFC: fdp: Fix a signedness bug in fdp_nci_send_patch()
Daniel Axtens (1):
altera-stapl: altera_get_note: prevent write beyond end of 'key'
Daniele Palmas (1):
USB: serial: option: add ME910G1 ECM composition 0x110b
Dirk Mueller (1):
scripts/dtc: Remove redundant YYLOC global declaration
Dominik Czarnota (1):
sxgbe: Fix off by one in samsung driver strncpy size arg
Edward Cree (1):
genirq: Fix reference leaks on irq affinity notifiers
Eric Biggers (4):
libfs: fix infoleak in simple_attr_read()
vt: vt_ioctl: remove unnecessary console allocation checks
vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
vt: vt_ioctl: fix use-after-free in vt_in_use()
Eugenio Pérez (1):
vhost: Check docket sk_family instead of call getname
Florian Fainelli (1):
net: dsa: Fix duplicate frames flooded by learning
Greg Kroah-Hartman (2):
bpf: Explicitly memset the bpf_attr structure Linux 4.4.218
Hans de Goede (1):
usb: quirks: add NO_LPM quirk for RTL8153 based ethernet adapters
Jiri Slaby (3):
vt: selection, introduce vc_is_sel
vt: ioctl, switch VT_IS_IN_USE and VT_BUSY to inlines
vt: switch vt_dont_switch to bool
Joerg Roedel (1):
x86/mm: split vmalloc_sync_all()
Johan Hovold (6):
media: flexcop-usb: fix endpoint sanity check
media: usbtv: fix control-message timeouts
media: ov519: add missing endpoint sanity checks
media: dib0700: fix rc endpoint lookup
media: stv06xx: add missing descriptor sanity checks
media: xirlink_cit: add missing descriptor sanity checks
Johannes Berg (1):
mac80211: mark station unauthorized before key removal
Jonas Gorski (1):
uapi glibc compat: fix outer guard of net device flags enum
Kai-Heng Feng (2):
USB: Disable LPM on WD19's Realtek Hub
ALSA: hda/realtek: Fix pop noise on ALC225
Kishon Vijay Abraham I (1):
ARM: dts: dra7: Add "dma-ranges" property to PCIe RC DT nodes
Larry Finger (1):
staging: rtl8188eu: Add ASUS USB-N10 Nano B1 to device table
Linus Torvalds (1):
mm: slub: be more careful about the double cmpxchg of freelist
Lyude Paul (1):
Revert "drm/dp_mst: Skip validating ports during destruction, just ref"
Madalin Bucur (1):
dt-bindings: net: FMan erratum A050385
Mans Rullgard (1):
usb: musb: fix crash with highmen PIO and usbmon
Marek Szyprowski (2):
drm/exynos: dsi: propagate error value and silence meaningless warning drm/exynos: dsi: fix workaround for the legacy clock name
Marek Vasut (1):
net: ks8851-ml: Fix IO operations, again
Martin K. Petersen (1):
scsi: sd: Fix optimal I/O size for devices that change reported values
Masami Hiramatsu (2):
perf probe: Do not depend on dwfl_module_addrsym()
tools: Let O= makes handle a relative path with -C option
Matthew Wilcox (1):
drivers/hwspinlock: use correct radix tree API
Matthias Reichl (1):
USB: cdc-acm: restore capability check order
Michael Straube (1):
staging: rtl8188eu: Add device id for MERCUSYS MW150US v2
Mike Gilbert (1):
cpupower: avoid multiple definition with gcc -fno-common
Nathan Chancellor (1):
kbuild: Disable -Wpointer-to-enum-cast
Naveen N. Rao (1):
powerpc: Include .BTF section
Nicolas Cavallari (1):
mac80211: Do not send mesh HWMP PREQ if HWMP is disabled
Nicolas Dichtel (1):
vti[6]: fix packet tx through bpf_redirect() in XinY cases
Oliver Hartkopp (1):
slcan: not call free_netdev before rtnl_unlock in slcan_open
Pawel Dembicki (3):
USB: serial: option: add support for ASKEY WWHC050
USB: serial: option: add BroadMobi BM806U
USB: serial: option: add Wistron Neweb D19Q1
Peter Zijlstra (2):
futex: Fix inode life-time issue
locking/atomic, kref: Add kref_read()
Qiujun Huang (2):
USB: serial: io_edgeport: fix slab-out-of-bounds read in edge_interrupt_callback
staging: wlan-ng: fix use-after-free Read in hfa384x_usbin_callback
Ran Wang (1):
usb: host: xhci-plat: add a shutdown
Sabrina Dubroca (1):
net: ipv4: don't let PMTU updates increase route MTU
Samuel Thibault (1):
staging/speakup: fix get_word non-space look-ahead
Scott Chen (1):
USB: serial: pl2303: add device-id for HP LD381
Sean Christopherson (1):
KVM: VMX: Do not allow reexecute_instruction() when skipping MMIO instr
Taehee Yoo (5):
hsr: fix general protection fault in hsr_addr_is_self()
vxlan: check return value of gro_cells_init()
hsr: use rcu_read_lock() in hsr_get_node_{list/status}()
hsr: add restart routine into hsr_get_node_list()
hsr: set .netnsok flag
Takashi Iwai (5):
ALSA: line6: Fix endless MIDI read loop
ALSA: seq: virmidi: Fix running status after receiving sysex
ALSA: seq: oss: Fix running status after receiving sysex
ALSA: pcm: oss: Avoid plugin buffer overflow
ALSA: pcm: oss: Remove WARNING from snd_pcm_plug_alloc() checks
Thomas Gleixner (1):
futex: Unbreak futex hashing
Thommy Jakobsson (1):
spi/zynqmp: remove entry that causes a cs glitch
Torsten Hilbrich (1):
vti6: Fix memory leak of skb if input policy check fails
Vlastimil Babka (1):
mm, slub: prevent kmalloc_node crashes and memory leaks
Wen Xiong (1):
scsi: ipr: Fix softlockup when rescanning devices in petitboot
Xin Long (2):
xfrm: fix uctx len check in verify_sec_ctx_len
xfrm: add the missing verify_sec_ctx_len check in xfrm_add_acquire
YueHaibing (1):
xfrm: policy: Fix doulbe free in xfrm_policy_timer
Yuji Sasaki (1):
spi: qup: call spi_qup_pm_resume_runtime before suspending
disconnect3d (1):
perf map: Fix off by one in strncpy() size argument
Greg KH
maintainerDocumentation/devicetree/bindings/powerpc/fsl/fman.txt +7 -0
@@ -110,6 +110,13 @@ PROPERTIES Usage: required Definition: See soc/fsl/qman.txt and soc/fsl/bman.txt +- fsl,erratum-a050385 + Usage: optional + Value type: boolean + Definition: A boolean property. Indicates the presence of the + erratum A050385 which indicates that DMA transactions that are + split can result in a FMan lock. + ============================================================================= FMan MURAM Node
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 217 +SUBLEVEL = 218 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arm/boot/dts/dra7.dtsi +2 -0
@@ -227,6 +227,7 @@ device_type = "pci"; ranges = <0x81000000 0 0 0x03000 0 0x00010000 0x82000000 0 0x20013000 0x13000 0 0xffed000>; + dma-ranges = <0x02000000 0x0 0x00000000 0x00000000 0x1 0x00000000>; bus-range = <0x00 0xff>; #interrupt-cells = <1>; num-lanes = <1>;
@@ -263,6 +264,7 @@ device_type = "pci"; ranges = <0x81000000 0 0 0x03000 0 0x00010000 0x82000000 0 0x30013000 0x13000 0 0xffed000>; + dma-ranges = <0x02000000 0x0 0x00000000 0x00000000 0x1 0x00000000>; bus-range = <0x00 0xff>; #interrupt-cells = <1>; num-lanes = <1>;
arch/arm64/kernel/smp.c +14 -3
@@ -769,11 +769,22 @@ void tick_broadcast(const struct cpumask *mask) }#endif +/* +* The number of CPUs online, not counting this CPU (which may not be +* fully online and so not counted in num_online_cpus()). +*/ +static inline unsigned int num_other_online_cpus (void ) +{ +unsigned int this_cpu_online =cpu_online (smp_processor_id ()); + +return num_online_cpus () - this_cpu_online; +} +void smp_send_stop (void ) {unsigned long timeout; -if (num_online_cpus () >1 ) { +if (num_other_online_cpus ()) {cpumask_t mask;cpumask_copy (&mask, cpu_online_mask);
@@ -784,10 +795,10 @@ void smp_send_stop(void)/* Wait up to one second for other CPUs to stop */ timeout =USEC_PER_SEC ; -while (num_online_cpus () >1 && timeout--) +while (num_other_online_cpus () && timeout--)udelay (1 ); -if (num_online_cpus () >1 ) +if (num_other_online_cpus ())pr_warning ("SMP: failed to stop secondary CPUs\n" ); }
arch/powerpc/kernel/vmlinux.lds.S +6 -0
@@ -255,6 +255,12 @@ SECTIONS *(.branch_lt) } +#ifdef CONFIG_DEBUG_INFO_BTF + .BTF : AT(ADDR(.BTF) - LOAD_OFFSET) { + *(.BTF) + } +#endif + .opd : AT(ADDR(.opd) - LOAD_OFFSET) { *(.opd) }
arch/x86/kvm/vmx.c +2 -2
@@ -6187,8 +6187,8 @@ static int handle_ept_misconfig(struct kvm_vcpu *vcpu)return 1 ; }else -return x86_emulate_instruction (vcpu, gpa,EMULTYPE_SKIP , -NULL ,0 ) ==EMULATE_DONE ; +return emulate_instruction (vcpu,EMULTYPE_SKIP ) == +EMULATE_DONE ; } ret =handle_mmio_page_fault (vcpu, gpa, true);
arch/x86/mm/fault.c +24 -2
@@ -228,7 +228,7 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)return pmd_k; } -void vmalloc_sync_all (void ) +static void vmalloc_sync (void ) {unsigned long address;
@@ -255,6 +255,16 @@ void vmalloc_sync_all(void) } } +void vmalloc_sync_mappings (void ) +{ +vmalloc_sync (); +} + +void vmalloc_sync_unmappings (void ) +{ +vmalloc_sync (); +} +/* * 32-bit: *
@@ -349,11 +359,23 @@ out:#else /* CONFIG_X86_64: */ -void vmalloc_sync_all (void ) +void vmalloc_sync_mappings (void ) { +/* +* 64-bit mappings might allocate new p4d/pud pages +* that need to be propagated to all tasks' PGDs. +*/ sync_global_pgds (VMALLOC_START &PGDIR_MASK ,VMALLOC_END ,0 ); } +void vmalloc_sync_unmappings (void ) +{ +/* +* Unmappings never allocate or free p4d/pud pages. +* No work is required here. +*/ +} +/* * 64-bit: *
drivers/acpi/apei/ghes.c +1 -1
@@ -229,7 +229,7 @@ static int ghes_estatus_pool_expand(unsigned long len)* New allocation must be visible in all pgd before it can be found by * an NMI allocating from the pool. */ -vmalloc_sync_all (); +vmalloc_sync_mappings ();return gen_pool_add (ghes_estatus_pool, addr,PAGE_ALIGN (len),-1 ); }
drivers/gpu/drm/drm_dp_mst_topology.c +2 -13
@@ -975,20 +975,9 @@ static struct drm_dp_mst_port *drm_dp_mst_get_port_ref_locked(struct drm_dp_mst_static struct drm_dp_mst_port *drm_dp_get_validated_port_ref (struct drm_dp_mst_topology_mgr *mgr,struct drm_dp_mst_port *port) {struct drm_dp_mst_port *rport =NULL ; -mutex_lock (&mgr->lock); -/* -* Port may or may not be 'valid' but we don't care about that when -* destroying the port and we are guaranteed that the port pointer -* will be valid until we've finished -*/ -if (current_work () == &mgr->destroy_connector_work) { -kref_get (&port->kref); - rport = port; - }else if (mgr->mst_primary) { - rport =drm_dp_mst_get_port_ref_locked (mgr->mst_primary, - port); - } +if (mgr->mst_primary) + rport =drm_dp_mst_get_port_ref_locked (mgr->mst_primary, port);mutex_unlock (&mgr->lock);return rport; }
drivers/gpu/drm/exynos/exynos_drm_dsi.c +7 -5
@@ -1899,8 +1899,9 @@ static int exynos_dsi_probe(struct platform_device *pdev) ret =devm_regulator_bulk_get (dev,ARRAY_SIZE (dsi->supplies), dsi->supplies);if (ret) { -dev_info (dev,"failed to get regulators: %d\n" , ret); -return -EPROBE_DEFER ; +if (ret != -EPROBE_DEFER ) +dev_info (dev,"failed to get regulators: %d\n" , ret); +return ret; } dsi->clks = devm_kzalloc(dev,
@@ -1913,9 +1914,10 @@ static int exynos_dsi_probe(struct platform_device *pdev) dsi->clks[i] =devm_clk_get (dev, clk_names[i]);if (IS_ERR (dsi->clks[i])) {if (strcmp (clk_names[i],"sclk_mipi" ) ==0 ) { -strcpy (clk_names[i],OLD_SCLK_MIPI_CLK_NAME ); - i--; -continue ; + dsi->clks[i] =devm_clk_get (dev, +OLD_SCLK_MIPI_CLK_NAME ); +if (!IS_ERR (dsi->clks[i])) +continue ; } dev_info(dev, "failed to get the clock: %s\n",
drivers/hwspinlock/hwspinlock_core.c +1 -1
@@ -313,7 +313,7 @@ int of_hwspin_lock_get_id(struct device_node *np, int index) hwlock =radix_tree_deref_slot (slot);if (unlikely (!hwlock))continue ; -if (radix_tree_is_indirect_ptr (hwlock)) { +if (radix_tree_deref_retry (hwlock)) { slot =radix_tree_iter_retry (&iter);continue ; }
drivers/hwtracing/intel_th/msu.c +3 -3
@@ -483,7 +483,7 @@ static int msc_configure(struct msc *msc)u32 reg;if (msc->mode >MSC_MODE_MULTI ) -return -ENOTSUPP ; +return -EINVAL ;if (msc->mode ==MSC_MODE_MULTI )msc_buffer_clear_hw_header (msc);
@@ -935,7 +935,7 @@ static int msc_buffer_alloc(struct msc *msc, unsigned long *nr_pages, }else if (msc->mode ==MSC_MODE_MULTI ) { ret =msc_buffer_multi_alloc (msc, nr_pages, nr_wins); }else { - ret = -ENOTSUPP ; + ret = -EINVAL ; }if (!ret) {
@@ -1164,7 +1164,7 @@ static ssize_t intel_th_msc_read(struct file *file, char __user *buf,if (ret >=0 ) *ppos = iter->offset; }else { - ret = -ENOTSUPP ; + ret = -EINVAL ; } put_count:
drivers/i2c/busses/i2c-hix5hd2.c +1 -0
@@ -500,6 +500,7 @@ static int hix5hd2_i2c_remove(struct platform_device *pdev)i2c_del_adapter (&priv->adap);pm_runtime_disable (priv->dev);pm_runtime_set_suspended (priv->dev); +clk_disable_unprepare (priv->clk);return 0 ; }
drivers/infiniband/ulp/ipoib/ipoib_fs.c +0 -2
@@ -281,8 +281,6 @@ void ipoib_delete_debug_files(struct net_device *dev) {struct ipoib_dev_priv *priv =netdev_priv (dev); -WARN_ONCE (!priv->mcg_dentry,"null mcg debug file\n" ); -WARN_ONCE (!priv->path_dentry,"null path debug file\n" );debugfs_remove (priv->mcg_dentry);debugfs_remove (priv->path_dentry); priv->mcg_dentry = priv->path_dentry =NULL ;
drivers/media/usb/b2c2/flexcop-usb.c +3 -3
@@ -481,6 +481,9 @@ static int flexcop_usb_init(struct flexcop_usb *fc_usb)return ret; } +if (fc_usb->uintf->cur_altsetting->desc.bNumEndpoints <1 ) +return -ENODEV ; +switch (fc_usb->udev->speed) {case USB_SPEED_LOW :err ("cannot handle USB speed because it is too slow." );
@@ -514,9 +517,6 @@ static int flexcop_usb_probe(struct usb_interface *intf,struct flexcop_device *fc =NULL ;int ret; -if (intf->cur_altsetting->desc.bNumEndpoints <1 ) -return -ENODEV ; -if ((fc =flexcop_device_kmalloc (sizeof (struct flexcop_usb ))) ==NULL ) {err ("out of memory\n" );return -ENOMEM ;
drivers/media/usb/dvb-usb/dib0700_core.c +2 -2
@@ -783,7 +783,7 @@ int dib0700_rc_setup(struct dvb_usb_device *d, struct usb_interface *intf)/* Starting in firmware 1.20, the RC info is provided on a bulk pipe */ -if (intf->altsetting[0 ].desc.bNumEndpoints < rc_ep +1 ) +if (intf->cur_altsetting->desc.bNumEndpoints < rc_ep +1 )return -ENODEV ; purb =usb_alloc_urb (0 ,GFP_KERNEL );
@@ -805,7 +805,7 @@ int dib0700_rc_setup(struct dvb_usb_device *d, struct usb_interface *intf)* Some devices like the Hauppauge NovaTD model 52009 use an interrupt * endpoint, while others use a bulk one. */ - e = &intf->altsetting[0 ].endpoint[rc_ep].desc; + e = &intf->cur_altsetting->endpoint[rc_ep].desc;if (usb_endpoint_dir_in (e)) {if (usb_endpoint_xfer_bulk (e)) { pipe =usb_rcvbulkpipe (d->udev, rc_ep);
drivers/media/usb/gspca/ov519.c +10 -0
@@ -3507,6 +3507,11 @@ static void ov511_mode_init_regs(struct sd *sd)return ; } +if (alt->desc.bNumEndpoints <1 ) { + sd->gspca_dev.usb_err = -ENODEV ; +return ; + } + packet_size =le16_to_cpu (alt->endpoint[0 ].desc.wMaxPacketSize);reg_w (sd, R51x_FIFO_PSIZE, packet_size >>5 );
@@ -3632,6 +3637,11 @@ static void ov518_mode_init_regs(struct sd *sd)return ; } +if (alt->desc.bNumEndpoints <1 ) { + sd->gspca_dev.usb_err = -ENODEV ; +return ; + } + packet_size =le16_to_cpu (alt->endpoint[0 ].desc.wMaxPacketSize);ov518_reg_w32 (sd, R51x_FIFO_PSIZE, packet_size & ~7 ,2 );
drivers/media/usb/gspca/stv06xx/stv06xx.c +18 -1
@@ -293,6 +293,9 @@ static int stv06xx_start(struct gspca_dev *gspca_dev)return -EIO ; } +if (alt->desc.bNumEndpoints <1 ) +return -ENODEV ; + packet_size =le16_to_cpu (alt->endpoint[0 ].desc.wMaxPacketSize); err =stv06xx_write_bridge (sd,STV_ISO_SIZE_L , packet_size);if (err <0 )
@@ -317,11 +320,21 @@ out:static int stv06xx_isoc_init (struct gspca_dev *gspca_dev) { +struct usb_interface_cache *intfc;struct usb_host_interface *alt;struct sd *sd = (struct sd *) gspca_dev; + intfc = gspca_dev->dev->actconfig->intf_cache[0 ]; + +if (intfc->num_altsetting <2 ) +return -ENODEV ; + + alt = &intfc->altsetting[1 ]; + +if (alt->desc.bNumEndpoints <1 ) +return -ENODEV ; +/* Start isoc bandwidth "negotiation" at max isoc bandwidth */ - alt = &gspca_dev->dev->actconfig->intf_cache[0 ]->altsetting[1 ]; alt->endpoint[0 ].desc.wMaxPacketSize =cpu_to_le16 (sd->sensor->max_packet_size[gspca_dev->curr_mode]);
@@ -334,6 +347,10 @@ static int stv06xx_isoc_nego(struct gspca_dev *gspca_dev)struct usb_host_interface *alt;struct sd *sd = (struct sd *) gspca_dev; +/* +* Existence of altsetting and endpoint was verified in +* stv06xx_isoc_init() +*/ alt = &gspca_dev->dev->actconfig->intf_cache[0 ]->altsetting[1 ]; packet_size =le16_to_cpu (alt->endpoint[0 ].desc.wMaxPacketSize); min_packet_size = sd->sensor->min_packet_size[gspca_dev->curr_mode];
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c +4 -0
@@ -198,6 +198,10 @@ static int pb0100_start(struct sd *sd) alt =usb_altnum_to_altsetting (intf, sd->gspca_dev.alt);if (!alt)return -ENODEV ; + +if (alt->desc.bNumEndpoints <1 ) +return -ENODEV ; + packet_size =le16_to_cpu (alt->endpoint[0 ].desc.wMaxPacketSize);/* If we don't have enough bandwidth use a lower framerate */
drivers/media/usb/gspca/xirlink_cit.c +17 -1
@@ -1455,6 +1455,9 @@ static int cit_get_packet_size(struct gspca_dev *gspca_dev)return -EIO ; } +if (alt->desc.bNumEndpoints <1 ) +return -ENODEV ; +return le16_to_cpu (alt->endpoint[0 ].desc.wMaxPacketSize); }
@@ -2638,6 +2641,7 @@ static int sd_start(struct gspca_dev *gspca_dev)static int sd_isoc_init (struct gspca_dev *gspca_dev) { +struct usb_interface_cache *intfc;struct usb_host_interface *alt;int max_packet_size;
@@ -2653,8 +2657,17 @@ static int sd_isoc_init(struct gspca_dev *gspca_dev)break ; } + intfc = gspca_dev->dev->actconfig->intf_cache[0 ]; + +if (intfc->num_altsetting <2 ) +return -ENODEV ; + + alt = &intfc->altsetting[1 ]; + +if (alt->desc.bNumEndpoints <1 ) +return -ENODEV ; +/* Start isoc bandwidth "negotiation" at max isoc bandwidth */ - alt = &gspca_dev->dev->actconfig->intf_cache[0 ]->altsetting[1 ]; alt->endpoint[0 ].desc.wMaxPacketSize =cpu_to_le16 (max_packet_size);return 0 ;
@@ -2677,6 +2690,9 @@ static int sd_isoc_nego(struct gspca_dev *gspca_dev)break ; } +/* +* Existence of altsetting and endpoint was verified in sd_isoc_init() +*/ alt = &gspca_dev->dev->actconfig->intf_cache[0 ]->altsetting[1 ]; packet_size =le16_to_cpu (alt->endpoint[0 ].desc.wMaxPacketSize);if (packet_size <= min_packet_size)
drivers/media/usb/usbtv/usbtv-core.c +1 -1
@@ -42,7 +42,7 @@ int usbtv_set_regs(struct usbtv *usbtv, const u16 regs[][2], int size) ret =usb_control_msg (usbtv->udev, pipe,USBTV_REQUEST_REG ,USB_DIR_OUT |USB_TYPE_VENDOR |USB_RECIP_DEVICE , - value, index,NULL ,0 ,0 ); + value, index,NULL ,0 ,USB_CTRL_GET_TIMEOUT );if (ret <0 )return ret; }
drivers/misc/altera-stapl/altera.c +6 -6
@@ -2126,8 +2126,8 @@ exit_done:return status; } -static int altera_get_note (u8 *p,s32 program_size, -s32 *offset,char *key,char *value,int length) +static int altera_get_note (u8 *p,s32 program_size,s32 *offset, +char *key,char *value,int keylen,int vallen)/* * Gets key and value of NOTE fields in the JBC file. * Can be called in two modes: if offset pointer is NULL,
@@ -2184,7 +2184,7 @@ static int altera_get_note(u8 *p, s32 program_size, &p[note_table + (8 * i) + 4])];if (value !=NULL ) -strlcpy (value, value_ptr, length); +strlcpy (value, value_ptr, vallen); } }
@@ -2203,13 +2203,13 @@ static int altera_get_note(u8 *p, s32 program_size,strlcpy (key, &p[note_strings +get_unaligned_be32 ( &p[note_table + (8 * i)])], - length); + keylen);if (value !=NULL )strlcpy (value, &p[note_strings +get_unaligned_be32 ( &p[note_table + (8 * i) +4 ])], - length); + vallen); *offset = i +1 ; }
@@ -2463,7 +2463,7 @@ int altera_init(struct altera_config *config, const struct firmware *fw) __func__, (format_version ==2 ) ?"Jam STAPL" : "pre-standardized Jam 1.1");while (altera_get_note ((u8 *)fw->data, fw->size, - &offset, key, value,256 ) ==0 ) + &offset, key, value,32 ,256 ) ==0 )printk (KERN_INFO "%s: NOTE \"%s\" = \"%s\"\n" , __func__, key, value); }
drivers/net/can/slcan.c +3 -0
@@ -621,7 +621,10 @@ err_free_chan: tty->disc_data =NULL ;clear_bit (SLF_INUSE , &sl->flags);slc_free_netdev (sl->dev); +/* do not call free_netdev before rtnl_unlock */ +rtnl_unlock ();free_netdev (sl->dev); +return err; err_exit:rtnl_unlock ();
drivers/net/ethernet/micrel/ks8851_mll.c +52 -4
92 lines not on this page · raw message
drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c +1 -1
@@ -2315,7 +2315,7 @@ static int __init sxgbe_cmdline_opt(char *str)if (!str || !*str)return -EINVAL ;while ((opt =strsep (&str,"," )) !=NULL ) { -if (!strncmp (opt,"eee_timer:" ,6 )) { +if (!strncmp (opt,"eee_timer:" ,10 )) {if (kstrtoint (opt +10 ,0 , &eee_timer)) goto err; }
drivers/net/vxlan.c +9 -2
@@ -2303,10 +2303,19 @@ static void vxlan_vs_add_dev(struct vxlan_sock *vs, struct vxlan_dev *vxlan)/* Setup stats when device is created */ static int vxlan_init (struct net_device *dev) { +struct vxlan_dev *vxlan =netdev_priv (dev); +int err; + dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);if (!dev->tstats)return -ENOMEM ; + err =gro_cells_init (&vxlan->gro_cells, dev); +if (err) { +free_percpu (dev->tstats); +return err; + } +return 0 ; }
@@ -2584,8 +2593,6 @@ static void vxlan_setup(struct net_device *dev) vxlan->dev = dev; -gro_cells_init (&vxlan->gro_cells, dev); -for (h =0 ; h <FDB_HASH_SIZE ; ++h)INIT_HLIST_HEAD (&vxlan->fdb_head[h]); }
drivers/nfc/fdp/fdp.c +2 -3
@@ -191,7 +191,7 @@ static int fdp_nci_send_patch(struct nci_dev *ndev, u8 conn_id, u8 type)const struct firmware *fw;struct sk_buff *skb;unsigned long len; -u8 max_size, payload_size; +int max_size, payload_size;int rc =0 ; if ((type == NCI_PATCH_TYPE_OTP && !info->otp_patch) ||
@@ -214,8 +214,7 @@ static int fdp_nci_send_patch(struct nci_dev *ndev, u8 conn_id, u8 type)while (len) { - payload_size = min_t(unsigned long, (unsigned long) max_size, - len); + payload_size = min_t(unsigned long, max_size, len); skb =nci_skb_alloc (ndev, (NCI_CTRL_HDR_SIZE + payload_size),GFP_KERNEL );
drivers/rtc/Kconfig +1 -0
@@ -278,6 +278,7 @@ config RTC_DRV_MAX6900 config RTC_DRV_MAX8907 tristate "Maxim MAX8907" depends on MFD_MAX8907 + select REGMAP_IRQ help If you say yes here you will get support for the RTC of Maxim MAX8907 PMIC.
drivers/scsi/ipr.c +2 -1
@@ -9730,6 +9730,7 @@ static void ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg, ioa_cfg->max_devs_supported = ipr_max_devs;if (ioa_cfg->sis64) { + host->max_channel =IPR_MAX_SIS64_BUSES ; host->max_id =IPR_MAX_SIS64_TARGETS_PER_BUS ; host->max_lun =IPR_MAX_SIS64_LUNS_PER_TARGET ;if (ipr_max_devs >IPR_MAX_SIS64_DEVS )
@@ -9738,6 +9739,7 @@ static void ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg, + ((sizeof (struct ipr_config_table_entry64 ) * ioa_cfg->max_devs_supported))); }else { + host->max_channel =IPR_VSET_BUS ; host->max_id =IPR_MAX_NUM_TARGETS_PER_BUS ; host->max_lun =IPR_MAX_NUM_LUNS_PER_TARGET ;if (ipr_max_devs >IPR_MAX_PHYSICAL_DEVS )
@@ -9747,7 +9749,6 @@ static void ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg, * ioa_cfg->max_devs_supported))); } - host->max_channel =IPR_VSET_BUS ; host->unique_id = host->host_no; host->max_cmd_len =IPR_MAX_CDB_LEN ; host->can_queue = ioa_cfg->max_cmds;
drivers/scsi/ipr.h +1 -0
@@ -1301,6 +1301,7 @@ struct ipr_resource_entry {#define IPR_ARRAY_VIRTUAL_BUS 0x1#define IPR_VSET_VIRTUAL_BUS 0x2#define IPR_IOAFP_VIRTUAL_BUS 0x3 +#define IPR_MAX_SIS64_BUSES 0x4#define IPR_GET_RES_PHYS_LOC (res) \ (((res)->bus << 24) | ((res)->target << 8) | (res)->lun)
drivers/scsi/sd.c +3 -1
@@ -2915,9 +2915,11 @@ static int sd_revalidate_disk(struct gendisk *disk) logical_to_bytes(sdp, sdkp->opt_xfer_blocks) >= PAGE_CACHE_SIZE) { q->limits.io_opt = logical_to_bytes(sdp, sdkp->opt_xfer_blocks); rw_max = logical_to_sectors(sdp, sdkp->opt_xfer_blocks); - } else + } else { + q->limits.io_opt =0 ; rw_max =min_not_zero (logical_to_sectors (sdp, dev_max), (sector_t )BLK_DEF_MAX_SECTORS ); + }/* Do not exceed controller limit */ rw_max =min (rw_max,queue_max_hw_sectors (q));
drivers/spi/spi-qup.c +5 -0
@@ -961,6 +961,11 @@ static int spi_qup_suspend(struct device *device)struct spi_qup *controller =spi_master_get_devdata (master);int ret; +if (pm_runtime_suspended (device)) { + ret =spi_qup_pm_resume_runtime (device); +if (ret) +return ret; + } ret =spi_master_suspend (master);if (ret)return ret;
drivers/spi/spi-zynqmp-gqspi.c +0 -3
@@ -414,9 +414,6 @@ static void zynqmp_qspi_chipselect(struct spi_device *qspi, bool is_high)zynqmp_gqspi_write (xqspi,GQSPI_GEN_FIFO_OFST , genfifoentry); -/* Dummy generic FIFO entry */ -zynqmp_gqspi_write (xqspi,GQSPI_GEN_FIFO_OFST ,0x0 ); -/* Manually start the generic FIFO command */ zynqmp_gqspi_write(xqspi, GQSPI_CONFIG_OFST, zynqmp_gqspi_read(xqspi, GQSPI_CONFIG_OFST) |
drivers/staging/rtl8188eu/os_dep/usb_intf.c +2 -0
@@ -44,12 +44,14 @@ static struct usb_device_id rtw_usb_id_tbl[] = {/****** 8188EUS ********/ {USB_DEVICE(0x056e, 0x4008)}, /* Elecom WDC-150SU2M */ {USB_DEVICE(0x07b8, 0x8179)}, /* Abocom - Abocom */ + {USB_DEVICE(0x0B05, 0x18F0)}, /* ASUS USB-N10 Nano B1 */ {USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */ {USB_DEVICE(0x2001, 0x3310)}, /* Dlink DWA-123 REV D1 */ {USB_DEVICE(0x2001, 0x3311)}, /* DLink GO-USB-N150 REV B1 */ {USB_DEVICE(0x2001, 0x331B)}, /* D-Link DWA-121 rev B1 */ {USB_DEVICE(0x2357, 0x010c)}, /* TP-Link TL-WN722N v2 */ {USB_DEVICE(0x2357, 0x0111)}, /* TP-Link TL-WN727N v5.21 */ + {USB_DEVICE(0x2C4E, 0x0102)}, /* MERCUSYS MW150US v2 */ {USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0xffef)}, /* Rosewill RNX-N150NUB */ {} /* Terminating entry */
drivers/staging/speakup/main.c +1 -2
@@ -562,8 +562,7 @@ static u_long get_word(struct vc_data *vc)return 0 ; }else if ((tmpx < vc->vc_cols -2 ) && (ch ==SPACE || ch ==0 ||IS_WDLM (ch)) - && ((char )get_char (vc, (u_short *) &tmp_pos +1 , &temp) > -SPACE )) { + && ((char )get_char (vc, (u_short *)tmp_pos +1 , &temp) >SPACE )) { tmp_pos +=2 ; tmpx++; }else
drivers/staging/wlan-ng/hfa384x_usb.c +2 -0
@@ -3574,6 +3574,8 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev, WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN)) {pr_debug ("overlen frm: len=%zd\n" , skblen -sizeof (struct p80211_caphdr )); + +return ; } skb =dev_alloc_skb (skblen);
drivers/tty/vt/selection.c +5 -0
@@ -80,6 +80,11 @@ void clear_selection(void) } } +bool vc_is_sel (struct vc_data *vc) +{ +return vc == sel_cons; +} +/* * User settable table: what characters are to be considered alphabetic? * 256 bits. Locked by the console lock.
drivers/tty/vt/vt.c +26 -4
@@ -600,8 +600,9 @@ static void hide_softcursor(struct vc_data *vc)static void hide_cursor (struct vc_data *vc) { -if (vc == sel_cons) +if (vc_is_sel (vc))clear_selection (); + vc->vc_sw->con_cursor (vc,CM_ERASE );hide_softcursor (vc); }
@@ -612,7 +613,7 @@ static void set_cursor(struct vc_data *vc) vc->vc_mode == KD_GRAPHICS)return ;if (vc->vc_deccm) { -if (vc == sel_cons) +if (vc_is_sel (vc))clear_selection ();add_softcursor (vc);if ((vc->vc_cursor_type &0x0f ) !=1 )
@@ -759,6 +760,17 @@ static void visual_init(struct vc_data *vc, int num, int init) vc->vc_screenbuf_size = vc->vc_rows * vc->vc_size_row; } +static void vc_port_destruct (struct tty_port *port) +{ + struct vc_data *vc = container_of(port, struct vc_data, port); + +kfree (vc); +} + +static const struct tty_port_operations vc_port_ops = { + .destruct = vc_port_destruct, +}; +int vc_allocate (unsigned int currcons)/* return 0 on success */ {WARN_CONSOLE_UNLOCKED ();
@@ -784,6 +796,7 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */return -ENOMEM ; vc_cons[currcons].d = vc;tty_port_init (&vc->port); + vc->port.ops = &vc_port_ops;INIT_WORK (&vc_cons[currcons].SAK_work, vc_SAK);visual_init (vc, currcons,1 );if (!*vc->vc_uni_pagedir_loc)
@@ -878,7 +891,7 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,if (!newscreen)return -ENOMEM ; -if (vc == sel_cons) +if (vc_is_sel (vc))clear_selection (); old_rows = vc->vc_rows;
@@ -2893,6 +2906,7 @@ static int con_install(struct tty_driver *driver, struct tty_struct *tty) tty->driver_data = vc; vc->port.tty = tty; +tty_port_get (&vc->port);if (!tty->winsize.ws_row && !tty->winsize.ws_col) { tty->winsize.ws_row = vc_cons[currcons].d->vc_rows;
@@ -2928,6 +2942,13 @@ static void con_shutdown(struct tty_struct *tty)console_unlock (); } +static void con_cleanup (struct tty_struct *tty) +{ +struct vc_data *vc = tty->driver_data; + +tty_port_put (&vc->port); +} +static int default_color =7 ;/* white */ static int default_italic_color =2 ;// green (ASCII) static int default_underline_color =3 ;// cyan (ASCII)
@@ -3052,7 +3073,8 @@ static const struct tty_operations con_ops = { .throttle = con_throttle, .unthrottle = con_unthrottle, .resize = vt_resize, - .shutdown = con_shutdown + .shutdown = con_shutdown, + .cleanup = con_cleanup, };static struct cdev vc0_cdev;
drivers/tty/vt/vt_ioctl.c +41 -39
169 lines not on this page · raw message
drivers/usb/class/cdc-acm.c +14 -6
@@ -841,10 +841,10 @@ static int get_serial_info(struct acm *acm, struct serial_struct __user *info) tmp.flags =ASYNC_LOW_LATENCY ; tmp.xmit_fifo_size = acm->writesize; tmp.baud_base =le32_to_cpu (acm->line.dwDTERate); - tmp.close_delay = acm->port.close_delay /10 ; + tmp.close_delay =jiffies_to_msecs (acm->port.close_delay) /10 ; tmp.closing_wait = acm->port.closing_wait ==ASYNC_CLOSING_WAIT_NONE ?ASYNC_CLOSING_WAIT_NONE : - acm->port.closing_wait /10 ; +jiffies_to_msecs (acm->port.closing_wait) /10 ;if (copy_to_user (info, &tmp,sizeof (tmp)))return -EFAULT ;
@@ -857,20 +857,28 @@ static int set_serial_info(struct acm *acm, {struct serial_struct new_serial;unsigned int closing_wait, close_delay; +unsigned int old_closing_wait, old_close_delay;int retval =0 ;if (copy_from_user (&new_serial, newinfo,sizeof (new_serial)))return -EFAULT ; - close_delay = new_serial.close_delay *10 ; + close_delay =msecs_to_jiffies (new_serial.close_delay *10 ); closing_wait = new_serial.closing_wait ==ASYNC_CLOSING_WAIT_NONE ? -ASYNC_CLOSING_WAIT_NONE : new_serial.closing_wait *10 ; +ASYNC_CLOSING_WAIT_NONE : +msecs_to_jiffies (new_serial.closing_wait *10 ); + +/* we must redo the rounding here, so that the values match */ + old_close_delay =jiffies_to_msecs (acm->port.close_delay) /10 ; + old_closing_wait = acm->port.closing_wait ==ASYNC_CLOSING_WAIT_NONE ? +ASYNC_CLOSING_WAIT_NONE : +jiffies_to_msecs (acm->port.closing_wait) /10 ;mutex_lock (&acm->port.mutex);if (!capable (CAP_SYS_ADMIN )) { -if ((close_delay != acm->port.close_delay) || - (closing_wait != acm->port.closing_wait)) +if ((new_serial.close_delay != old_close_delay) || + (new_serial.closing_wait != old_closing_wait)) retval = -EPERM ;else retval = -EOPNOTSUPP ;
drivers/usb/core/quirks.c +6 -0
@@ -229,6 +229,12 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x0b05, 0x17e0), .driver_info = USB_QUIRK_IGNORE_REMOTE_WAKEUP }, + /* Realtek hub in Dell WD19 (Type-C) */ + { USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM }, + + /* Generic RTL8153 based ethernet adapters */ + { USB_DEVICE(0x0bda, 0x8153), .driver_info = USB_QUIRK_NO_LPM }, + /* Action Semiconductor flash disk */ { USB_DEVICE(0x10d6, 0x2200), .driver_info = USB_QUIRK_STRING_FETCH_255 },
drivers/usb/host/xhci-plat.c +1 -0
@@ -284,6 +284,7 @@ MODULE_DEVICE_TABLE(acpi, usb_xhci_acpi_match);static struct platform_driver usb_xhci_driver = { .probe = xhci_plat_probe, .remove = xhci_plat_remove, + .shutdown = usb_hcd_platform_shutdown, .driver = { .name ="xhci-hcd" , .pm =DEV_PM_OPS ,
drivers/usb/musb/musb_host.c +5 -12
@@ -1519,10 +1519,7 @@ done:* We need to map sg if the transfer_buffer is * NULL. */ -if (!urb->transfer_buffer) - qh->use_sg = true; - -if (qh->use_sg) { +if (!urb->transfer_buffer) {/* sg_miter_start is already done in musb_ep_program */ if (!sg_miter_next (&qh->sg_miter)) {dev_err (musb->controller,"error: sg list empty\n" );
@@ -1530,9 +1527,8 @@ done: status = -EINVAL ; goto done; } - urb->transfer_buffer = qh->sg_miter.addr; length =min_t (u32, length, qh->sg_miter.length); -musb_write_fifo (hw_ep, length, urb->transfer_buffer); +musb_write_fifo (hw_ep, length, qh->sg_miter.addr); qh->sg_miter.consumed = length;sg_miter_stop (&qh->sg_miter); }else {
@@ -1541,11 +1537,6 @@ done: qh->segsize = length; -if (qh->use_sg) { -if (offset + length >= urb->transfer_buffer_length) - qh->use_sg = false; - } -musb_ep_select (mbase, epnum);musb_writew (epio,MUSB_TXCSR ,MUSB_TXCSR_H_WZC_BITS |MUSB_TXCSR_TXPKTRDY );
@@ -2064,8 +2055,10 @@ finish: urb->actual_length += xfer_len; qh->offset += xfer_len;if (done) { -if (qh->use_sg) +if (qh->use_sg) { qh->use_sg = false; + urb->transfer_buffer =NULL ; + }if (urb->status == -EINPROGRESS ) urb->status = status;
drivers/usb/serial/io_edgeport.c +1 -1
@@ -634,7 +634,7 @@ static void edge_interrupt_callback(struct urb *urb)/* grab the txcredits for the ports if available */ position =2 ; portNumber =0 ; -while ((position < length) && +while ((position < length -1 ) && (portNumber < edge_serial->serial->num_ports)) { txCredits = data[position] | (data[position+1 ] <<8 );if (txCredits) {
drivers/usb/serial/option.c +8 -0
@@ -1172,6 +1172,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x110a, 0xff), /* Telit ME910G1 */ .driver_info = NCTRL(0) | RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x110b, 0xff), /* Telit ME910G1 (ECM) */ + .driver_info = NCTRL(0) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910), .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910_USBCFG4),
@@ -1981,8 +1983,14 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */ { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x7e11, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/A3 */ + { USB_DEVICE_INTERFACE_CLASS(0x1435, 0xd191, 0xff), /* Wistron Neweb D19Q1 */ + .driver_info = RSVD(1) | RSVD(4) }, + { USB_DEVICE_INTERFACE_CLASS(0x1690, 0x7588, 0xff), /* ASKEY WWHC050 */ + .driver_info = RSVD(1) | RSVD(4) }, { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x2031, 0xff), /* Olicard 600 */ .driver_info = RSVD(4) }, + { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x2033, 0xff), /* BroadMobi BM806U */ + .driver_info = RSVD(4) }, { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x2060, 0xff), /* BroadMobi BM818 */ .driver_info = RSVD(4) }, { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x4000, 0xff) }, /* OLICARD300 - MT6225 */
drivers/usb/serial/pl2303.c +1 -0
@@ -88,6 +88,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD220TA_PRODUCT_ID) }, + { USB_DEVICE(HP_VENDOR_ID, HP_LD381_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD960_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD960TA_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LCM220_PRODUCT_ID) },
drivers/usb/serial/pl2303.h +1 -0
@@ -128,6 +128,7 @@#define HP_LM920_PRODUCT_ID 0x026b#define HP_TD620_PRODUCT_ID 0x0956#define HP_LD960_PRODUCT_ID 0x0b39 +#define HP_LD381_PRODUCT_ID 0x0f7f#define HP_LCM220_PRODUCT_ID 0x3139#define HP_LCM960_PRODUCT_ID 0x3239#define HP_LD220_PRODUCT_ID 0x3524
drivers/vhost/net.c +2 -11
@@ -815,11 +815,7 @@ static int vhost_net_release(struct inode *inode, struct file *f)static struct socket *get_raw_socket (int fd) { -struct { -struct sockaddr_ll sa; -char buf[MAX_ADDR_LEN ]; - } uaddr; -int uaddr_len =sizeof uaddr, r; +int r;struct socket *sock =sockfd_lookup (fd, &r);if (!sock)
@@ -831,12 +827,7 @@ static struct socket *get_raw_socket(int fd) goto err; } - r = sock->ops->getname (sock, (struct sockaddr *)&uaddr.sa, - &uaddr_len,0 ); -if (r) - goto err; - -if (uaddr.sa.sll_family !=AF_PACKET ) { +if (sock->sk->sk_family !=AF_PACKET ) { r = -EPFNOSUPPORT ; goto err; }
fs/inode.c +1 -0
@@ -135,6 +135,7 @@ int inode_init_always(struct super_block *sb, struct inode *inode) inode->i_sb = sb; inode->i_blkbits = sb->s_blocksize_bits; inode->i_flags =0 ; +atomic64_set (&inode->i_sequence,0 );atomic_set (&inode->i_count,1 ); inode->i_op = &empty_iops; inode->i_fop = &no_open_fops;
fs/libfs.c +5 -3
@@ -761,7 +761,7 @@ int simple_attr_open(struct inode *inode, struct file *file, {struct simple_attr *attr; - attr =kmalloc (sizeof (*attr),GFP_KERNEL ); + attr =kzalloc (sizeof (*attr),GFP_KERNEL );if (!attr)return -ENOMEM ;
@@ -801,9 +801,11 @@ ssize_t simple_attr_read(struct file *file, char __user *buf,if (ret)return ret; -if (*ppos) {/* continued read */ +if (*ppos && attr->get_buf[0 ]) { +/* continued read */ size =strlen (attr->get_buf); - }else {/* first read */ + }else { +/* first read */ u64 val; ret = attr->get (attr->data, &val);if (ret)
include/linux/fs.h +1 -0
@@ -658,6 +658,7 @@ struct inode {struct rcu_head i_rcu; };u64 i_version; +atomic64_t i_sequence;/* see futex */ atomic_t i_count;atomic_t i_dio_count;atomic_t i_writecount;
include/linux/futex.h +10 -7
@@ -34,23 +34,26 @@ handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi);union futex_key {struct { +u64 i_seq;unsigned long pgoff; -struct inode *inode; -int offset; +unsigned int offset; } shared;struct { +union { +struct mm_struct *mm; +u64 __tmp; + };unsigned long address; -struct mm_struct *mm; -int offset; +unsigned int offset; } private;struct { +u64 ptr;unsigned long word; -void *ptr; -int offset; +unsigned int offset; } both; }; -#define FUTEX_KEY_INIT (union futex_key) { .both = { .ptr = NULL } } +#define FUTEX_KEY_INIT (union futex_key) { .both = { .ptr = 0ULL } }#ifdef CONFIG_FUTEX extern void exit_robust_list (struct task_struct *curr);
include/linux/kref.h +5 -0
@@ -33,6 +33,11 @@ static inline void kref_init(struct kref *kref)atomic_set (&kref->refcount,1 ); } +static inline int kref_read (const struct kref *kref) +{ +return atomic_read (&kref->refcount); +} +/** * kref_get - increment refcount for object. * @kref: object.
include/linux/selection.h +3 -1
@@ -12,8 +12,8 @@struct tty_struct ; -extern struct vc_data *sel_cons;struct tty_struct ; +struct vc_data ;extern void clear_selection (void );extern int set_selection (const struct tiocl_selection __user *sel,struct tty_struct *tty);
@@ -22,6 +22,8 @@ extern int sel_loadlut(char __user *p);extern int mouse_reporting (void );extern void mouse_report (struct tty_struct * tty,int butt,int mrx,int mry); +bool vc_is_sel (struct vc_data *vc); +extern int console_blanked;extern unsigned char color_table[];
include/linux/vmalloc.h +3 -2
@@ -92,8 +92,9 @@ extern int remap_vmalloc_range_partial(struct vm_area_struct *vma,extern int remap_vmalloc_range (struct vm_area_struct *vma,void *addr,unsigned long pgoff); -void vmalloc_sync_all (void ); - +void vmalloc_sync_mappings (void ); +void vmalloc_sync_unmappings (void ); +/* * Lowlevel-APIs (not for driver use!) */
include/linux/vt_kern.h +1 -1
@@ -142,7 +142,7 @@ static inline bool vt_force_oops_output(struct vc_data *vc)return false; } -extern char vt_dont_switch; +extern bool vt_dont_switch;extern int default_utf8;extern int global_cursor_default;
include/uapi/linux/if.h +2 -2
@@ -31,7 +31,7 @@#include <linux/hdlc/ioctl.h> /* For glibc compatibility. An empty enum does not compile. */ -#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO !=0 && \ +#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO !=0 || \ __UAPI_DEF_IF_NET_DEVICE_FLAGS !=0 /** * enum net_device_flags - &struct net_device flags
@@ -99,7 +99,7 @@ enum net_device_flags { IFF_ECHO = 1<<18, /* volatile */ #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ }; -#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 && __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 */ +#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 */ /* for compatibility with glibc net/if.h */ #if __UAPI_DEF_IF_NET_DEVICE_FLAGS
kernel/bpf/syscall.c +2 -1
@@ -667,7 +667,7 @@ static int bpf_obj_get(const union bpf_attr *attr) SYSCALL_DEFINE3(bpf, int, cmd, union bpf_attr __user *, uattr, unsigned int, size) { -union bpf_attr attr = {}; +union bpf_attr attr;int err;if (sysctl_unprivileged_bpf_disabled && !capable (CAP_SYS_ADMIN ))
@@ -703,6 +703,7 @@ SYSCALL_DEFINE3(bpf, int, cmd, union bpf_attr __user *, uattr, unsigned int, siz }/* copy attributes from user space, may be less than sizeof(bpf_attr) */ +memset (&attr,0 ,sizeof (attr));if (copy_from_user (&attr, uattr, size) !=0 )return -EFAULT ;
kernel/futex.c +55 -38
141 lines not on this page · raw message
kernel/irq/manage.c +9 -2
@@ -220,7 +220,11 @@ int irq_set_affinity_locked(struct irq_data *data, const struct cpumask *mask,if (desc->affinity_notify) {kref_get (&desc->affinity_notify->kref); -schedule_work (&desc->affinity_notify->work); +if (!schedule_work (&desc->affinity_notify->work)) { +/* Work was already scheduled, drop our extra ref */ +kref_put (&desc->affinity_notify->kref, + desc->affinity_notify->release); + } }irqd_set (data,IRQD_AFFINITY_SET );
@@ -320,7 +324,10 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)raw_spin_unlock_irqrestore (&desc->lock, flags);if (old_notify) { -cancel_work_sync (&old_notify->work); +if (cancel_work_sync (&old_notify->work)) { +/* Pending work had a ref, put that one too */ +kref_put (&old_notify->kref, old_notify->release); + }kref_put (&old_notify->kref, old_notify->release); }
kernel/notifier.c +1 -1
@@ -552,7 +552,7 @@ NOKPROBE_SYMBOL(notify_die);int register_die_notifier (struct notifier_block *nb) { -vmalloc_sync_all (); +vmalloc_sync_mappings ();return atomic_notifier_chain_register (&die_chain, nb); }EXPORT_SYMBOL_GPL (register_die_notifier);
mm/memcontrol.c +8 -2
@@ -3480,7 +3480,7 @@ static void __mem_cgroup_usage_unregister_event(struct mem_cgroup *memcg,struct mem_cgroup_thresholds *thresholds;struct mem_cgroup_threshold_ary *new;unsigned long usage; -int i, j, size; +int i, j, size, entries;mutex_lock (&memcg->thresholds_lock);
@@ -3500,14 +3500,20 @@ static void __mem_cgroup_usage_unregister_event(struct mem_cgroup *memcg,__mem_cgroup_threshold (memcg, type == _MEMSWAP);/* Calculate new number of threshold */ - size =0 ; + size = entries =0 ;for (i =0 ; i < thresholds->primary->size; i++) {if (thresholds->primary->entries[i].eventfd != eventfd) size++; +else + entries++; } new = thresholds->spare; +/* If no items related to eventfd have been cleared, nothing to do */ +if (!entries) + goto unlock; +/* Set thresholds array to NULL if we don't have thresholds */ if (!size) {kfree (new);
mm/nommu.c +7 -3
@@ -472,10 +472,14 @@ void vm_unmap_aliases(void)EXPORT_SYMBOL_GPL (vm_unmap_aliases);/* -* Implement a stub for vmalloc_sync_all() if the architecture chose not to -* have one. +* Implement a stub for vmalloc_sync_[un]mapping() if the architecture +* chose not to have one. */ -void __weak vmalloc_sync_all (void ) +void __weak vmalloc_sync_mappings (void ) +{ +} + +void __weak vmalloc_sync_unmappings (void ) { }
mm/slub.c +21 -11
@@ -1777,8 +1777,6 @@ static void *get_partial(struct kmem_cache *s, gfp_t flags, int node,if (node ==NUMA_NO_NODE ) searchnode =numa_mem_id (); -else if (!node_present_pages (node)) - searchnode =node_to_mem_node (node); object =get_partial_node (s,get_node (s, searchnode), c, flags);if (object || node !=NUMA_NO_NODE )
@@ -2355,17 +2353,27 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,struct page *page; page = c->page; -if (!page) +if (!page) { +/* +* if the node is not online or has no normal memory, just +* ignore the node constraint +*/ +if (unlikely (node !=NUMA_NO_NODE && + !node_state (node,N_NORMAL_MEMORY ))) + node =NUMA_NO_NODE ; goto new_slab; + } redo:if (unlikely (!node_match (page, node))) { -int searchnode = node; - -if (node !=NUMA_NO_NODE && !node_present_pages (node)) - searchnode =node_to_mem_node (node); - -if (unlikely (!node_match (page, searchnode))) { +/* +* same as above but node_match() being false already +* implies node != NUMA_NO_NODE +*/ +if (!node_state (node,N_NORMAL_MEMORY )) { + node =NUMA_NO_NODE ; + goto redo; + }else {stat (s,ALLOC_NODE_MISMATCH );deactivate_slab (s, page, c->freelist); c->page =NULL ;
@@ -2788,11 +2796,13 @@ redo:barrier ();if (likely (page == c->page)) { -set_freepointer (s, tail_obj, c->freelist); +void **freelist =READ_ONCE (c->freelist); + +set_freepointer (s, tail_obj, freelist);if (unlikely (!this_cpu_cmpxchg_double ( s->cpu_slab->freelist, s->cpu_slab->tid, - c->freelist, tid, + freelist, tid, head,next_tid (tid)))) {note_cmpxchg_failure ("slab_free" , s, tid);
mm/vmalloc.c +7 -4
@@ -1681,7 +1681,7 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,* First make sure the mappings are removed from all page-tables * before they are freed. */ -vmalloc_sync_all (); +vmalloc_sync_unmappings ();/* * In this function, newly allocated vm_struct has VM_UNINITIALIZED
@@ -2218,16 +2218,19 @@ int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,EXPORT_SYMBOL (remap_vmalloc_range);/* -* Implement a stub for vmalloc_sync_all() if the architecture chose not to -* have one. +* Implement stubs for vmalloc_sync_[un]mappings () if the architecture chose +* not to have one. * * The purpose of this function is to make sure the vmalloc area * mappings are identical in all page-tables in the system. */ -void __weak vmalloc_sync_all (void ) +void __weak vmalloc_sync_mappings (void ) { } +void __weak vmalloc_sync_unmappings (void ) +{ +}static int f (pte_t *pte,pgtable_t table,unsigned long addr,void *data) {
net/dsa/tag_brcm.c +2 -0
@@ -84,6 +84,8 @@ static struct sk_buff *brcm_tag_xmit(struct sk_buff *skb, struct net_device *dev brcm_tag[2 ] =BRCM_IG_DSTMAP2_MASK ; brcm_tag[3 ] = (1 << p->port) &BRCM_IG_DSTMAP1_MASK ; + skb->offload_fwd_mark =1 ; +return skb; out_free:
net/hsr/hsr_framereg.c +2 -8
@@ -455,13 +455,9 @@ int hsr_get_node_data(struct hsr_priv *hsr,struct hsr_port *port;unsigned long tdiff; - -rcu_read_lock (); node =find_node_by_AddrA (&hsr->node_db, addr); -if (!node) { -rcu_read_unlock (); -return -ENOENT ;/* No such entry */ - } +if (!node) +return -ENOENT ;ether_addr_copy (addr_b, node->MacAddressB);
@@ -496,7 +492,5 @@ int hsr_get_node_data(struct hsr_priv *hsr, *addr_b_ifindex =-1 ; } -rcu_read_unlock (); -return 0 ; }
net/hsr/hsr_netlink.c +42 -32
169 lines not on this page · raw message
net/hsr/hsr_slave.c +4 -4
@@ -149,16 +149,16 @@ int hsr_add_port(struct hsr_priv *hsr, struct net_device *dev,if (port ==NULL )return -ENOMEM ; + port->hsr = hsr; + port->dev = dev; + port->type = type; +if (type !=HSR_PT_MASTER ) { res =hsr_portdev_setup (dev, port);if (res) goto fail_dev_setup; } - port->hsr = hsr; - port->dev = dev; - port->type = type; -list_add_tail_rcu (&port->port_list, &hsr->ports);synchronize_rcu ();
net/ipv4/Kconfig +1 -0
@@ -298,6 +298,7 @@ config SYN_COOKIES config NET_IPVTI tristate "Virtual (secure) IP: tunneling" + depends on IPV6 || IPV6=n select INET_TUNNEL select NET_IP_TUNNEL depends on INET_XFRM_MODE_TUNNEL
net/ipv4/ip_vti.c +30 -8
@@ -195,17 +195,39 @@ static netdev_tx_t vti_xmit(struct sk_buff *skb, struct net_device *dev,int err;if (!dst) { -struct rtable *rt; - - fl->u.ip4.flowi4_oif = dev->ifindex; - fl->u.ip4.flowi4_flags |=FLOWI_FLAG_ANYSRC ; - rt =__ip_route_output_key (dev_net (dev), &fl->u.ip4); -if (IS_ERR (rt)) { +switch (skb->protocol) { +case htons (ETH_P_IP ): { +struct rtable *rt; + + fl->u.ip4.flowi4_oif = dev->ifindex; + fl->u.ip4.flowi4_flags |=FLOWI_FLAG_ANYSRC ; + rt =__ip_route_output_key (dev_net (dev), &fl->u.ip4); +if (IS_ERR (rt)) { + dev->stats.tx_carrier_errors++; + goto tx_error_icmp; + } + dst = &rt->dst; +skb_dst_set (skb, dst); +break ; + } +#if IS_ENABLED (CONFIG_IPV6 ) +case htons (ETH_P_IPV6 ): + fl->u.ip6.flowi6_oif = dev->ifindex; + fl->u.ip6.flowi6_flags |=FLOWI_FLAG_ANYSRC ; + dst =ip6_route_output (dev_net (dev),NULL , &fl->u.ip6); +if (dst->error) { +dst_release (dst); + dst =NULL ; + dev->stats.tx_carrier_errors++; + goto tx_error_icmp; + } +skb_dst_set (skb, dst); +break ; +#endif +default : dev->stats.tx_carrier_errors++; goto tx_error_icmp; } - dst = &rt->dst; -skb_dst_set (skb, dst); }dst_hold (dst);
net/ipv4/route.c +4 -3
@@ -985,21 +985,22 @@ out: kfree_skb(skb);static void __ip_rt_update_pmtu (struct rtable *rt,struct flowi4 *fl4,u32 mtu) {struct dst_entry *dst = &rt->dst; +u32 old_mtu =ipv4_mtu (dst);struct fib_result res;bool lock = false;if (ip_mtu_locked (dst))return ; -if (ipv4_mtu (dst) < mtu) +if (old_mtu < mtu)return ;if (mtu < ip_rt_min_pmtu) { lock = true; - mtu = ip_rt_min_pmtu; + mtu =min (old_mtu, ip_rt_min_pmtu); } -if (rt->rt_pmtu == mtu && +if (rt->rt_pmtu == mtu && !lock &&time_before (jiffies, dst->expires - ip_rt_mtu_expires /2 ))return ;
net/ipv6/ip6_vti.c +26 -8
@@ -315,7 +315,7 @@ static int vti6_rcv(struct sk_buff *skb)if (!xfrm6_policy_check (NULL ,XFRM_POLICY_IN , skb)) {rcu_read_unlock (); -return 0 ; + goto discard; }if (!ip6_tnl_rcv_ctl (t, &ipv6h->daddr, &ipv6h->saddr)) {
@@ -442,15 +442,33 @@ vti6_xmit(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)int mtu;if (!dst) { - fl->u.ip6.flowi6_oif = dev->ifindex; - fl->u.ip6.flowi6_flags |=FLOWI_FLAG_ANYSRC ; - dst =ip6_route_output (dev_net (dev),NULL , &fl->u.ip6); -if (dst->error) { -dst_release (dst); - dst =NULL ; +switch (skb->protocol) { +case htons (ETH_P_IP ): { +struct rtable *rt; + + fl->u.ip4.flowi4_oif = dev->ifindex; + fl->u.ip4.flowi4_flags |=FLOWI_FLAG_ANYSRC ; + rt =__ip_route_output_key (dev_net (dev), &fl->u.ip4); +if (IS_ERR (rt)) + goto tx_err_link_failure; + dst = &rt->dst; +skb_dst_set (skb, dst); +break ; + } +case htons (ETH_P_IPV6 ): + fl->u.ip6.flowi6_oif = dev->ifindex; + fl->u.ip6.flowi6_flags |=FLOWI_FLAG_ANYSRC ; + dst =ip6_route_output (dev_net (dev),NULL , &fl->u.ip6); +if (dst->error) { +dst_release (dst); + dst =NULL ; + goto tx_err_link_failure; + } +skb_dst_set (skb, dst); +break ; +default : goto tx_err_link_failure; } -skb_dst_set (skb, dst); }dst_hold (dst);
net/mac80211/mesh_hwmp.c +2 -1
@@ -1112,7 +1112,8 @@ int mesh_nexthop_resolve(struct ieee80211_sub_if_data *sdata, } } -if (!(mpath->flags &MESH_PATH_RESOLVING )) +if (!(mpath->flags &MESH_PATH_RESOLVING ) && +mesh_path_sel_is_hwmp (sdata))mesh_queue_preq (mpath,PREQ_Q_F_START );if (skb_queue_len (&mpath->frame_queue) >=MESH_FRAME_QUEUE_LEN )
net/mac80211/sta_info.c +6 -0
@@ -2,6 +2,7 @@* Copyright 2002-2005, Instant802 Networks, Inc. * Copyright 2006-2007 Jiri Benc <[email protected]> * Copyright 2013-2014 Intel Mobile Communications GmbH +* Copyright (C) 2018-2020 Intel Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -904,6 +905,11 @@ static void __sta_info_destroy_part2(struct sta_info *sta)might_sleep ();lockdep_assert_held (&local->sta_mtx); +while (sta->sta_state ==IEEE80211_STA_AUTHORIZED ) { + ret =sta_info_move_state (sta,IEEE80211_STA_ASSOC ); +WARN_ON_ONCE (ret); + } +/* now keys can no longer be reached */ ieee80211_free_sta_keys (local, sta);
net/sched/cls_route.c +2 -2
@@ -540,8 +540,8 @@ static int route4_change(struct net *net, struct sk_buff *in_skb, fp = &b->ht[h];for (pfp =rtnl_dereference (*fp); pfp; fp = &pfp->next, pfp =rtnl_dereference (*fp)) { -if (pfp == f) { - *fp = f->next; +if (pfp == fold) { +rcu_assign_pointer (*fp, fold->next);break ; } }
net/sched/cls_tcindex.c +1 -0
@@ -293,6 +293,7 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, sizeof(*r) * cp->hash, GFP_KERNEL);if (!cp->perfect) goto errout; + cp->alloc_hash = cp->hash;for (i =0 ; i <min (cp->hash, p->hash); i++)tcf_exts_init (&cp->perfect[i].exts,TCA_TCINDEX_ACT ,TCA_TCINDEX_POLICE );
net/xfrm/xfrm_policy.c +2 -0
@@ -330,7 +330,9 @@ EXPORT_SYMBOL(xfrm_policy_destroy);static void xfrm_policy_kill (struct xfrm_policy *policy) { +write_lock_bh (&policy->lock); policy->walk.dead =1 ; +write_unlock_bh (&policy->lock);atomic_inc (&policy->genid);
net/xfrm/xfrm_user.c +5 -1
@@ -109,7 +109,8 @@ static inline int verify_sec_ctx_len(struct nlattr **attrs)return 0 ; uctx =nla_data (rt); -if (uctx->len != (sizeof (struct xfrm_user_sec_ctx ) + uctx->ctx_len)) +if (uctx->len >nla_len (rt) || + uctx->len != (sizeof (struct xfrm_user_sec_ctx ) + uctx->ctx_len))return -EINVAL ;return 0 ;
@@ -2173,6 +2174,9 @@ static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh,xfrm_mark_get (attrs, &mark); err =verify_newpolicy_info (&ua->policy); +if (err) + goto free_state; + err =verify_sec_ctx_len (attrs);if (err) goto bad_policy;
scripts/Makefile.extrawarn +1 -0
@@ -67,5 +67,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, format) KBUILD_CFLAGS += $(call cc-disable-warning, sign-compare) KBUILD_CFLAGS += $(call cc-disable-warning, format-zero-length) KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized) +KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast) endif endif
scripts/dtc/dtc-lexer.l +0 -1
@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n #include "srcpos.h" #include "dtc-parser.tab.h" -YYLTYPE yylloc; extern bool treesource_error; /* CAUTION: this will stop working if we ever use yyless() or yyunput() */
scripts/dtc/dtc-lexer.lex.c_shipped +0 -1
@@ -637,7 +637,6 @@ char *yytext; #include "srcpos.h" #include "dtc-parser.tab.h" -YYLTYPE yylloc; extern bool treesource_error; /* CAUTION: this will stop working if we ever use yyless() or yyunput() */
sound/core/oss/pcm_plugin.c +10 -2
@@ -111,7 +111,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)while (plugin->next) {if (plugin->dst_frames) frames = plugin->dst_frames (plugin, frames); -if (snd_BUG_ON ((snd_pcm_sframes_t )frames <=0 )) +if ((snd_pcm_sframes_t )frames <=0 )return -ENXIO ; plugin = plugin->next; err =snd_pcm_plugin_alloc (plugin, frames);
@@ -123,7 +123,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)while (plugin->prev) {if (plugin->src_frames) frames = plugin->src_frames (plugin, frames); -if (snd_BUG_ON ((snd_pcm_sframes_t )frames <=0 )) +if ((snd_pcm_sframes_t )frames <=0 )return -ENXIO ; plugin = plugin->prev; err =snd_pcm_plugin_alloc (plugin, frames);
@@ -209,6 +209,8 @@ snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *plug, snd_pif (stream ==SNDRV_PCM_STREAM_PLAYBACK ) { plugin =snd_pcm_plug_last (plug);while (plugin && drv_frames >0 ) { +if (drv_frames > plugin->buf_frames) + drv_frames = plugin->buf_frames; plugin_prev = plugin->prev;if (plugin->src_frames) drv_frames = plugin->src_frames (plugin, drv_frames);
@@ -220,6 +222,8 @@ snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *plug, snd_p plugin_next = plugin->next;if (plugin->dst_frames) drv_frames = plugin->dst_frames (plugin, drv_frames); +if (drv_frames > plugin->buf_frames) + drv_frames = plugin->buf_frames; plugin = plugin_next; } }else
@@ -248,11 +252,15 @@ snd_pcm_sframes_t snd_pcm_plug_slave_size(struct snd_pcm_substream *plug, snd_pcif (frames <0 )return frames; } +if (frames > plugin->buf_frames) + frames = plugin->buf_frames; plugin = plugin_next; } }else if (stream ==SNDRV_PCM_STREAM_CAPTURE ) { plugin =snd_pcm_plug_last (plug);while (plugin) { +if (frames > plugin->buf_frames) + frames = plugin->buf_frames; plugin_prev = plugin->prev;if (plugin->src_frames) { frames = plugin->src_frames (plugin, frames);
sound/core/seq/oss/seq_oss_midi.c +1 -0
@@ -615,6 +615,7 @@ send_midi_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, struct seq len =snd_seq_oss_timer_start (dp->timer);if (ev->type ==SNDRV_SEQ_EVENT_SYSEX ) {snd_seq_oss_readq_sysex (dp->readq, mdev->seq_device, ev); +snd_midi_event_reset_decode (mdev->coder); }else { len =snd_midi_event_decode (mdev->coder, msg,sizeof (msg), ev);if (len >0 )
sound/core/seq/seq_virmidi.c +1 -0
@@ -95,6 +95,7 @@ static int snd_virmidi_dev_receive_event(struct snd_virmidi_dev *rdev,if ((ev->flags &SNDRV_SEQ_EVENT_LENGTH_MASK ) !=SNDRV_SEQ_EVENT_LENGTH_VARIABLE )continue ;snd_seq_dump_var_event (ev, (snd_seq_dump_func_t )snd_rawmidi_receive, vmidi->substream); +snd_midi_event_reset_decode (vmidi->parser); }else { len =snd_midi_event_decode (vmidi->parser, msg,sizeof (msg), ev);if (len >0 )
sound/pci/hda/patch_realtek.c +2 -0
@@ -6333,6 +6333,8 @@ static int patch_alc269(struct hda_codec *codec)alc_update_coef_idx (codec,0x36 ,1 <<13 ,1 <<5 );/* Switch pcbeep path to Line in path*/ break ;case 0x10ec0225 : + codec->power_save_node =1 ; +/* fall through */ case 0x10ec0295 :case 0x10ec0299 : spec->codec_variant =ALC269_TYPE_ALC225 ;
sound/usb/line6/driver.c +1 -1
@@ -283,7 +283,7 @@ static void line6_data_received(struct urb *urb)line6_midibuf_read (mb, line6->buffer_message,LINE6_MESSAGE_MAXLEN ); -if (done ==0 ) +if (done <=0 )break ; line6->message_length = done;
sound/usb/line6/midibuf.c +1 -1
@@ -163,7 +163,7 @@ int line6_midibuf_read(struct midi_buffer *this, unsigned char *data,int midi_length_prev =midibuf_message_length (this->command_prev); -if (midi_length_prev >0 ) { +if (midi_length_prev >1 ) { midi_length = midi_length_prev -1 ; repeat =1 ; }else
tools/perf/Makefile +1 -1
@@ -34,7 +34,7 @@ endif # Only pass canonical directory names as the output directory: # ifneq ($(O),) - FULL_O := $(shell readlink -f $(O) || echo $(O)) + FULL_O := $(shell cd $(PWD); readlink -f $(O) || echo $(O)) endif #
tools/perf/util/map.c +1 -1
@@ -85,7 +85,7 @@ static inline bool replace_android_lib(const char *filename, char *newfilename)return true; } -if (!strncmp (filename,"/system/lib/" ,11 )) { +if (!strncmp (filename,"/system/lib/" ,12 )) {char *ndk, *app;const char *arch;size_t ndk_length;
tools/perf/util/probe-finder.c +8 -3
@@ -608,14 +608,19 @@ static int convert_to_trace_point(Dwarf_Die *sp_die, Dwfl_Module *mod,return -EINVAL ; } -/* Try to get actual symbol name from symtab */ - symbol =dwfl_module_addrsym (mod, paddr, &sym,NULL ); +if (dwarf_entrypc (sp_die, &eaddr) ==0 ) { +/* If the DIE has entrypc, use it. */ + symbol =dwarf_diename (sp_die); + }else { +/* Try to get actual symbol name and address from symtab */ + symbol =dwfl_module_addrsym (mod, paddr, &sym,NULL ); + eaddr = sym.st_value; + }if (!symbol) {pr_warning ("Failed to find symbol at 0x%lx\n" , (unsigned long )paddr);return -ENOENT ; } - eaddr = sym.st_value; tp->offset = (unsigned long )(paddr - eaddr); tp->address = (unsigned long )paddr;
tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c +1 -1
@@ -83,7 +83,7 @@ static struct pci_access *pci_acc;static struct pci_dev *amd_fam14h_pci_dev;static int nbp1_entered; -struct timespec start_time; +static struct timespec start_time;static unsigned long long timediff;#ifdef DEBUG
tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c +1 -1
@@ -21,7 +21,7 @@ struct cpuidle_monitor cpuidle_sysfs_monitor;static unsigned long long **previous_count;static unsigned long long **current_count; -struct timespec start_time; +static struct timespec start_time;static unsigned long long timediff; static int cpuidle_get_count_percent(unsigned int id, double *percent,
tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c +2 -0
@@ -29,6 +29,8 @@ struct cpuidle_monitor *all_monitors[] = { 0 }; +int cpu_count; +static struct cpuidle_monitor *monitors[MONITORS_MAX ];static unsigned int avail_monitors;
tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h +1 -1
@@ -18,7 +18,7 @@#define CSTATE_NAME_LEN 5#define CSTATE_DESC_LEN 60 -int cpu_count; +extern int cpu_count;/* Hard to define the right names ...: */ enum power_range_e {
tools/scripts/Makefile.include +2 -2
@@ -1,7 +1,7 @@ ifneq ($(O),) ifeq ($(origin O), command line) - dummy := $(if $(shell test -d $(O) || echo $(O)),$(error O=$(O) does not exist),) - ABSOLUTE_O := $(shell cd $(O) ; pwd) + dummy := $(if $(shell cd $(PWD); test -d $(O) || echo $(O)),$(error O=$(O) does not exist),) + ABSOLUTE_O := $(shell cd $(PWD); cd $(O) ; pwd) OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/) COMMAND_O := O=$(ABSOLUTE_O) ifeq ($(objtree),)