Linux 4.14.278
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.278 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/imx6qdl-apalis.dtsi | 10 +++- arch/arm/boot/dts/omap3-gta04.dtsi | 2 arch/arm/mach-omap2/omap4-common.c | 2 arch/mips/include/asm/timex.h | 8 +-- arch/mips/kernel/time.c | 11 +---- arch/parisc/kernel/processor.c | 3 - arch/x86/include/asm/microcode.h | 2 arch/x86/kernel/cpu/microcode/core.c | 6 +- arch/x86/kvm/cpuid.c | 5 ++ arch/x86/lib/usercopy_64.c | 2 arch/x86/power/cpu.c | 8 +++ drivers/block/Kconfig | 16 +++++++ drivers/block/floppy.c | 43 ++++++++++++++------ drivers/bus/sunxi-rsb.c | 2 drivers/clk/sunxi/clk-sun9i-mmc.c | 2 drivers/firewire/core-card.c | 3 + drivers/firewire/core-cdev.c | 4 + drivers/firewire/core-topology.c | 9 +--- drivers/firewire/core-transaction.c | 30 +++++++------ drivers/firewire/sbp2.c | 13 +++--- drivers/gpu/drm/vgem/vgem_drv.c | 9 ++-- drivers/hwmon/adt7470.c | 4 - drivers/iio/dac/ad5446.c | 2 drivers/iio/dac/ad5592r-base.c | 2 drivers/iio/magnetometer/ak8975.c | 1 drivers/lightnvm/Kconfig | 2 drivers/md/dm.c | 19 +++++--- drivers/mtd/nand/sh_flctl.c | 14 +++--- drivers/net/can/grcan.c | 8 ++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 9 ++-- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 7 +++ drivers/net/ethernet/smsc/smsc911x.c | 2 drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c | 8 +++ drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.h | 4 - drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 13 +++--- drivers/net/ethernet/xilinx/xilinx_emaclite.c | 15 +++++- drivers/net/hamradio/6pack.c | 5 +- drivers/net/hippi/rrunner.c | 2 drivers/nfc/nfcmrvl/main.c | 2 drivers/pci/host/pci-aardvark.c | 16 +++---- drivers/phy/samsung/phy-exynos5250-sata.c | 21 ++++++--- drivers/pinctrl/pinctrl-pistachio.c | 6 +- drivers/tty/n_gsm.c | 40 +++++++++--------- drivers/tty/serial/8250/8250_pci.c | 8 +-- drivers/tty/serial/8250/8250_port.c | 2 drivers/usb/core/quirks.c | 6 ++ drivers/usb/gadget/configfs.c | 2 drivers/usb/gadget/function/uvc_queue.c | 2 drivers/usb/host/xhci-ring.c | 2 drivers/usb/host/xhci.c | 11 +++++ drivers/usb/misc/uss720.c | 3 - drivers/usb/mtu3/mtu3_dr.c | 6 -- drivers/usb/serial/cp210x.c | 2 drivers/usb/serial/option.c | 12 +++++ drivers/usb/serial/whiteheat.c | 5 -- fs/btrfs/tree-log.c | 14 ++++++ fs/cifs/smb2ops.c | 8 +++ include/linux/kernel.h | 2 include/net/tcp.h | 1 lib/hexdump.c | 41 ++++++++++++++----- net/ipv4/igmp.c | 9 ++-- net/ipv4/ip_gre.c | 8 +-- net/ipv4/tcp_input.c | 12 +++++ net/ipv4/tcp_output.c | 1 net/ipv6/addrconf.c | 8 ++- net/netfilter/ipvs/ip_vs_conn.c | 2 net/nfc/core.c | 29 ++++++------- net/nfc/netlink.c | 4 - net/sched/cls_u32.c | 18 +++++--- net/sctp/sm_sideeffect.c | 4 + net/sunrpc/xprtsock.c | 3 - sound/firewire/fireworks/fireworks_hwdep.c | 1 sound/soc/codecs/wm8731.c | 19 +++++--- sound/soc/codecs/wm8958-dsp2.c | 8 +-- sound/soc/soc-generic-dmaengine-pcm.c | 6 +- 76 files changed, 434 insertions(+), 219 deletions(-)
Armin Wolf (1):
hwmon: (adt7470) Fix warning on module removal
Borislav Petkov (1):
x86/cpu: Load microcode during restore_processor_state()
Bruno Thomsen (1):
USB: serial: cp210x: add PIDs for Kamstrup USB Meter Reader
Chengfeng Ye (1):
firewire: fix potential uaf in outbound_phy_packet_callback()
Christophe JAILLET (1):
bus: sunxi-rsb: Fix the return value of sunxi_rsb_device_create()
Codrin Ciubotariu (1):
ASoC: dmaengine: Restore NULL prepare_slave_config() callback
Dan Vacura (1):
usb: gadget: uvc: Fix crash when encoding data for usb request
Daniel Hellstrom (1):
can: grcan: use ofdev->dev when allocating DMA memory
Daniel Starke (7):
tty: n_gsm: fix wrong signal octet encoding in convergence layer type 2
tty: n_gsm: fix malformed counter for out of frame data
tty: n_gsm: fix insufficient txframe size
tty: n_gsm: fix missing explicit ldisc flush
tty: n_gsm: fix wrong command retry handling
tty: n_gsm: fix wrong command frame length field encoding
tty: n_gsm: fix incorrect UA handling
Daniel Vetter (1):
drm/vgem: Close use-after-free race in vgem_gem_create
Daniele Palmas (1):
USB: serial: option: add Telit 0x1057, 0x1058, 0x1075 compositions
Duoming Zhou (5):
drivers: net: hippi: Fix deadlock in rr_close()
can: grcan: grcan_close(): fix deadlock
nfc: replace improper check device_is_registered() in netlink related functions
nfc: nfcmrvl: main: reorder destructive operations in nfcmrvl_nci_unregister_dev to avoid bugs
NFC: netlink: fix sleep in atomic bug when firmware download timeout
Eric Dumazet (3):
net/sched: cls_u32: fix netns refcount changes in u32_change()
tcp: fix potential xmit stalls caused by TCP_NOTSENT_LOWAT
net: igmp: respect RCU rules in ip_mc_source() and ip_mc_msfilter()
Fabio Estevam (1):
ARM: dts: imx6qdl-apalis: Fix sgtl5000 detection issue
Filipe Manana (1):
btrfs: always log symlinks in full mode
Greg Kroah-Hartman (3):
Revert "net: ethernet: stmmac: fix altr_tse_pcs function when using a fixed-link"
lightnvm: disable the subsystem
Linux 4.14.278
H. Nikolaus Schaller (1):
ARM: dts: Fix mmc order for omap3-gta04
Hangyu Hua (1):
usb: misc: fix improper handling of refcount in uss720_probe()
Helge Deller (1):
parisc: Merge model and model name into one line in /proc/cpuinfo
Henry Lin (1):
xhci: stop polling roothubs after shutdown
Jakob Koschel (1):
firewire: remove check of list iterator against head past the loop body
Jiazi Li (1):
dm: fix mempool NULL pointer race when completing IO
Jonathan Lemon (1):
net: bcmgenet: hide status block before TX timestamping
Kees Cook (1):
USB: serial: whiteheat: fix heap overflow in WHITEHEAT_GET_DTR_RTS
Krzysztof Kozlowski (1):
phy: samsung: exynos5250-sata: fix missing device put in probe error paths
Lin Ma (2):
hamradio: defer 6pack kfree after unregister_netdev
hamradio: remove needs_free_netdev to avoid UAF
Lv Ruyi (1):
pinctrl: pistachio: fix use of irq_of_parse_and_map()
Maciej W. Rozycki (3):
serial: 8250: Also set sticky MCR bits in console restoration
serial: 8250: Correct the clock for EndRun PTP/1588 PCIe device
MIPS: Fix CP0 counter erratum detection for R4k CPUs
Macpaul Lin (1):
usb: mtu3: fix USB 3.0 dual-role-switch from device to host
Manish Chopra (1):
bnx2x: fix napi API usage sequence
Mark Brown (1):
ASoC: wm8958: Fix change notifications for DSP controls
Miaoqian Lin (3):
phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe
ARM: OMAP2+: Fix refcount leak in omap_gic_of_init
mtd: rawnand: Fix return value check of wait_for_completion_timeout
Michael Hennerich (1):
iio: dac: ad5446: Fix read_raw not returning set value
Mike Snitzer (1):
dm: interlock pending dm_io and dm_wait_for_bios_completion
Mikulas Patocka (3):
hex2bin: make the function hex_to_bin constant-time
hex2bin: fix access beyond string end
x86: __memcpy_flushcache: fix wrong alignment if size > 2^32
Niels Dossche (1):
firewire: core: extend card->lock in fw_core_handle_bus_reset
Oliver Neukum (2):
USB: quirks: add a Realtek card reader
USB: quirks: add STRING quirk for VCOM device
Pali Rohár (2):
PCI: aardvark: Clear all MSIs at setup
PCI: aardvark: Fix reading MSI interrupt number
Peilin Ye (1):
ip_gre: Make o_seqno start from 0 in native mode
Pengcheng Yang (1):
ipvs: correctly print the memory size of ip_vs_conn_tab
Ronnie Sahlberg (1):
cifs: destage any unwritten data to the server before calling copychunk_write
Sandipan Das (1):
kvm: x86/cpuid: Only provide CPUID leaf 0xA if host has architectural PMU
Sergey Shtylyov (1):
smsc911x: allow using IRQ0
Shravya Kumbham (1):
net: emaclite: Add error handling for of_address_to_resource()
Slark Xiao (1):
USB: serial: option: add support for Cinterion MV32-WA/MV32-WB
Takashi Sakamoto (1):
ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes
Trond Myklebust (1):
Revert "SUNRPC: attempt AF_LOCAL connect on setup"
Vijayavardhan Vennapusa (1):
usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind()
Weitao Wang (1):
USB: Fix xhci event ring dequeue pointer ERDP update issue
Willy Tarreau (1):
floppy: disable FDRAWCMD by default
Xin Long (1):
sctp: check asoc strreset_chunk in sctp_generate_reconf_event
Yang Yingliang (1):
clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource()
Zheyu Ma (2):
iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on()
ASoC: wm8731: Disable the regulator when probing fails
Zizhuang Deng (1):
iio: dac: ad5592r: Fix the missing return value.
[email protected] (1):
net: ipv6: ensure we call ipv6_mc_down() at most once
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 277 +SUBLEVEL = 278 EXTRAVERSION = NAME = Petit Gorille
arch/arm/boot/dts/imx6qdl-apalis.dtsi +8 -2
@@ -316,6 +316,8 @@ codec: sgtl5000@0a { compatible = "fsl,sgtl5000"; reg = <0x0a>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sgtl5000>; clocks = <&clks IMX6QDL_CLK_CKO>; VDDA-supply = <®_2p5v>; VDDIO-supply = <®_3p3v>;
@@ -543,8 +545,6 @@ MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x130b0 MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0 MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0 - /* SGTL5000 sys_mclk */ - MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0 >; };
@@ -810,6 +810,12 @@ >; }; + pinctrl_sgtl5000: sgtl5000grp { + fsl,pins = < + MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0 + >; + }; + pinctrl_spdif: spdifgrp { fsl,pins = < MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0
arch/arm/boot/dts/omap3-gta04.dtsi +2 -0
@@ -29,6 +29,8 @@ aliases { display0 = &lcd; display1 = &tv0; + /delete-property/ mmc2; + /delete-property/ mmc3; }; gpio-keys {
arch/arm/mach-omap2/omap4-common.c +2 -0
@@ -342,10 +342,12 @@ void __init omap_gic_of_init(void) np =of_find_compatible_node (NULL ,NULL ,"arm,cortex-a9-gic" ); gic_dist_base_addr =of_iomap (np,0 ); +of_node_put (np);WARN_ON (!gic_dist_base_addr); np =of_find_compatible_node (NULL ,NULL ,"arm,cortex-a9-twd-timer" ); twd_base =of_iomap (np,0 ); +of_node_put (np);WARN_ON (!twd_base); skip_errata_init:
arch/mips/include/asm/timex.h +4 -4
@@ -40,9 +40,9 @@typedef unsigned int cycles_t ;/* -* On R4000/R4400 before version 5.0 an erratum exists such that if the -* cycle counter is read in the exact moment that it is matching the -* compare register, no interrupt will be generated. +* On R4000/R4400 an erratum exists such that if the cycle counter is +* read in the exact moment that it is matching the compare register, +* no interrupt will be generated. * * There is a suggested workaround and also the erratum can't strike if * the compare interrupt isn't being used as the clock source device.
@@ -63,7 +63,7 @@ static inline int can_use_mips_counter(unsigned int prid)if (!__builtin_constant_p (cpu_has_counter)) asmvolatile ("" :"=m" (cpu_data[0 ].options));if (likely (cpu_has_counter && - prid >= (PRID_IMP_R4000 |PRID_REV_ENCODE_44 (5 ,0 )))) + prid > (PRID_IMP_R4000 |PRID_REV_ENCODE_44 (15 ,15 ))))return 1 ;else return 0 ;
arch/mips/kernel/time.c +3 -8
@@ -155,15 +155,10 @@ static __init int cpu_has_mfc0_count_bug(void)case CPU_R4400MC :/* * The published errata for the R4400 up to 3.0 say the CPU -* has the mfc0 from count bug. +* has the mfc0 from count bug. This seems the last version +* produced. */ -if ((current_cpu_data.processor_id &0xff ) <=0x30 ) -return 1 ; - -/* -* we assume newer revisions are ok -*/ -return 0 ; +return 1 ; }return 0 ;
arch/parisc/kernel/processor.c +1 -2
@@ -408,8 +408,7 @@ show_cpuinfo (struct seq_file *m, void *v) }seq_printf (m," (0x%02lx)\n" , boot_cpu_data.pdc.capabilities); -seq_printf (m,"model\t\t: %s\n" -"model name\t: %s\n" , +seq_printf (m,"model\t\t: %s - %s\n" , boot_cpu_data.pdc.sys_model_name, cpuinfo->dev ? cpuinfo->dev->name :"Unknown" );
arch/x86/include/asm/microcode.h +2 -0
@@ -147,11 +147,13 @@ extern void load_ucode_ap(void);void reload_early_microcode (void );extern bool get_builtin_firmware (struct cpio_data *cd,const char *name);extern bool initrd_gone; +void microcode_bsp_resume (void );#else static inline int __init microcode_init (void ) {return 0 ; };static inline void __init load_ucode_bsp (void ) { }static inline void load_ucode_ap (void ) { }static inline void reload_early_microcode (void ) { } +static inline void microcode_bsp_resume (void ) { }static inline bool get_builtin_firmware (struct cpio_data *cd,const char *name) {return false; }#endif
arch/x86/kernel/cpu/microcode/core.c +3 -3
@@ -773,9 +773,9 @@ static struct subsys_interface mc_cpu_interface = { };/** -* mc_bp_resume - Update boot CPU microcode during resume. +* microcode_bsp_resume - Update boot CPU microcode during resume. */ -static void mc_bp_resume (void ) +void microcode_bsp_resume (void ) {int cpu =smp_processor_id ();struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
@@ -787,7 +787,7 @@ static void mc_bp_resume(void) }static struct syscore_ops mc_syscore_ops = { - .resume = mc_bp_resume, + .resume = microcode_bsp_resume, };static int mc_cpu_starting (unsigned int cpu)
arch/x86/kvm/cpuid.c +5 -0
@@ -517,6 +517,11 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,union cpuid10_eax eax;union cpuid10_edx edx; +if (!static_cpu_has (X86_FEATURE_ARCH_PERFMON )) { + entry->eax = entry->ebx = entry->ecx = entry->edx =0 ; +break ; + } +perf_get_x86_pmu_capability (&cap);/*
arch/x86/lib/usercopy_64.c +1 -1
@@ -140,7 +140,7 @@ void memcpy_flushcache(void *_dst, const void *_src, size_t size)/* cache copy and flush to align dest */ if (!IS_ALIGNED (dest,8 )) { -unsigned len =min_t (unsigned, size,ALIGN (dest,8 ) - dest); +size_t len =min_t (size_t, size,ALIGN (dest,8 ) - dest);memcpy ((void *) dest, (void *) source, len);clean_cache_range ((void *) dest, len);
arch/x86/power/cpu.c +8 -0
@@ -26,6 +26,7 @@#include <asm/cpu.h> #include <asm/mmu_context.h> #include <asm/cpu_device_id.h> +#include <asm/microcode.h> #ifdef CONFIG_X86_32 __visible unsigned long saved_context_ebx;
@@ -268,6 +269,13 @@ static void notrace __restore_processor_state(struct saved_context *ctxt) x86_platform.restore_sched_clock_state ();mtrr_bp_restore ();perf_restore_debug_store (); + +microcode_bsp_resume (); + +/* +* This needs to happen after the microcode has been updated upon resume +* because some of the MSRs are "emulated" in microcode. +*/ msr_restore_context (ctxt); }
drivers/block/Kconfig +16 -0
@@ -35,6 +35,22 @@ config BLK_DEV_FD To compile this driver as a module, choose M here: the module will be called floppy. +config BLK_DEV_FD_RAWCMD + bool "Support for raw floppy disk commands (DEPRECATED)" + depends on BLK_DEV_FD + help + If you want to use actual physical floppies and expect to do + special low-level hardware accesses to them (access and use + non-standard formats, for example), then enable this. + + Note that the code enabled by this option is rarely used and + might be unstable or insecure, and distros should not enable it. + + Note: FDRAWCMD is deprecated and will be removed from the kernel + in the near future. + + If unsure, say N. + config AMIGA_FLOPPY tristate "Amiga floppy support" depends on AMIGA
drivers/block/floppy.c +32 -11
67 lines not on this page · raw message
drivers/bus/sunxi-rsb.c +2 -0
@@ -224,6 +224,8 @@ static struct sunxi_rsb_device *sunxi_rsb_device_create(struct sunxi_rsb *rsb,dev_dbg (&rdev->dev,"device %s registered\n" ,dev_name (&rdev->dev)); +return rdev; + err_device_add:put_device (&rdev->dev);
drivers/clk/sunxi/clk-sun9i-mmc.c +2 -0
@@ -117,6 +117,8 @@ static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev)spin_lock_init (&data->lock); r =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (!r) +return -EINVAL ;/* one clock/reset pair per word */ count =DIV_ROUND_UP ((resource_size (r)),SUN9I_MMC_WIDTH ); data->membase =devm_ioremap_resource (&pdev->dev, r);
drivers/firewire/core-card.c +3 -0
@@ -681,6 +681,7 @@ EXPORT_SYMBOL_GPL(fw_card_release);void fw_core_remove_card (struct fw_card *card) {struct fw_card_driver dummy_driver = dummy_driver_template; +unsigned long flags; card->driver->update_phy_reg (card,4 ,PHY_LINK_ACTIVE |PHY_CONTENDER ,0 );
@@ -695,7 +696,9 @@ void fw_core_remove_card(struct fw_card *card) dummy_driver.stop_iso = card->driver->stop_iso; card->driver = &dummy_driver; +spin_lock_irqsave (&card->lock, flags);fw_destroy_nodes (card); +spin_unlock_irqrestore (&card->lock, flags);/* Wait for all users, especially device workqueue jobs, to finish. */ fw_card_put (card);
drivers/firewire/core-cdev.c +3 -1
@@ -1495,6 +1495,7 @@ static void outbound_phy_packet_callback(struct fw_packet *packet, {struct outbound_phy_packet_event *e = container_of(packet, struct outbound_phy_packet_event, p); +struct client *e_client;switch (status) {/* expected: */
@@ -1511,9 +1512,10 @@ static void outbound_phy_packet_callback(struct fw_packet *packet, } e->phy_packet.data[0 ] = packet->timestamp; + e_client = e->client;queue_event (e->client, &e->event, &e->phy_packet,sizeof (e->phy_packet) + e->phy_packet.length,NULL ,0 ); -client_put (e->client); +client_put (e_client); }static int ioctl_send_phy_packet (struct client *client,union ioctl_arg *arg)
drivers/firewire/core-topology.c +3 -6
@@ -387,16 +387,13 @@ static void report_found_node(struct fw_card *card, card->bm_retries =0 ; } +/* Must be called with card->lock held */ void fw_destroy_nodes (struct fw_card *card) { -unsigned long flags; - -spin_lock_irqsave (&card->lock, flags); card->color++;if (card->local_node !=NULL )for_each_fw_node (card, card->local_node, report_lost_node); card->local_node =NULL ; -spin_unlock_irqrestore (&card->lock, flags); }static void move_tree (struct fw_node *node0,struct fw_node *node1,int port)
@@ -522,6 +519,8 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,struct fw_node *local_node;unsigned long flags; +spin_lock_irqsave (&card->lock, flags); +/* * If the selfID buffer is not the immediate successor of the * previously processed one, we cannot reliably compare the
@@ -533,8 +532,6 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, card->bm_retries =0 ; } -spin_lock_irqsave (&card->lock, flags); - card->broadcast_channel_allocated = card->broadcast_channel_auto_allocated; card->node_id = node_id;/*
drivers/firewire/core-transaction.c +16 -14
@@ -86,24 +86,25 @@ static int try_cancel_split_timeout(struct fw_transaction *t)static int close_transaction (struct fw_transaction *transaction,struct fw_card *card,int rcode) { -struct fw_transaction *t; +struct fw_transaction *t =NULL , *iter;unsigned long flags;spin_lock_irqsave (&card->lock, flags); -list_for_each_entry (t, &card->transaction_list, link) { -if (t == transaction) { -if (!try_cancel_split_timeout (t)) { +list_for_each_entry (iter, &card->transaction_list, link) { +if (iter == transaction) { +if (!try_cancel_split_timeout (iter)) {spin_unlock_irqrestore (&card->lock, flags); goto timed_out; } -list_del_init (&t->link); - card->tlabel_mask &= ~(1ULL << t->tlabel); +list_del_init (&iter->link); + card->tlabel_mask &= ~(1ULL << iter->tlabel); + t = iter;break ; } }spin_unlock_irqrestore (&card->lock, flags); -if (&t->link != &card->transaction_list) { +if (t) { t->callback (card, rcode,NULL ,0 , t->callback_data);return 0 ; }
@@ -938,7 +939,7 @@ EXPORT_SYMBOL(fw_core_handle_request);void fw_core_handle_response (struct fw_card *card,struct fw_packet *p) { -struct fw_transaction *t; +struct fw_transaction *t =NULL , *iter;unsigned long flags;u32 *data;size_t data_length;
@@ -950,20 +951,21 @@ void fw_core_handle_response(struct fw_card *card, struct fw_packet *p) rcode =HEADER_GET_RCODE (p->header[1 ]);spin_lock_irqsave (&card->lock, flags); -list_for_each_entry (t, &card->transaction_list, link) { -if (t->node_id == source && t->tlabel == tlabel) { -if (!try_cancel_split_timeout (t)) { +list_for_each_entry (iter, &card->transaction_list, link) { +if (iter->node_id == source && iter->tlabel == tlabel) { +if (!try_cancel_split_timeout (iter)) {spin_unlock_irqrestore (&card->lock, flags); goto timed_out; } -list_del_init (&t->link); - card->tlabel_mask &= ~(1ULL << t->tlabel); +list_del_init (&iter->link); + card->tlabel_mask &= ~(1ULL << iter->tlabel); + t = iter;break ; } }spin_unlock_irqrestore (&card->lock, flags); -if (&t->link == &card->transaction_list) { +if (!t) { timed_out:fw_notice (card,"unsolicited response (source %x, tlabel %x)\n" , source, tlabel);
drivers/firewire/sbp2.c +7 -6
@@ -421,7 +421,7 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request, void *payload, size_t length, void *callback_data) { struct sbp2_logical_unit *lu = callback_data; -struct sbp2_orb *orb; +struct sbp2_orb *orb =NULL , *iter;struct sbp2_status status;unsigned long flags;
@@ -446,17 +446,18 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request,/* Lookup the orb corresponding to this status write. */ spin_lock_irqsave (&lu->tgt->lock, flags); -list_for_each_entry (orb, &lu->orb_list, link) { +list_for_each_entry (iter, &lu->orb_list, link) {if (STATUS_GET_ORB_HIGH (status) ==0 && -STATUS_GET_ORB_LOW (status) == orb->request_bus) { - orb->rcode =RCODE_COMPLETE ; -list_del (&orb->link); +STATUS_GET_ORB_LOW (status) == iter->request_bus) { + iter->rcode =RCODE_COMPLETE ; +list_del (&iter->link); + orb = iter;break ; } }spin_unlock_irqrestore (&lu->tgt->lock, flags); -if (&orb->link != &lu->orb_list) { +if (orb) { orb->callback (orb, &status);kref_put (&orb->kref, free_orb);/* orb callback reference */ }else {
drivers/gpu/drm/vgem/vgem_drv.c +6 -3
@@ -190,9 +190,10 @@ static struct drm_gem_object *vgem_gem_create(struct drm_device *dev,return ERR_CAST (obj); ret =drm_gem_handle_create (file, &obj->base, handle); -drm_gem_object_put_unlocked (&obj->base); -if (ret) +if (ret) { +drm_gem_object_put_unlocked (&obj->base);return ERR_PTR (ret); + }return &obj->base; }
@@ -215,7 +216,9 @@ static int vgem_gem_dumb_create(struct drm_file *file, struct drm_device *dev, args->size = gem_object->size; args->pitch = pitch; -DRM_DEBUG_DRIVER ("Created object of size %lld\n" , size); +drm_gem_object_put_unlocked (gem_object); + +DRM_DEBUG_DRIVER ("Created object of size %llu\n" , args->size);return 0 ; }
drivers/hwmon/adt7470.c +2 -2
@@ -33,6 +33,7 @@#include <linux/kthread.h> #include <linux/slab.h> #include <linux/util_macros.h> +#include <linux/sched.h> /* Addresses to scan */ static const unsigned short normal_i2c[] = {0x2C ,0x2E ,0x2F ,I2C_CLIENT_END };
@@ -273,11 +274,10 @@ static int adt7470_update_thread(void *p)adt7470_read_temperatures (client, data);mutex_unlock (&data->lock); -set_current_state (TASK_INTERRUPTIBLE );if (kthread_should_stop ())break ; -schedule_timeout (msecs_to_jiffies (data->auto_update_interval)); +schedule_timeout_interruptible (msecs_to_jiffies (data->auto_update_interval)); }return 0 ;
drivers/iio/dac/ad5446.c +1 -1
@@ -171,7 +171,7 @@ static int ad5446_read_raw(struct iio_dev *indio_dev,switch (m) {case IIO_CHAN_INFO_RAW : - *val = st->cached_val; + *val = st->cached_val >> chan->scan_type.shift;return IIO_VAL_INT ;case IIO_CHAN_INFO_SCALE : *val = st->vref_mv;
drivers/iio/dac/ad5592r-base.c +1 -1
@@ -532,7 +532,7 @@ static int ad5592r_alloc_channels(struct ad5592r_state *st)if (!ret) st->channel_modes[reg] = tmp; -fwnode_property_read_u32 (child,"adi,off-state" , &tmp); + ret =fwnode_property_read_u32 (child,"adi,off-state" , &tmp);if (!ret) st->channel_offstate[reg] = tmp; }
drivers/iio/magnetometer/ak8975.c +1 -0
@@ -404,6 +404,7 @@ static int ak8975_power_on(const struct ak8975_data *data)if (ret) {dev_warn (&data->client->dev,"Failed to enable specified Vid supply\n" ); +regulator_disable (data->vdd);return ret; }/*
drivers/lightnvm/Kconfig +1 -1
@@ -4,7 +4,7 @@ menuconfig NVM bool "Open-Channel SSD target support" - depends on BLOCK && HAS_DMA + depends on BLOCK && HAS_DMA && BROKEN help Say Y here to get to enable Open-channel SSDs.
drivers/md/dm.c +12 -7
@@ -528,20 +528,19 @@ static void start_io_acct(struct dm_io *io) false, 0, &io->stats_aux); } -static void end_io_acct (struct dm_io *io) +static void end_io_acct (struct mapped_device *md,struct bio *bio, +unsigned long start_time,struct dm_stats_aux *stats_aux) { -struct mapped_device *md = io->md; -struct bio *bio = io->bio; -unsigned long duration = jiffies - io->start_time; +unsigned long duration = jiffies - start_time;int pending;int rw =bio_data_dir (bio); -generic_end_io_acct (md->queue, rw, &dm_disk (md)->part0, io->start_time); +generic_end_io_acct (md->queue, rw, &dm_disk (md)->part0, start_time);if (unlikely (dm_stats_used (&md->stats)))dm_stats_account_io (&md->stats,bio_data_dir (bio), bio->bi_iter.bi_sector,bio_sectors (bio), - true, duration, &io->stats_aux); + true, duration, stats_aux);/* * After this is decremented the bio must not be touched if it is
@@ -775,6 +774,8 @@ static void dec_pending(struct dm_io *io, blk_status_t error)blk_status_t io_error;struct bio *bio;struct mapped_device *md = io->md; +unsigned long start_time =0 ; +struct dm_stats_aux stats_aux;/* Push-back supersedes any I/O errors */ if (unlikely (error)) {
@@ -801,8 +802,10 @@ static void dec_pending(struct dm_io *io, blk_status_t error) io_error = io->status; bio = io->bio; -end_io_acct (io); + start_time = io->start_time; + stats_aux = io->stats_aux;free_io (md, io); +end_io_acct (md, bio, start_time, &stats_aux);if (io_error ==BLK_STS_DM_REQUEUE )return ;
@@ -2227,6 +2230,8 @@ static int dm_wait_for_completion(struct mapped_device *md, long task_state) }finish_wait (&md->wait, &wait); +smp_rmb ();/* paired with atomic_dec_return in end_io_acct */ +return r; }
drivers/mtd/nand/sh_flctl.c +8 -6
@@ -399,7 +399,8 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf,dma_addr_t dma_addr;dma_cookie_t cookie;uint32_t reg; -int ret; +int ret =0 ; +unsigned long time_left;if (dir ==DMA_FROM_DEVICE ) { chan = flctl->chan_fifo0_rx;
@@ -440,13 +441,14 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf, goto out; } - ret = + time_left =wait_for_completion_timeout (&flctl->dma_complete,msecs_to_jiffies (3000 )); -if (ret <=0 ) { +if (time_left ==0 ) {dmaengine_terminate_all (chan);dev_err (&flctl->pdev->dev,"wait_for_completion_timeout\n" ); + ret = -ETIMEDOUT ; } out:
@@ -456,7 +458,7 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf,dma_unmap_single (chan->device->dev, dma_addr, len, dir); -/* ret > 0 is success */ +/* ret == 0 is success */ return ret; }
@@ -480,7 +482,7 @@ static void read_fiforeg(struct sh_flctl *flctl, int rlen, int offset)/* initiate DMA transfer */ if (flctl->chan_fifo0_rx && rlen >=32 && -flctl_dma_fifo0_transfer (flctl, buf, rlen,DMA_FROM_DEVICE ) >0 ) + !flctl_dma_fifo0_transfer (flctl, buf, rlen,DMA_FROM_DEVICE )) goto convert;/* DMA success */ /* do polling transfer */
@@ -539,7 +541,7 @@ static void write_ec_fiforeg(struct sh_flctl *flctl, int rlen,/* initiate DMA transfer */ if (flctl->chan_fifo0_tx && rlen >=32 && -flctl_dma_fifo0_transfer (flctl, buf, rlen,DMA_TO_DEVICE ) >0 ) + !flctl_dma_fifo0_transfer (flctl, buf, rlen,DMA_TO_DEVICE ))return ;/* DMA success */ /* do polling transfer */
drivers/net/can/grcan.c +6 -2
@@ -252,6 +252,7 @@ struct grcan_device_config {struct grcan_priv {struct can_priv can;/* must be the first member */ struct net_device *dev; +struct device *ofdev_dev;struct napi_struct napi;struct grcan_registers __iomem *regs;/* ioremap'ed registers */
@@ -928,7 +929,7 @@ static void grcan_free_dma_buffers(struct net_device *dev)struct grcan_priv *priv =netdev_priv (dev);struct grcan_dma *dma = &priv->dma; -dma_free_coherent (&dev->dev, dma->base_size, dma->base_buf, +dma_free_coherent (priv->ofdev_dev, dma->base_size, dma->base_buf, dma->base_handle);memset (dma,0 ,sizeof (*dma)); }
@@ -953,7 +954,7 @@ static int grcan_allocate_dma_buffers(struct net_device *dev,/* Extra GRCAN_BUFFER_ALIGNMENT to allow for alignment */ dma->base_size = lsize + ssize +GRCAN_BUFFER_ALIGNMENT ; - dma->base_buf =dma_alloc_coherent (&dev->dev, + dma->base_buf =dma_alloc_coherent (priv->ofdev_dev, dma->base_size, &dma->base_handle,GFP_KERNEL );
@@ -1117,8 +1118,10 @@ static int grcan_close(struct net_device *dev) priv->closing = true;if (priv->need_txbug_workaround) { +spin_unlock_irqrestore (&priv->lock, flags);del_timer_sync (&priv->hang_timer);del_timer_sync (&priv->rr_timer); +spin_lock_irqsave (&priv->lock, flags); }netif_stop_queue (dev);grcan_stop_hardware (dev);
@@ -1604,6 +1607,7 @@ static int grcan_setup_netdev(struct platform_device *ofdev,memcpy (&priv->config, &grcan_module_config,sizeof (struct grcan_device_config )); priv->dev = dev; + priv->ofdev_dev = &ofdev->dev; priv->regs = base; priv->can.bittiming_const = &grcan_bittiming_const; priv->can.do_set_bittiming = grcan_set_bittiming;
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +5 -4
@@ -14317,10 +14317,6 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)/* Stop Tx */ bnx2x_tx_disable (bp); -/* Delete all NAPI objects */ -bnx2x_del_all_napi (bp); -if (CNIC_LOADED (bp)) -bnx2x_del_all_napi_cnic (bp);netdev_reset_tc (bp->dev);del_timer_sync (&bp->timer);
@@ -14425,6 +14421,11 @@ static pci_ers_result_t bnx2x_io_slot_reset(struct pci_dev *pdev)bnx2x_drain_tx_queues (bp);bnx2x_send_unload_req (bp,UNLOAD_RECOVERY );bnx2x_netif_stop (bp,1 ); +bnx2x_del_all_napi (bp); + +if (CNIC_LOADED (bp)) +bnx2x_del_all_napi_cnic (bp); +bnx2x_free_irq (bp);/* Report UNLOAD_DONE to MCP */
drivers/net/ethernet/broadcom/genet/bcmgenet.c +7 -0
@@ -1522,6 +1522,11 @@ static struct sk_buff *bcmgenet_put_tx_csum(struct net_device *dev,return skb; } +static void bcmgenet_hide_tsb (struct sk_buff *skb) +{ +__skb_pull (skb,sizeof (struct status_64 )); +} +static netdev_tx_t bcmgenet_xmit (struct sk_buff *skb,struct net_device *dev) {struct bcmgenet_priv *priv =netdev_priv (dev);
@@ -1632,6 +1637,8 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev) }GENET_CB (skb)->last_cb = tx_cb_ptr; + +bcmgenet_hide_tsb (skb);skb_tx_timestamp (skb);/* Decrement total BD count and advance our write pointer */
drivers/net/ethernet/smsc/smsc911x.c +1 -1
@@ -2446,7 +2446,7 @@ static int smsc911x_drv_probe(struct platform_device *pdev)if (irq == -EPROBE_DEFER ) { retval = -EPROBE_DEFER ; goto out_0; - }else if (irq <=0 ) { + }else if (irq <0 ) {pr_warn ("Could not allocate irq resource\n" ); retval = -ENODEV ; goto out_0;
drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c +8 -0
@@ -68,6 +68,10 @@#define TSE_PCS_USE_SGMII_ENA BIT(0)#define TSE_PCS_IF_USE_SGMII 0x03 +#define SGMII_ADAPTER_CTRL_REG 0x00 +#define SGMII_ADAPTER_DISABLE 0x0001 +#define SGMII_ADAPTER_ENABLE 0x0000 +#define AUTONEGO_LINK_TIMER 20static int tse_pcs_reset (void __iomem *base,struct tse_pcs *pcs)
@@ -211,8 +215,12 @@ void tse_pcs_fix_mac_speed(struct tse_pcs *pcs, struct phy_device *phy_dev, unsigned int speed) {void __iomem *tse_pcs_base = pcs->tse_pcs_base; +void __iomem *sgmii_adapter_base = pcs->sgmii_adapter_base;u32 val; +writew (SGMII_ADAPTER_ENABLE , + sgmii_adapter_base +SGMII_ADAPTER_CTRL_REG ); + pcs->autoneg = phy_dev->autoneg;if (phy_dev->autoneg ==AUTONEG_ENABLE ) {
drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.h +0 -4
@@ -21,10 +21,6 @@#include <linux/phy.h> #include <linux/timer.h> -#define SGMII_ADAPTER_CTRL_REG 0x00 -#define SGMII_ADAPTER_ENABLE 0x0000 -#define SGMII_ADAPTER_DISABLE 0x0001 -struct tse_pcs {struct device *dev;void __iomem *tse_pcs_base;
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c +8 -5
@@ -29,6 +29,9 @@#include "altr_tse_pcs.h" +#define SGMII_ADAPTER_CTRL_REG 0x00 +#define SGMII_ADAPTER_DISABLE 0x0001 +#define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII 0x0#define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII 0x1#define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RMII 0x2
@@ -62,14 +65,16 @@ static void socfpga_dwmac_fix_mac_speed(void *priv, unsigned int speed) {struct socfpga_dwmac *dwmac = (struct socfpga_dwmac *)priv;void __iomem *splitter_base = dwmac->splitter_base; +void __iomem *tse_pcs_base = dwmac->pcs.tse_pcs_base;void __iomem *sgmii_adapter_base = dwmac->pcs.sgmii_adapter_base;struct device *dev = dwmac->dev;struct net_device *ndev =dev_get_drvdata (dev);struct phy_device *phy_dev = ndev->phydev;u32 val; -writew (SGMII_ADAPTER_DISABLE , - sgmii_adapter_base +SGMII_ADAPTER_CTRL_REG ); +if ((tse_pcs_base) && (sgmii_adapter_base)) +writew (SGMII_ADAPTER_DISABLE , + sgmii_adapter_base +SGMII_ADAPTER_CTRL_REG );if (splitter_base) { val =readl (splitter_base +EMAC_SPLITTER_CTRL_REG );
@@ -91,9 +96,7 @@ static void socfpga_dwmac_fix_mac_speed(void *priv, unsigned int speed)writel (val, splitter_base +EMAC_SPLITTER_CTRL_REG ); } -writew (SGMII_ADAPTER_ENABLE , - sgmii_adapter_base +SGMII_ADAPTER_CTRL_REG ); -if (phy_dev) +if (tse_pcs_base && sgmii_adapter_base)tse_pcs_fix_mac_speed (&dwmac->pcs, phy_dev, speed); }
drivers/net/ethernet/xilinx/xilinx_emaclite.c +12 -3
@@ -817,10 +817,10 @@ static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg,static int xemaclite_mdio_setup (struct net_local *lp,struct device *dev) {struct mii_bus *bus; -int rc;struct resource res;struct device_node *np =of_get_parent (lp->phy_node);struct device_node *npp; +int rc, ret;/* Don't register the MDIO bus if the phy_node or its parent node * can't be found.
@@ -830,8 +830,14 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)return -ENODEV ; } npp =of_get_parent (np); - -of_address_to_resource (npp,0 , &res); + ret =of_address_to_resource (npp,0 , &res); +of_node_put (npp); +if (ret) { +dev_err (dev,"%s resource error!\n" , + dev->of_node->full_name); +of_node_put (np); +return ret; + }if (lp->ndev->mem_start != res.start) {struct phy_device *phydev; phydev =of_phy_find_device (lp->phy_node);
@@ -840,6 +846,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) "MDIO of the phy is not registered yet\n"); else put_device(&phydev->mdio.dev); +of_node_put (np);return 0 ; }
@@ -852,6 +859,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) bus =mdiobus_alloc ();if (!bus) {dev_err (dev,"Failed to allocate mdiobus\n" ); +of_node_put (np);return -ENOMEM ; }
@@ -866,6 +874,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) lp->mii_bus = bus; rc =of_mdiobus_register (bus, np); +of_node_put (np);if (rc) {dev_err (dev,"Failed to register mdio bus.\n" ); goto err_register;
drivers/net/hamradio/6pack.c +3 -2
@@ -311,7 +311,6 @@ static void sp_setup(struct net_device *dev) {/* Finish setting up the DEVICE info. */ dev->netdev_ops = &sp_netdev_ops; - dev->needs_free_netdev = true; dev->mtu =SIXP_MTU ; dev->hard_header_len =AX25_MAX_HEADER_LEN ; dev->header_ops = &ax25_header_ops;
@@ -690,9 +689,11 @@ static void sixpack_close(struct tty_struct *tty)del_timer_sync (&sp->tx_t);del_timer_sync (&sp->resync_t); -/* Free all 6pack frame buffers. */ +/* Free all 6pack frame buffers after unreg. */ kfree (sp->rbuff);kfree (sp->xbuff); + +free_netdev (sp->dev); }/* Perform I/O control on an active 6pack channel. */
drivers/net/hippi/rrunner.c +2 -0
@@ -1354,7 +1354,9 @@ static int rr_close(struct net_device *dev) rrpriv->fw_running =0 ; +spin_unlock_irqrestore (&rrpriv->lock, flags);del_timer_sync (&rrpriv->timer); +spin_lock_irqsave (&rrpriv->lock, flags);writel (0 , ®s->TxPi);writel (0 , ®s->IpRxPi);
drivers/nfc/nfcmrvl/main.c +1 -1
@@ -194,6 +194,7 @@ void nfcmrvl_nci_unregister_dev(struct nfcmrvl_private *priv) {struct nci_dev *ndev = priv->ndev; +nci_unregister_device (ndev);if (priv->ndev->nfc_dev->fw_download_in_progress)nfcmrvl_fw_dnld_abort (priv);
@@ -202,7 +203,6 @@ void nfcmrvl_nci_unregister_dev(struct nfcmrvl_private *priv)if (gpio_is_valid (priv->config.reset_n_io))gpio_free (priv->config.reset_n_io); -nci_unregister_device (ndev);nci_free_device (ndev);kfree (priv); }
drivers/pci/host/pci-aardvark.c +7 -9
@@ -104,6 +104,7 @@#define PCIE_MSI_ADDR_HIGH_REG (CONTROL_BASE_ADDR + 0x54)#define PCIE_MSI_STATUS_REG (CONTROL_BASE_ADDR + 0x58)#define PCIE_MSI_MASK_REG (CONTROL_BASE_ADDR + 0x5C) +#define PCIE_MSI_ALL_MASK GENMASK(31, 0)#define PCIE_MSI_PAYLOAD_REG (CONTROL_BASE_ADDR + 0x9C)#define PCIE_MSI_DATA_MASK GENMASK(15, 0)
@@ -490,6 +491,7 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie)advk_writel (pcie, reg,PCIE_CORE_CTRL2_REG );/* Clear all interrupts */ +advk_writel (pcie,PCIE_MSI_ALL_MASK ,PCIE_MSI_STATUS_REG );advk_writel (pcie,PCIE_ISR0_ALL_MASK ,PCIE_ISR0_REG );advk_writel (pcie,PCIE_ISR1_ALL_MASK ,PCIE_ISR1_REG );advk_writel (pcie,PCIE_IRQ_ALL_MASK ,HOST_CTRL_INT_STATUS_REG );
@@ -502,7 +504,7 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie)advk_writel (pcie,PCIE_ISR1_ALL_MASK ,PCIE_ISR1_MASK_REG );/* Unmask all MSI's */ -advk_writel (pcie,0 ,PCIE_MSI_MASK_REG ); +advk_writel (pcie, ~(u32 )PCIE_MSI_ALL_MASK ,PCIE_MSI_MASK_REG );/* Enable summary interrupt for GIC SPI source */ reg =PCIE_IRQ_ALL_MASK & (~PCIE_IRQ_ENABLE_INTS_MASK );
@@ -1034,23 +1036,19 @@ static void advk_pcie_remove_irq_domain(struct advk_pcie *pcie)static void advk_pcie_handle_msi (struct advk_pcie *pcie) {u32 msi_val, msi_mask, msi_status, msi_idx; -u16 msi_data; +int virq; msi_mask =advk_readl (pcie,PCIE_MSI_MASK_REG ); msi_val =advk_readl (pcie,PCIE_MSI_STATUS_REG ); - msi_status = msi_val & ~msi_mask; + msi_status = msi_val & ((~msi_mask) &PCIE_MSI_ALL_MASK );for (msi_idx =0 ; msi_idx <MSI_IRQ_NUM ; msi_idx++) {if (!(BIT (msi_idx) & msi_status))continue ; -/* -* msi_idx contains bits [4:0] of the msi_data and msi_data -* contains 16bit MSI interrupt number -*/ advk_writel (pcie,BIT (msi_idx),PCIE_MSI_STATUS_REG ); - msi_data =advk_readl (pcie,PCIE_MSI_PAYLOAD_REG ) &PCIE_MSI_DATA_MASK ; -generic_handle_irq (msi_data); + virq =irq_find_mapping (pcie->msi_inner_domain, msi_idx); +generic_handle_irq (virq); } advk_writel(pcie, PCIE_ISR0_MSI_INT_PENDING,
drivers/phy/samsung/phy-exynos5250-sata.c +15 -6
@@ -193,6 +193,7 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)return -EINVAL ; sata_phy->client =of_find_i2c_device_by_node (node); +of_node_put (node);if (!sata_phy->client)return -EPROBE_DEFER ;
@@ -201,20 +202,21 @@ static int exynos_sata_phy_probe(struct platform_device *pdev) sata_phy->phyclk =devm_clk_get (dev,"sata_phyctrl" );if (IS_ERR (sata_phy->phyclk)) {dev_err (dev,"failed to get clk for PHY\n" ); -return PTR_ERR (sata_phy->phyclk); + ret =PTR_ERR (sata_phy->phyclk); + goto put_dev; } ret =clk_prepare_enable (sata_phy->phyclk);if (ret <0 ) {dev_err (dev,"failed to enable source clk\n" ); -return ret; + goto put_dev; } sata_phy->phy =devm_phy_create (dev,NULL , &exynos_sata_phy_ops);if (IS_ERR (sata_phy->phy)) { -clk_disable_unprepare (sata_phy->phyclk);dev_err (dev,"failed to create PHY\n" ); -return PTR_ERR (sata_phy->phy); + ret =PTR_ERR (sata_phy->phy); + goto clk_disable; }phy_set_drvdata (sata_phy->phy, sata_phy);
@@ -222,11 +224,18 @@ static int exynos_sata_phy_probe(struct platform_device *pdev) phy_provider =devm_of_phy_provider_register (dev, of_phy_simple_xlate);if (IS_ERR (phy_provider)) { -clk_disable_unprepare (sata_phy->phyclk); -return PTR_ERR (phy_provider); + ret =PTR_ERR (phy_provider); + goto clk_disable; }return 0 ; + +clk_disable: +clk_disable_unprepare (sata_phy->phyclk); +put_dev: +put_device (&sata_phy->client->dev); + +return ret; }static const struct of_device_id exynos_sata_phy_of_match[] = {
drivers/pinctrl/pinctrl-pistachio.c +3 -3
@@ -1374,10 +1374,10 @@ static int pistachio_gpio_register(struct pistachio_pinctrl *pctl) } irq =irq_of_parse_and_map (child,0 ); -if (irq <0 ) { -dev_err (pctl->dev,"No IRQ for bank %u: %d\n" , i, irq); +if (!irq) { +dev_err (pctl->dev,"No IRQ for bank %u\n" , i);of_node_put (child); - ret = irq; + ret = -EINVAL ; goto err; }
drivers/tty/n_gsm.c +21 -19
@@ -84,6 +84,8 @@ module_param(debug, int, 0600);*/ #define MAX_MRU 1500#define MAX_MTU 1500 +/* SOF, ADDR, CTRL, LEN1, LEN2, ..., FCS, EOF */ +#define PROT_OVERHEAD 7#define GSM_NET_TX_TIMEOUT (HZ*10)/**
@@ -835,7 +837,7 @@ static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)break ;case 2 :/* Unstructed with modem bits. Always one byte as we never send inline break data */ - *dp++ =gsm_encode_modem (dlci); + *dp++ = (gsm_encode_modem (dlci) <<1 ) |EA ;break ; }WARN_ON (kfifo_out_locked (dlci->fifo, dp , len, &dlci->lock) != len);
@@ -1312,11 +1314,12 @@ static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,static void gsm_control_transmit (struct gsm_mux *gsm,struct gsm_control *ctrl) { -struct gsm_msg *msg =gsm_data_alloc (gsm,0 , ctrl->len +1 , gsm->ftype); +struct gsm_msg *msg =gsm_data_alloc (gsm,0 , ctrl->len +2 , gsm->ftype);if (msg ==NULL )return ; - msg->data[0 ] = (ctrl->cmd <<1 ) |2 |EA ;/* command */ -memcpy (msg->data +1 , ctrl->data, ctrl->len); + msg->data[0 ] = (ctrl->cmd <<1 ) |CR |EA ;/* command */ + msg->data[1 ] = (ctrl->len <<1 ) |EA ; +memcpy (msg->data +2 , ctrl->data, ctrl->len);gsm_data_queue (gsm->dlci[0 ], msg); }
@@ -1339,7 +1342,6 @@ static void gsm_control_retransmit(unsigned long data)spin_lock_irqsave (&gsm->control_lock, flags); ctrl = gsm->pending_cmd;if (ctrl) { - gsm->cretries--;if (gsm->cretries ==0 ) { gsm->pending_cmd =NULL ; ctrl->error = -ETIMEDOUT ;
@@ -1348,6 +1350,7 @@ static void gsm_control_retransmit(unsigned long data)wake_up (&gsm->event);return ; } + gsm->cretries--;gsm_control_transmit (gsm, ctrl);mod_timer (&gsm->t2_timer, jiffies + gsm->t2 *HZ /100 ); }
@@ -1388,7 +1391,7 @@ static struct gsm_control *gsm_control_send(struct gsm_mux *gsm,/* If DLCI0 is in ADM mode skip retries, it won't respond */ if (gsm->dlci[0 ]->mode ==DLCI_MODE_ADM ) - gsm->cretries =1 ; + gsm->cretries =0 ;else gsm->cretries = gsm->n2;
@@ -1822,7 +1825,6 @@ static void gsm_queue(struct gsm_mux *gsm)gsm_response (gsm, address,UA );gsm_dlci_close (dlci);break ; -case UA :case UA |PF :if (cr ==0 || dlci ==NULL )break ;
@@ -1973,7 +1975,8 @@ static void gsm1_receive(struct gsm_mux *gsm, unsigned char c) }/* Any partial frame was a runt so go back to start */ if (gsm->state !=GSM_START ) { - gsm->malformed++; +if (gsm->state !=GSM_SEARCH ) + gsm->malformed++; gsm->state =GSM_START ; }/* A SOF in GSM_START means we are still reading idling or
@@ -2110,6 +2113,7 @@ static void gsm_cleanup_mux(struct gsm_mux *gsm)gsm_dlci_release (gsm->dlci[i]);mutex_unlock (&gsm->mutex);/* Now wipe the queues */ +tty_ldisc_flush (gsm->tty);list_for_each_entry_safe (txq, ntxq, &gsm->tx_list, list)kfree (txq);INIT_LIST_HEAD (&gsm->tx_list);
@@ -2210,7 +2214,7 @@ static struct gsm_mux *gsm_alloc_mux(void)kfree (gsm);return NULL ; } - gsm->txframe =kmalloc (2 *MAX_MRU +2 ,GFP_KERNEL ); + gsm->txframe =kmalloc (2 * (MAX_MTU +PROT_OVERHEAD -1 ),GFP_KERNEL );if (gsm->txframe ==NULL ) {kfree (gsm->buf);kfree (gsm);
@@ -2527,7 +2531,7 @@ static int gsmld_config(struct tty_struct *tty, struct gsm_mux *gsm,/* Check the MRU/MTU range looks sane */ if (c->mru >MAX_MRU || c->mtu >MAX_MTU || c->mru <8 || c->mtu <8 )return -EINVAL ; -if (c->n2 <3 ) +if (c->n2 >255 )return -EINVAL ;if (c->encapsulation >1 )/* Basic, advanced, no I */ return -EINVAL ;
@@ -2870,19 +2874,17 @@ static struct tty_ldisc_ops tty_ldisc_packet = {static int gsmtty_modem_update (struct gsm_dlci *dlci,u8 brk) { -u8 modembits[5 ]; +u8 modembits[3 ];struct gsm_control *ctrl;int len =2 ; -if (brk) + modembits[0 ] = (dlci->addr <<2 ) |2 |EA ;/* DLCI, Valid, EA */ + modembits[1 ] = (gsm_encode_modem (dlci) <<1 ) |EA ; +if (brk) { + modembits[2 ] = (brk <<4 ) |2 |EA ;/* Length, Break, EA */ len++; - - modembits[0 ] = len <<1 |EA ;/* Data bytes */ - modembits[1 ] = dlci->addr <<2 |3 ;/* DLCI, EA, 1 */ - modembits[2 ] =gsm_encode_modem (dlci) <<1 |EA ; -if (brk) - modembits[3 ] = brk <<4 |2 |EA ;/* Valid, EA */ - ctrl =gsm_control_send (dlci->gsm,CMD_MSC , modembits, len +1 ); + } + ctrl =gsm_control_send (dlci->gsm,CMD_MSC , modembits, len);if (ctrl ==NULL )return -ENOMEM ;return gsm_control_wait (dlci->gsm, ctrl);
drivers/tty/serial/8250/8250_pci.c +4 -4
@@ -2668,7 +2668,7 @@ enum pci_board_num_t { pbn_panacom2, pbn_panacom4, pbn_plx_romulus, - pbn_endrun_2_4000000, + pbn_endrun_2_3906250, pbn_oxsemi, pbn_oxsemi_1_4000000, pbn_oxsemi_2_4000000,
@@ -3184,10 +3184,10 @@ static struct pciserial_board pci_boards[] = {* signal now many ports are available * 2 port 952 Uart support */ - [pbn_endrun_2_4000000] = { + [pbn_endrun_2_3906250] = { .flags = FL_BASE0, .num_ports = 2, - .base_baud = 4000000, + .base_baud = 3906250, .uart_offset = 0x200, .first_offset = 0x1000, },
@@ -4039,7 +4039,7 @@ static const struct pci_device_id serial_pci_tbl[] = {*/ {PCI_VENDOR_ID_ENDRUN ,PCI_DEVICE_ID_ENDRUN_1588 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , - pbn_endrun_2_4000000 }, + pbn_endrun_2_3906250 },/* * Quatech cards. These actually have configurable clocks but for * now we just use the default.
drivers/tty/serial/8250/8250_port.c +1 -1
@@ -3240,7 +3240,7 @@ static void serial8250_console_restore(struct uart_8250_port *up)serial8250_set_divisor (port, baud, quot, frac);serial_port_out (port,UART_LCR , up->lcr); -serial8250_out_MCR (up,UART_MCR_DTR |UART_MCR_RTS ); +serial8250_out_MCR (up, up->mcr |UART_MCR_DTR |UART_MCR_RTS ); }/*
drivers/usb/core/quirks.c +6 -0
@@ -243,6 +243,9 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x0b05, 0x17e0), .driver_info = USB_QUIRK_IGNORE_REMOTE_WAKEUP }, + /* Realtek Semiconductor Corp. Mass Storage Device (Multicard Reader)*/ + { USB_DEVICE(0x0bda, 0x0151), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS }, + /* Realtek hub in Dell WD19 (Type-C) */ { USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM }, { USB_DEVICE(0x0bda, 0x5487), .driver_info = USB_QUIRK_RESET_RESUME },
@@ -325,6 +328,9 @@ static const struct usb_device_id usb_quirk_list[] = {/* DJI CineSSD */ { USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM }, + /* VCOM device */ + { USB_DEVICE(0x4296, 0x7570), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS }, + /* INTEL VALUE SSD */ { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
drivers/usb/gadget/configfs.c +2 -0
@@ -1411,6 +1411,8 @@ static void configfs_composite_unbind(struct usb_gadget *gadget)usb_ep_autoconfig_reset (cdev->gadget);spin_lock_irqsave (&gi->spinlock, flags); cdev->gadget =NULL ; + cdev->deactivations =0 ; + gadget->deactivated = false;set_gadget_data (gadget,NULL );spin_unlock_irqrestore (&gi->spinlock, flags); }
drivers/usb/gadget/function/uvc_queue.c +2 -0
@@ -246,6 +246,8 @@ void uvcg_queue_cancel(struct uvc_video_queue *queue, int disconnect) buf->state =UVC_BUF_STATE_ERROR ;vb2_buffer_done (&buf->buf.vb2_buf,VB2_BUF_STATE_ERROR ); } + queue->buf_used =0 ; +/* This must be protected by the irqlock spinlock to avoid race * conditions between uvc_queue_buffer and the disconnection event that * could result in an interruptible wait in uvc_dequeue_buffer. Do not
drivers/usb/host/xhci-ring.c +2 -0
@@ -2921,6 +2921,8 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd)if (event_loop++ <TRBS_PER_SEGMENT /2 )continue ;xhci_update_erst_dequeue (xhci, event_ring_deq); + event_ring_deq = xhci->event_ring->dequeue; + event_loop =0 ; }
drivers/usb/host/xhci.c +11 -0
@@ -724,6 +724,17 @@ void xhci_shutdown(struct usb_hcd *hcd)if (xhci->quirks &XHCI_SPURIOUS_REBOOT )usb_disable_xhci_ports (to_pci_dev (hcd->self.sysdev)); +/* Don't poll the roothubs after shutdown. */ +xhci_dbg (xhci,"%s: stopping usb%d port polling.\n" , + __func__, hcd->self.busnum); +clear_bit (HCD_FLAG_POLL_RH , &hcd->flags); +del_timer_sync (&hcd->rh_timer); + +if (xhci->shared_hcd) { +clear_bit (HCD_FLAG_POLL_RH , &xhci->shared_hcd->flags); +del_timer_sync (&xhci->shared_hcd->rh_timer); + } +spin_lock_irq (&xhci->lock);xhci_halt (xhci);/* Workaround for spurious wakeups at shutdown with HSW */
drivers/usb/misc/uss720.c +1 -2
@@ -84,6 +84,7 @@ static void destroy_priv(struct kref *kref)dev_dbg (&priv->usbdev->dev,"destroying priv datastructure\n" );usb_put_dev (priv->usbdev); + priv->usbdev =NULL ;kfree (priv); }
@@ -749,7 +750,6 @@ static int uss720_probe(struct usb_interface *intf,parport_announce_port (pp);usb_set_intfdata (intf, pp); -usb_put_dev (usbdev);return 0 ; probe_abort:
@@ -769,7 +769,6 @@ static void uss720_disconnect(struct usb_interface *intf)if (pp) { priv = pp->private_data; usbdev = priv->usbdev; - priv->usbdev =NULL ; priv->pp =NULL ;dev_dbg (&intf->dev,"parport_remove_port\n" );parport_remove_port (pp);
drivers/usb/mtu3/mtu3_dr.c +2 -4
@@ -39,10 +39,8 @@ enum mtu3_vbus_id_state {static void toggle_opstate (struct ssusb_mtk *ssusb) { -if (!ssusb->otg_switch.is_u3_drd) { -mtu3_setbits (ssusb->mac_base,U3D_DEVICE_CONTROL ,DC_SESSION ); -mtu3_setbits (ssusb->mac_base,U3D_POWER_MANAGEMENT ,SOFT_CONN ); - } +mtu3_setbits (ssusb->mac_base,U3D_DEVICE_CONTROL ,DC_SESSION ); +mtu3_setbits (ssusb->mac_base,U3D_POWER_MANAGEMENT ,SOFT_CONN ); }/* only port0 supports dual-role mode */
drivers/usb/serial/cp210x.c +2 -0
@@ -198,6 +198,8 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ { USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */ { USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */ + { USB_DEVICE(0x17A8, 0x0101) }, /* Kamstrup 868 MHz wM-Bus C-Mode Meter Reader (Int Ant) */ + { USB_DEVICE(0x17A8, 0x0102) }, /* Kamstrup 868 MHz wM-Bus C-Mode Meter Reader (Ext Ant) */ { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
drivers/usb/serial/option.c +12 -0
@@ -435,6 +435,8 @@ static void option_instat_callback(struct urb *urb);#define CINTERION_PRODUCT_CLS8 0x00b0#define CINTERION_PRODUCT_MV31_MBIM 0x00b3#define CINTERION_PRODUCT_MV31_RMNET 0x00b7 +#define CINTERION_PRODUCT_MV32_WA 0x00f1 +#define CINTERION_PRODUCT_MV32_WB 0x00f2/* Olivetti products */ #define OLIVETTI_VENDOR_ID 0x0b3c
@@ -1220,6 +1222,10 @@ 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, 0x1057, 0xff), /* Telit FN980 */ + .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1058, 0xff), /* Telit FN980 (PCIe) */ + .driver_info = NCTRL(0) | RSVD(1) }, { 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) */
@@ -1236,6 +1242,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1073, 0xff), /* Telit FN990 (ECM) */ .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff), /* Telit FN990 (PCIe) */ + .driver_info = RSVD(0) }, { 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),
@@ -1972,6 +1980,10 @@ static const struct usb_device_id option_ids[] = { .driver_info = RSVD(3)}, { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_RMNET, 0xff), .driver_info = RSVD(0)}, + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WA, 0xff), + .driver_info = RSVD(3)}, + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WB, 0xff), + .driver_info = RSVD(3)}, { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100), .driver_info = RSVD(4) }, { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD120),
drivers/usb/serial/whiteheat.c +2 -3
@@ -615,9 +615,8 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command,switch (command) {case WHITEHEAT_GET_DTR_RTS : info =usb_get_serial_port_data (port); -memcpy (&info->mcr, command_info->result_buffer, -sizeof (struct whiteheat_dr_info )); -break ; + info->mcr = command_info->result_buffer[0 ]; +break ; } } exit:
fs/btrfs/tree-log.c +13 -1
@@ -4868,6 +4868,18 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans,mutex_lock (&inode->log_mutex); } +/* +* For symlinks, we must always log their content, which is stored in an +* inline extent, otherwise we could end up with an empty symlink after +* log replay, which is invalid on linux (symlink(2) returns -ENOENT if +* one attempts to create an empty symlink). +* We don't need to worry about flushing delalloc, because when we create +* the inline extent when the symlink is created (we never have delalloc +* for symlinks). +*/ +if (S_ISLNK (inode->vfs_inode.i_mode)) + inode_only =LOG_INODE_ALL ; +/* * a brute force approach to making sure we get the most uptodate * copies of everything.
@@ -5430,7 +5442,7 @@ static int log_new_dir_dentries(struct btrfs_trans_handle *trans, } ctx->log_new_dentries = false; -if (type ==BTRFS_FT_DIR || type ==BTRFS_FT_SYMLINK ) +if (type ==BTRFS_FT_DIR ) log_mode =LOG_INODE_ALL ; ret =btrfs_log_inode (trans, root,BTRFS_I (di_inode), log_mode,0 ,LLONG_MAX , ctx);
fs/cifs/smb2ops.c +8 -0
@@ -855,9 +855,17 @@ smb2_copychunk_range(const unsigned int xid,int chunks_copied =0 ;bool chunk_sizes_updated = false;ssize_t bytes_written, total_bytes_written =0 ; +struct inode *inode; pcchunk =kmalloc (sizeof (struct copychunk_ioctl ),GFP_KERNEL ); +/* +* We need to flush all unwritten data before we can send the +* copychunk ioctl to the server. +*/ + inode =d_inode (trgtfile->dentry); +filemap_write_and_wait (inode->i_mapping); +if (pcchunk ==NULL )return -ENOMEM ;
include/linux/kernel.h +1 -1
@@ -582,7 +582,7 @@ static inline char *hex_byte_pack_upper(char *buf, u8 byte)return buf; } -extern int hex_to_bin (char ch); +extern int hex_to_bin (unsigned char ch);extern int __must_check hex2bin (u8 *dst,const char *src,size_t count);extern char *bin2hex (char *dst,const void *src,size_t count);
include/net/tcp.h +1 -0
@@ -585,6 +585,7 @@ void tcp_synack_rtt_meas(struct sock *sk, struct request_sock *req);void tcp_reset (struct sock *sk);void tcp_skb_mark_lost_uncond_verify (struct tcp_sock *tp,struct sk_buff *skb);void tcp_fin (struct sock *sk); +void tcp_check_space (struct sock *sk);/* tcp_timer.c */ void tcp_init_xmit_timers (struct sock *);
lib/hexdump.c +31 -10
56 lines not on this page · raw message
net/ipv4/igmp.c +6 -3
@@ -2368,9 +2368,10 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct newpsl->sl_addr[i] = psl->sl_addr[i];/* decrease mem now to avoid the memleak warning */ atomic_sub (IP_SFLSIZE (psl->sl_max), &sk->sk_omem_alloc); -kfree_rcu (psl, rcu); }rcu_assign_pointer (pmc->sflist, newpsl); +if (psl) +kfree_rcu (psl, rcu); psl = newpsl; } rv =1 ;/* > 0 for insert logic below if sl_count is 0 */
@@ -2468,11 +2469,13 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex) psl->sl_count, psl->sl_addr, 0);/* decrease mem now to avoid the memleak warning */ atomic_sub (IP_SFLSIZE (psl->sl_max), &sk->sk_omem_alloc); -kfree_rcu (psl, rcu); - }else + }else { (void )ip_mc_del_src (in_dev, &msf->imsf_multiaddr, pmc->sfmode,0 ,NULL ,0 ); + }rcu_assign_pointer (pmc->sflist, newpsl); +if (psl) +kfree_rcu (psl, rcu); pmc->sfmode = msf->imsf_fmode; err =0 ; done:
net/ipv4/ip_gre.c +3 -5
@@ -429,14 +429,12 @@ static void __gre_xmit(struct sk_buff *skb, struct net_device *dev, __be16 proto) {struct ip_tunnel *tunnel =netdev_priv (dev); - -if (tunnel->parms.o_flags &TUNNEL_SEQ ) - tunnel->o_seqno++; +__be16 flags = tunnel->parms.o_flags;/* Push GRE header. */ gre_build_header (skb, tunnel->tun_hlen, - tunnel->parms.o_flags, proto, tunnel->parms.o_key, -htonl (tunnel->o_seqno)); + flags, proto, tunnel->parms.o_key, + (flags &TUNNEL_SEQ ) ?htonl (tunnel->o_seqno++) :0 );ip_tunnel_xmit (skb, dev, tnl_params, tnl_params->protocol); }
net/ipv4/tcp_input.c +11 -1
@@ -5114,7 +5114,17 @@ static void tcp_new_space(struct sock *sk) sk->sk_write_space (sk); } -static void tcp_check_space (struct sock *sk) +/* Caller made space either from: +* 1) Freeing skbs in rtx queues (after tp->snd_una has advanced) +* 2) Sent skbs from output queue (and thus advancing tp->snd_nxt) +* +* We might be able to generate EPOLLOUT to the application if: +* 1) Space consumed in output/rtx queues is below sk->sk_sndbuf/2 +* 2) notsent amount (tp->write_seq - tp->snd_nxt) became +* small enough that tcp_stream_memory_free() decides it +* is time to generate EPOLLOUT. +*/ +void tcp_check_space (struct sock *sk) {if (sock_flag (sk,SOCK_QUEUE_SHRUNK )) {sock_reset_flag (sk,SOCK_QUEUE_SHRUNK );
net/ipv4/tcp_output.c +1 -0
@@ -81,6 +81,7 @@ static void tcp_event_new_data_sent(struct sock *sk, const struct sk_buff *skb)NET_ADD_STATS (sock_net (sk),LINUX_MIB_TCPORIGDATASENT ,tcp_skb_pcount (skb)); +tcp_check_space (sk); }/* SND.NXT, if window was not shrunk or the amount of shrunk was less than one
net/ipv6/addrconf.c +6 -2
@@ -3580,6 +3580,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)struct list_head del_list;int _keep_addr;bool keep_addr; +bool was_ready;int state, i;ASSERT_RTNL ();
@@ -3643,7 +3644,10 @@ static int addrconf_ifdown(struct net_device *dev, int how)addrconf_del_rs_timer (idev); -/* Step 2: clear flags for stateless addrconf */ +/* Step 2: clear flags for stateless addrconf, repeated down +* detection +*/ + was_ready = idev->if_flags &IF_READY ;if (!how) idev->if_flags &= ~(IF_RS_SENT |IF_RA_RCVD |IF_READY );
@@ -3730,7 +3734,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)if (how) {ipv6_ac_destroy_dev (idev);ipv6_mc_destroy_dev (idev); - }else { + }else if (was_ready) {ipv6_mc_down (idev); }
net/netfilter/ipvs/ip_vs_conn.c +1 -1
@@ -1432,7 +1432,7 @@ int __init ip_vs_conn_init(void)pr_info ("Connection hash table configured " "(size=%d, memory=%ldKbytes)\n" , ip_vs_conn_tab_size, - (long )(ip_vs_conn_tab_size*sizeof (struct list_head ))/1024 ); + (long )(ip_vs_conn_tab_size*sizeof (*ip_vs_conn_tab))/1024 );IP_VS_DBG (0 ,"Each connection entry needs %zd bytes at least\n" ,sizeof (struct ip_vs_conn ));
net/nfc/core.c +14 -15
@@ -50,7 +50,7 @@ int nfc_fw_download(struct nfc_dev *dev, const char *firmware_name)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -106,7 +106,7 @@ int nfc_dev_up(struct nfc_dev *dev)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -154,7 +154,7 @@ int nfc_dev_down(struct nfc_dev *dev)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -218,7 +218,7 @@ int nfc_start_poll(struct nfc_dev *dev, u32 im_protocols, u32 tm_protocols)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -257,7 +257,7 @@ int nfc_stop_poll(struct nfc_dev *dev)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -302,7 +302,7 @@ int nfc_dep_link_up(struct nfc_dev *dev, int target_index, u8 comm_mode)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -346,7 +346,7 @@ int nfc_dep_link_down(struct nfc_dev *dev)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -412,7 +412,7 @@ int nfc_activate_target(struct nfc_dev *dev, u32 target_idx, u32 protocol)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -458,7 +458,7 @@ int nfc_deactivate_target(struct nfc_dev *dev, u32 target_idx, u8 mode)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -505,7 +505,7 @@ int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb,device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ;kfree_skb (skb); goto error;
@@ -562,7 +562,7 @@ int nfc_enable_se(struct nfc_dev *dev, u32 se_idx)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -611,7 +611,7 @@ int nfc_disable_se(struct nfc_dev *dev, u32 se_idx)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -1142,6 +1142,7 @@ int nfc_register_device(struct nfc_dev *dev) dev->rfkill =NULL ; } } + dev->shutting_down = false;device_unlock (&dev->dev); rc =nfc_genl_device_added (dev);
@@ -1174,12 +1175,10 @@ void nfc_unregister_device(struct nfc_dev *dev)rfkill_unregister (dev->rfkill);rfkill_destroy (dev->rfkill); } + dev->shutting_down = true;device_unlock (&dev->dev);if (dev->ops->check_presence) { -device_lock (&dev->dev); - dev->shutting_down = true; -device_unlock (&dev->dev);del_timer_sync (&dev->check_pres_timer);cancel_work_sync (&dev->check_pres_work); }
net/nfc/netlink.c +2 -2
@@ -1251,7 +1251,7 @@ int nfc_genl_fw_download_done(struct nfc_dev *dev, const char *firmware_name,struct sk_buff *msg;void *hdr; - msg =nlmsg_new (NLMSG_DEFAULT_SIZE ,GFP_KERNEL ); + msg =nlmsg_new (NLMSG_DEFAULT_SIZE ,GFP_ATOMIC );if (!msg)return -ENOMEM ;
@@ -1267,7 +1267,7 @@ int nfc_genl_fw_download_done(struct nfc_dev *dev, const char *firmware_name,genlmsg_end (msg, hdr); -genlmsg_multicast (&nfc_genl_family, msg,0 ,0 ,GFP_KERNEL ); +genlmsg_multicast (&nfc_genl_family, msg,0 ,0 ,GFP_ATOMIC );return 0 ;
net/sched/cls_u32.c +11 -7
@@ -395,15 +395,20 @@ static int u32_init(struct tcf_proto *tp)return 0 ; } -static int u32_destroy_key (struct tcf_proto *tp,struct tc_u_knode *n, -bool free_pf) +static void __u32_destroy_key (struct tc_u_knode *n) {struct tc_u_hnode *ht =rtnl_dereference (n->ht_down);tcf_exts_destroy (&n->exts); -tcf_exts_put_net (&n->exts);if (ht && --ht->refcnt ==0 )kfree (ht); +kfree (n); +} + +static void u32_destroy_key (struct tcf_proto *tp,struct tc_u_knode *n, +bool free_pf) +{ +tcf_exts_put_net (&n->exts);#ifdef CONFIG_CLS_U32_PERF if (free_pf)free_percpu (n->pf);
@@ -412,8 +417,7 @@ static int u32_destroy_key(struct tcf_proto *tp, struct tc_u_knode *n,if (free_pf)free_percpu (n->pcpu_success);#endif -kfree (n); -return 0 ; +__u32_destroy_key (n); }/* u32_delete_key_rcu should be called when free'ing a copied
@@ -942,13 +946,13 @@ static int u32_change(struct net *net, struct sk_buff *in_skb, tca[TCA_RATE], ovr);if (err) { -u32_destroy_key (tp, new, false); +__u32_destroy_key (new);return err; } err =u32_replace_hw_knode (tp, new, flags);if (err) { -u32_destroy_key (tp, new, false); +__u32_destroy_key (new);return err; }
net/sctp/sm_sideeffect.c +4 -0
@@ -456,6 +456,10 @@ void sctp_generate_reconf_event(unsigned long data) goto out_unlock; } +/* This happens when the response arrives after the timer is triggered. */ +if (!asoc->strreset_chunk) + goto out_unlock; + error = sctp_do_sm(net, SCTP_EVENT_T_TIMEOUT, SCTP_ST_TIMEOUT(SCTP_EVENT_TIMEOUT_RECONF), asoc->state, asoc->ep, asoc,
net/sunrpc/xprtsock.c +0 -3
@@ -2941,9 +2941,6 @@ static struct rpc_xprt *xs_setup_local(struct xprt_create *args) }xprt_set_bound (xprt);xs_format_peer_addresses (xprt,"local" ,RPCBIND_NETID_LOCAL ); - ret =ERR_PTR (xs_local_setup_socket (transport)); -if (ret) - goto out_err;break ;default : ret =ERR_PTR (-EAFNOSUPPORT );
sound/firewire/fireworks/fireworks_hwdep.c +1 -0
@@ -35,6 +35,7 @@ hwdep_read_resp_buf(struct snd_efw *efw, char __user *buf, long remained, type =SNDRV_FIREWIRE_EVENT_EFW_RESPONSE ;if (copy_to_user (buf, &type,sizeof (type)))return -EFAULT ; + count +=sizeof (type); remained -=sizeof (type); buf +=sizeof (type);
sound/soc/codecs/wm8731.c +11 -8
@@ -604,7 +604,7 @@ static int wm8731_hw_init(struct device *dev, struct wm8731_priv *wm8731) ret =wm8731_reset (wm8731->regmap);if (ret <0 ) {dev_err (dev,"Failed to issue reset: %d\n" , ret); - goto err_regulator_enable; + goto err; }/* Clear POWEROFF, keep everything else disabled */
@@ -621,10 +621,7 @@ static int wm8731_hw_init(struct device *dev, struct wm8731_priv *wm8731)regcache_mark_dirty (wm8731->regmap); -err_regulator_enable: -/* Regulators will be enabled by bias management */ -regulator_bulk_disable (ARRAY_SIZE (wm8731->supplies), wm8731->supplies); - +err:return ret; }
@@ -768,21 +765,27 @@ static int wm8731_i2c_probe(struct i2c_client *i2c, ret =PTR_ERR (wm8731->regmap);dev_err (&i2c->dev,"Failed to allocate register map: %d\n" , ret); -return ret; + goto err_regulator_enable; } ret =wm8731_hw_init (&i2c->dev, wm8731);if (ret !=0 ) -return ret; + goto err_regulator_enable; ret =snd_soc_register_codec (&i2c->dev, &soc_codec_dev_wm8731, &wm8731_dai,1 );if (ret !=0 ) {dev_err (&i2c->dev,"Failed to register CODEC: %d\n" , ret); -return ret; + goto err_regulator_enable; }return 0 ; + +err_regulator_enable: +/* Regulators will be enabled by bias management */ +regulator_bulk_disable (ARRAY_SIZE (wm8731->supplies), wm8731->supplies); + +return ret; }static int wm8731_i2c_remove (struct i2c_client *client)
sound/soc/codecs/wm8958-dsp2.c +4 -4
@@ -533,7 +533,7 @@ static int wm8958_mbc_put(struct snd_kcontrol *kcontrol,wm8958_dsp_apply (codec, mbc, wm8994->mbc_ena[mbc]); -return 0 ; +return 1 ; }#define WM8958_MBC_SWITCH (xname, xval) {\
@@ -659,7 +659,7 @@ static int wm8958_vss_put(struct snd_kcontrol *kcontrol,wm8958_dsp_apply (codec, vss, wm8994->vss_ena[vss]); -return 0 ; +return 1 ; }
@@ -733,7 +733,7 @@ static int wm8958_hpf_put(struct snd_kcontrol *kcontrol,wm8958_dsp_apply (codec, hpf %3 , ucontrol->value.integer.value[0 ]); -return 0 ; +return 1 ; }#define WM8958_HPF_SWITCH (xname, xval) {\
@@ -827,7 +827,7 @@ static int wm8958_enh_eq_put(struct snd_kcontrol *kcontrol,wm8958_dsp_apply (codec, eq, ucontrol->value.integer.value[0 ]); -return 0 ; +return 1 ; }#define WM8958_ENH_EQ_SWITCH (xname, xval) {\
sound/soc/soc-generic-dmaengine-pcm.c +3 -3
@@ -98,10 +98,10 @@ static int dmaengine_pcm_hw_params(struct snd_pcm_substream *substream,memset (&slave_config,0 ,sizeof (slave_config)); -if (pcm->config && pcm->config->prepare_slave_config) - prepare_slave_config = pcm->config->prepare_slave_config; -else +if (!pcm->config) prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config; +else + prepare_slave_config = pcm->config->prepare_slave_config;if (prepare_slave_config) { ret =prepare_slave_config (substream, params, &slave_config);