Linux 3.18.110
Greg KH
maintainerI'm announcing the release of the 3.18.110 kernel.
All users of the 3.18 kernel series must upgrade.
The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 1 arch/arm/include/asm/assembler.h | 10 ++ arch/arm/kernel/traps.c | 5 - arch/arm/lib/getuser.S | 10 ++ arch/powerpc/kernel/setup-common.c | 11 -- arch/powerpc/platforms/powernv/opal-nvram.c | 14 ++- arch/x86/boot/compressed/eboot.c | 6 - arch/x86/kernel/machine_kexec_32.c | 6 + arch/x86/kernel/machine_kexec_64.c | 4 arch/x86/xen/mmu.c | 4 drivers/net/bonding/bond_alb.c | 2 drivers/net/ethernet/broadcom/tg3.c | 9 +- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 16 +++ drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 7 + drivers/net/ethernet/realtek/8139too.c | 2 drivers/net/ethernet/realtek/r8169.c | 3 drivers/net/ethernet/sun/niu.c | 5 - drivers/net/usb/qmi_wwan.c | 13 ++ drivers/scsi/libsas/sas_scsi_host.c | 33 ++----- drivers/scsi/sg.c | 2 drivers/usb/usbip/stub.h | 2 drivers/usb/usbip/stub_dev.c | 69 +++++++++------ drivers/usb/usbip/stub_main.c | 105 +++++++++++++++++++++--- fs/ext2/inode.c | 10 -- fs/hfsplus/super.c | 1 fs/lockd/svc.c | 2 fs/pipe.c | 3 include/linux/efi.h | 8 - include/trace/events/xen.h | 16 --- include/uapi/linux/nl80211.h | 2 kernel/exit.c | 4 kernel/time/tick-broadcast.c | 8 + net/bridge/br_if.c | 4 net/compat.c | 6 - net/dccp/ccids/ccid2.c | 14 ++- net/dccp/timer.c | 2 net/ipv4/ip_output.c | 3 net/ipv4/ping.c | 7 + net/ipv4/tcp.c | 2 net/ipv4/tcp_output.c | 7 + net/ipv4/udp.c | 7 + net/ipv6/ip6_output.c | 3 net/l2tp/l2tp_netlink.c | 2 net/llc/af_llc.c | 3 net/sched/sch_fq.c | 37 +++++--- net/sctp/associola.c | 30 ++++++ net/sctp/inqueue.c | 2 net/sctp/sm_statefuns.c | 89 +++++++++++--------- net/wireless/core.c | 3 sound/core/control_compat.c | 3 sound/usb/mixer.c | 8 + 52 files changed, 426 insertions(+), 201 deletions(-)
Al Viro (1):
ext2: fix a block leak
Alexander Potapenko (1):
scsi: sg: allocate with __GFP_ZERO in sg_build_indirect()
Alexey Khoroshilov (1):
usbip: fix error handling in stub_probe()
Andrey Ignatov (1):
ipv4: fix memory leaks in udp_sendmsg, ping_v4_sendmsg
Ard Biesheuvel (1):
efi: Avoid potential crashes, fix the 'struct efi_pci_io_protocol_32' definition for mixed mode
Benjamin Herrenschmidt (1):
powerpc: Don't preempt_disable() in show_cpuinfo()
Bjørn Mork (1):
qmi_wwan: do not steal interfaces from class drivers
Debabrata Banerjee (1):
bonding: do not allow rlb updates to invalid mac
Dexuan Cui (1):
tick/broadcast: Use for_each_cpu() specially on UP kernels
Eric Dumazet (4):
dccp: fix tasklet usage
llc: better deal with too small mtu
net_sched: fq: take care of throttled flows before reuse
tcp: purge write queue in tcp_connect_init()
Federico Cuello (1):
ALSA: usb: mixer: volume quirk for CM102-A+/102S+
Greg Kroah-Hartman (2):
Revert "ARM: dts: imx6qdl-wandboard: Fix audio channel swap" Linux 3.18.110
Hangbin Liu (1):
bridge: check iface upper dev when setting master via ioctl
Heiner Kallweit (1):
r8169: fix powering up RTL8168h
Ingo Molnar (1):
8139too: Use disable_irq_nosync() in rtl8139_poll_controller()
James Chapman (1):
l2tp: revert "l2tp: fix missing print session offset info"
Jason Yan (1):
scsi: libsas: defer ata device eh commands to libata
Johannes Berg (1):
cfg80211: limit wiphy names to 128 bytes
Lance Richardson (1):
net: support compat 64-bit time in {s,g}etsockopt
Masami Hiramatsu (2):
ARM: 8771/1: kprobes: Prohibit kprobes on do_undefinstr
ARM: 8772/1: kprobes: Prohibit kprobes on get_user functions
Michael Chan (1):
tg3: Fix vunmap() BUG_ON() triggered from tg3_free_consistent().
Michael Kerrisk (man-pages) (1):
pipe: cap initial pipe capacity according to pipe-max-size limit
Moshe Shemesh (1):
net/mlx4_en: Verify coalescing parameters are in range
Nicholas Piggin (1):
powerpc/powernv: Fix NVRAM sleep in invalid context when crashing
Rob Taglang (1):
net: ethernet: sun: niu set correct packet size in skb
Shuah Khan (1):
usbip: usbip_host: refine probe and disconnect debug msgs to be useful
Shuah Khan (Samsung OSG) (4):
usbip: usbip_host: delete device from busid_table after rebind
usbip: usbip_host: run rebind from exit when module is removed
usbip: usbip_host: fix NULL-ptr deref and use-after-free errors
usbip: usbip_host: fix bad unlock balance during stub_probe()
Steven Rostedt (VMware) (1):
tracing/x86/xen: Remove zero data size trace events trace_xen_mmu_flush_tlb{_all}Tetsuo Handa (2):
hfsplus: stop workqueue when fill_super() failed x86/kexec: Avoid double free_page() upon do_kexec_load() failure
Vasily Averin (1):
lockd: lost rollback of set_grace_period() in lockd_down_net()
Wenwen Wang (1):
ALSA: control: fix a redundant-copy issue
Willem de Bruijn (1):
net: test tailroom before appending to linear skb
Xin Long (3):
sctp: use the old asoc when making the cookie-ack chunk in dupcook_d
sctp: fix the issue that the cookie-ack with auth can't get processed
sctp: delay the authentication for the duplicated cookie-echo chunk
Yuchung Cheng (1):
tcp: ignore Fast Open on repair mode
zhongjiang (1):
kernel/exit.c: avoid undefined behaviour when calling wait4()
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 109 +SUBLEVEL = 110 EXTRAVERSION = NAME = Diseased Newt
arch/arm/boot/dts/imx6qdl-wandboard.dtsi +0 -1
@@ -86,7 +86,6 @@ clocks = <&clks 201>; VDDA-supply = <®_2p5v>; VDDIO-supply = <®_3p3v>; - lrclk-strength = <3>; }; };
arch/arm/include/asm/assembler.h +10 -0
@@ -448,4 +448,14 @@ THUMB( orr \reg , \reg , #PSR_T_BIT )#endif .endm +#ifdef CONFIG_KPROBES +#define _ASM_NOKPROBE (entry) \ + .pushsection "_kprobe_blacklist", "aw" ; \ + .balign 4 ; \ + .long entry; \ + .popsection +#else +#define _ASM_NOKPROBE (entry) +#endif +#endif /* __ASM_ASSEMBLER_H__ */
arch/arm/kernel/traps.c +4 -1
@@ -19,6 +19,7 @@#include <linux/uaccess.h> #include <linux/hardirq.h> #include <linux/kdebug.h> +#include <linux/kprobes.h> #include <linux/module.h> #include <linux/kexec.h> #include <linux/bug.h>
@@ -395,7 +396,8 @@ void unregister_undef_hook(struct undef_hook *hook)raw_spin_unlock_irqrestore (&undef_lock, flags); } -static int call_undef_hook (struct pt_regs *regs,unsigned int instr) +static nokprobe_inline +int call_undef_hook(struct pt_regs *regs, unsigned int instr) {struct undef_hook *hook;unsigned long flags;
@@ -468,6 +470,7 @@ die_sig:arm_notify_die ("Oops - undefined instruction" , regs, &info,0 ,6 ); } +NOKPROBE_SYMBOL (do_undefinstr)/* * Handle FIQ similarly to NMI on x86 systems.
arch/arm/lib/getuser.S +10 -0
@@ -38,6 +38,7 @@ ENTRY(__get_user_1) mov r0, #0 ret lr ENDPROC(__get_user_1) +_ASM_NOKPROBE(__get_user_1) ENTRY(__get_user_2) check_uaccess r0, 2, r1, r2, __get_user_bad
@@ -58,6 +59,7 @@ rb .req r0 mov r0, #0 ret lr ENDPROC(__get_user_2) +_ASM_NOKPROBE(__get_user_2) ENTRY(__get_user_4) check_uaccess r0, 4, r1, r2, __get_user_bad
@@ -65,6 +67,7 @@ ENTRY(__get_user_4) mov r0, #0 ret lr ENDPROC(__get_user_4) +_ASM_NOKPROBE(__get_user_4) ENTRY(__get_user_8) check_uaccess r0, 8, r1, r2, __get_user_bad
@@ -78,6 +81,7 @@ ENTRY(__get_user_8) mov r0, #0 ret lr ENDPROC(__get_user_8) +_ASM_NOKPROBE(__get_user_8) #ifdef __ARMEB__ ENTRY(__get_user_32t_8)
@@ -91,6 +95,7 @@ ENTRY(__get_user_32t_8) mov r0, #0 ret lr ENDPROC(__get_user_32t_8) +_ASM_NOKPROBE(__get_user_32t_8) ENTRY(__get_user_64t_1) check_uaccess r0, 1, r1, r2, __get_user_bad8
@@ -98,6 +103,7 @@ ENTRY(__get_user_64t_1) mov r0, #0 ret lr ENDPROC(__get_user_64t_1) +_ASM_NOKPROBE(__get_user_64t_1) ENTRY(__get_user_64t_2) check_uaccess r0, 2, r1, r2, __get_user_bad8
@@ -114,6 +120,7 @@ rb .req r0 mov r0, #0 ret lr ENDPROC(__get_user_64t_2) +_ASM_NOKPROBE(__get_user_64t_2) ENTRY(__get_user_64t_4) check_uaccess r0, 4, r1, r2, __get_user_bad8
@@ -121,6 +128,7 @@ ENTRY(__get_user_64t_4) mov r0, #0 ret lr ENDPROC(__get_user_64t_4) +_ASM_NOKPROBE(__get_user_64t_4) #endif __get_user_bad8:
@@ -131,6 +139,8 @@ __get_user_bad: ret lr ENDPROC(__get_user_bad) ENDPROC(__get_user_bad8) +_ASM_NOKPROBE(__get_user_bad) +_ASM_NOKPROBE(__get_user_bad8) .pushsection __ex_table, "a" .long 1b, __get_user_bad
arch/powerpc/kernel/setup-common.c +0 -11
@@ -217,14 +217,6 @@ static int show_cpuinfo(struct seq_file *m, void *v)unsigned short maj;unsigned short min; -/* We only show online cpus: disable preempt (overzealous, I -* knew) to prevent cpu going down. */ -preempt_disable (); -if (!cpu_online (cpu_id)) { -preempt_enable (); -return 0 ; - } -#ifdef CONFIG_SMP pvr =per_cpu (cpu_pvr, cpu_id);#else
@@ -329,9 +321,6 @@ static int show_cpuinfo(struct seq_file *m, void *v)#ifdef CONFIG_SMP seq_printf (m,"\n" );#endif - -preempt_enable (); -/* If this is the last cpu, print the summary */ if (cpumask_next (cpu_id, cpu_online_mask) >= nr_cpu_ids)show_cpuinfo_summary (m);
arch/powerpc/platforms/powernv/opal-nvram.c +12 -2
@@ -43,6 +43,10 @@ static ssize_t opal_nvram_read(char *buf, size_t count, loff_t *index)return count; } +/* +* This can be called in the panic path with interrupts off, so use +* mdelay in that case. +*/ static ssize_t opal_nvram_write (char *buf,size_t count,loff_t *index) {s64 rc =OPAL_BUSY ;
@@ -57,10 +61,16 @@ static ssize_t opal_nvram_write(char *buf, size_t count, loff_t *index)while (rc ==OPAL_BUSY || rc ==OPAL_BUSY_EVENT ) { rc =opal_write_nvram (__pa (buf), count, off);if (rc ==OPAL_BUSY_EVENT ) { -msleep (OPAL_BUSY_DELAY_MS ); +if (in_interrupt () ||irqs_disabled ()) +mdelay (OPAL_BUSY_DELAY_MS ); +else +msleep (OPAL_BUSY_DELAY_MS );opal_poll_events (NULL ); }else if (rc ==OPAL_BUSY ) { -msleep (OPAL_BUSY_DELAY_MS ); +if (in_interrupt () ||irqs_disabled ()) +mdelay (OPAL_BUSY_DELAY_MS ); +else +msleep (OPAL_BUSY_DELAY_MS ); } }
arch/x86/boot/compressed/eboot.c +4 -2
@@ -365,7 +365,8 @@ __setup_efi_pci32(efi_pci_io_protocol_32 *pci, struct pci_setup_rom **__rom)if (status !=EFI_SUCCESS ) goto free_struct; -memcpy (rom->romdata, pci->romimage, pci->romsize); +memcpy (rom->romdata, (void *)(unsigned long )pci->romimage, + pci->romsize);return status; free_struct:
@@ -471,7 +472,8 @@ __setup_efi_pci64(efi_pci_io_protocol_64 *pci, struct pci_setup_rom **__rom)if (status !=EFI_SUCCESS ) goto free_struct; -memcpy (rom->romdata, pci->romimage, pci->romsize); +memcpy (rom->romdata, (void *)(unsigned long )pci->romimage, + pci->romsize);return status; free_struct:
arch/x86/kernel/machine_kexec_32.c +5 -1
@@ -70,12 +70,17 @@ static void load_segments(void)static void machine_kexec_free_page_tables (struct kimage *image) {free_page ((unsigned long )image->arch.pgd); + image->arch.pgd =NULL ;#ifdef CONFIG_X86_PAE free_page ((unsigned long )image->arch.pmd0); + image->arch.pmd0 =NULL ;free_page ((unsigned long )image->arch.pmd1); + image->arch.pmd1 =NULL ;#endif free_page ((unsigned long )image->arch.pte0); + image->arch.pte0 =NULL ;free_page ((unsigned long )image->arch.pte1); + image->arch.pte1 =NULL ; }static int machine_kexec_alloc_page_tables (struct kimage *image)
@@ -92,7 +97,6 @@ static int machine_kexec_alloc_page_tables(struct kimage *image) !image->arch.pmd0 || !image->arch.pmd1 || #endif !image->arch.pte0 || !image->arch.pte1) { -machine_kexec_free_page_tables (image);return -ENOMEM ; }return 0 ;
arch/x86/kernel/machine_kexec_64.c +3 -1
@@ -34,8 +34,11 @@ static struct kexec_file_ops *kexec_file_loaders[] = {static void free_transition_pgtable (struct kimage *image) {free_page ((unsigned long )image->arch.pud); + image->arch.pud =NULL ;free_page ((unsigned long )image->arch.pmd); + image->arch.pmd =NULL ;free_page ((unsigned long )image->arch.pte); + image->arch.pte =NULL ; }static int init_transition_pgtable (struct kimage *image,pgd_t *pgd)
@@ -76,7 +79,6 @@ static int init_transition_pgtable(struct kimage *image, pgd_t *pgd)set_pte (pte,pfn_pte (paddr >>PAGE_SHIFT ,PAGE_KERNEL_EXEC ));return 0 ; err: -free_transition_pgtable (image);return result; }
arch/x86/xen/mmu.c +0 -4
@@ -1246,8 +1246,6 @@ void xen_flush_tlb_all(void)struct mmuext_op *op;struct multicall_space mcs; -trace_xen_mmu_flush_tlb_all (0 ); -preempt_disable (); mcs =xen_mc_entry (sizeof (*op));
@@ -1265,8 +1263,6 @@ static void xen_flush_tlb(void)struct mmuext_op *op;struct multicall_space mcs; -trace_xen_mmu_flush_tlb (0 ); -preempt_disable (); mcs =xen_mc_entry (sizeof (*op));
drivers/net/bonding/bond_alb.c +1 -1
@@ -453,7 +453,7 @@ static void rlb_update_client(struct rlb_client_info *client_info) {int i; -if (!client_info->slave) +if (!client_info->slave || !is_valid_ether_addr (client_info->mac_dst))return ;for (i =0 ; i <RLB_ARP_BURST_SIZE ; i++) {
drivers/net/ethernet/broadcom/tg3.c +5 -4
@@ -8705,14 +8705,15 @@ static void tg3_free_consistent(struct tg3 *tp)tg3_mem_rx_release (tp);tg3_mem_tx_release (tp); -/* Protect tg3_get_stats64() from reading freed tp->hw_stats. */ -tg3_full_lock (tp,0 ); +/* tp->hw_stats can be referenced safely: +* 1. under rtnl_lock +* 2. or under tp->lock if TG3_FLAG_INIT_COMPLETE is set. +*/ if (tp->hw_stats) {dma_free_coherent (&tp->pdev->dev,sizeof (struct tg3_hw_stats ), tp->hw_stats, tp->stats_mapping); tp->hw_stats =NULL ; } -tg3_full_unlock (tp); }/*
@@ -14137,7 +14138,7 @@ static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev,struct tg3 *tp =netdev_priv (dev);spin_lock_bh (&tp->lock); -if (!tp->hw_stats) { +if (!tp->hw_stats || !tg3_flag (tp,INIT_COMPLETE )) { *stats = tp->net_stats_prev;spin_unlock_bh (&tp->lock);return stats;
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +16 -0
@@ -453,6 +453,22 @@ static int mlx4_en_set_coalesce(struct net_device *dev,if (!coal->tx_max_coalesced_frames_irq)return -EINVAL ; +if (coal->tx_coalesce_usecs >MLX4_EN_MAX_COAL_TIME || + coal->rx_coalesce_usecs >MLX4_EN_MAX_COAL_TIME || + coal->rx_coalesce_usecs_low >MLX4_EN_MAX_COAL_TIME || + coal->rx_coalesce_usecs_high >MLX4_EN_MAX_COAL_TIME ) { +netdev_info (dev,"%s: maximum coalesce time supported is %d usecs\n" , + __func__,MLX4_EN_MAX_COAL_TIME ); +return -ERANGE ; + } + +if (coal->tx_max_coalesced_frames >MLX4_EN_MAX_COAL_PKTS || + coal->rx_max_coalesced_frames >MLX4_EN_MAX_COAL_PKTS ) { +netdev_info (dev,"%s: maximum coalesced frames supported is %d\n" , + __func__,MLX4_EN_MAX_COAL_PKTS ); +return -ERANGE ; + } + priv->rx_frames = (coal->rx_max_coalesced_frames ==MLX4_EN_AUTO_CONF ) ? MLX4_EN_RX_COAL_TARGET :
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +5 -2
@@ -138,6 +138,9 @@ enum {#define MLX4_EN_TX_COAL_PKTS 16#define MLX4_EN_TX_COAL_TIME 0x10 +#define MLX4_EN_MAX_COAL_PKTS U16_MAX +#define MLX4_EN_MAX_COAL_TIME U16_MAX +#define MLX4_EN_RX_RATE_LOW 400000#define MLX4_EN_RX_COAL_TIME_LOW 0#define MLX4_EN_RX_RATE_HIGH 450000
@@ -535,8 +538,8 @@ struct mlx4_en_priv {u16 rx_usecs_low;u32 pkt_rate_high;u16 rx_usecs_high; -u16 sample_interval; -u16 adaptive_rx_coal; +u32 sample_interval; +u32 adaptive_rx_coal;u32 msg_enable;u32 loopback_ok;u32 validate_loopback;
drivers/net/ethernet/realtek/8139too.c +1 -1
@@ -2215,7 +2215,7 @@ static void rtl8139_poll_controller(struct net_device *dev)struct rtl8139_private *tp =netdev_priv (dev);const int irq = tp->pci_dev->irq; -disable_irq (irq); +disable_irq_nosync (irq);rtl8139_interrupt (irq, dev);enable_irq (irq); }
drivers/net/ethernet/realtek/r8169.c +3 -0
@@ -4764,6 +4764,9 @@ static void rtl_pll_power_down(struct rtl8169_private *tp)static void rtl_pll_power_up (struct rtl8169_private *tp) {rtl_generic_op (tp, tp->pll_power_ops.up); + +/* give MAC/PHY some time to resume */ +msleep (20 ); }static void rtl_init_pll_power_ops (struct rtl8169_private *tp)
drivers/net/ethernet/sun/niu.c +2 -3
@@ -3443,7 +3443,7 @@ static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np, len = (val &RCR_ENTRY_L2_LEN ) >>RCR_ENTRY_L2_LEN_SHIFT ; - len -=ETH_FCS_LEN ; + append_size = len +ETH_HLEN +ETH_FCS_LEN ; addr = (val &RCR_ENTRY_PKT_BUF_ADDR ) <<RCR_ENTRY_PKT_BUF_ADDR_SHIFT ;
@@ -3453,7 +3453,6 @@ static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np, RCR_ENTRY_PKTBUFSZ_SHIFT]; off = addr & ~PAGE_MASK ; - append_size = rcr_size;if (num_rcr ==1 ) {int ptype;
@@ -3466,7 +3465,7 @@ static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np,else skb_checksum_none_assert (skb); }else if (!(val &RCR_ENTRY_MULTI )) - append_size = len - skb->len; + append_size = append_size - skb->len;niu_rx_skb_append (skb, page, off, append_size, rcr_size);if ((page->index + rp->rbr_block_size) - rcr_size == addr) {
drivers/net/usb/qmi_wwan.c +13 -0
@@ -866,6 +866,7 @@ static int qmi_wwan_probe(struct usb_interface *intf, const struct usb_device_id *prod) {struct usb_device_id *id = (struct usb_device_id *)prod; +struct usb_interface_descriptor *desc = &intf->cur_altsetting->desc;/* Workaround to enable dynamic IDs. This disables usbnet * blacklisting functionality. Which, if required, can be
@@ -877,6 +878,18 @@ static int qmi_wwan_probe(struct usb_interface *intf, id->driver_info = (unsigned long )&qmi_wwan_info; } +/* There are devices where the same interface number can be +* configured as different functions. We should only bind to +* vendor specific functions when matching on interface number +*/ +if (id->match_flags &USB_DEVICE_ID_MATCH_INT_NUMBER && + desc->bInterfaceClass !=USB_CLASS_VENDOR_SPEC ) { +dev_dbg (&intf->dev, +"Rejecting interface number match for class %02x\n" , + desc->bInterfaceClass); +return -ENODEV ; + } +return usbnet_probe (intf, id); }
drivers/scsi/libsas/sas_scsi_host.c +13 -20
@@ -250,6 +250,7 @@ out_done:static void sas_eh_finish_cmd (struct scsi_cmnd *cmd) {struct sas_ha_struct *sas_ha =SHOST_TO_SAS_HA (cmd->device->host); +struct domain_device *dev =cmd_to_domain_dev (cmd);struct sas_task *task =TO_SAS_TASK (cmd);/* At this point, we only get called following an actual abort
@@ -258,6 +259,14 @@ static void sas_eh_finish_cmd(struct scsi_cmnd *cmd)*/ sas_end_task (cmd, task); +if (dev_is_sata (dev)) { +/* defer commands to libata so that libata EH can +* handle ata qcs correctly +*/ +list_move_tail (&cmd->eh_entry, &sas_ha->eh_ata_q); +return ; + } +/* now finish the command and move it on to the error * handler done list, this also takes it off the * error handler pending list.
@@ -265,22 +274,6 @@ static void sas_eh_finish_cmd(struct scsi_cmnd *cmd)scsi_eh_finish_cmd (cmd, &sas_ha->eh_done_q); } -static void sas_eh_defer_cmd (struct scsi_cmnd *cmd) -{ -struct domain_device *dev =cmd_to_domain_dev (cmd); -struct sas_ha_struct *ha = dev->port->ha; -struct sas_task *task =TO_SAS_TASK (cmd); - -if (!dev_is_sata (dev)) { -sas_eh_finish_cmd (cmd); -return ; - } - -/* report the timeout to libata */ -sas_end_task (cmd, task); -list_move_tail (&cmd->eh_entry, &ha->eh_ata_q); -} -static void sas_scsi_clear_queue_lu (struct list_head *error_q,struct scsi_cmnd *my_cmd) {struct scsi_cmnd *cmd, *n;
@@ -288,7 +281,7 @@ static void sas_scsi_clear_queue_lu(struct list_head *error_q, struct scsi_cmndlist_for_each_entry_safe (cmd, n, error_q, eh_entry) {if (cmd->device->sdev_target == my_cmd->device->sdev_target && cmd->device->lun == my_cmd->device->lun) -sas_eh_defer_cmd (cmd); +sas_eh_finish_cmd (cmd); } }
@@ -678,12 +671,12 @@ static void sas_eh_handle_sas_errors(struct Scsi_Host *shost, struct list_head *case TASK_IS_DONE :SAS_DPRINTK ("%s: task 0x%p is done\n" , __func__, task); -sas_eh_defer_cmd (cmd); +sas_eh_finish_cmd (cmd);continue ;case TASK_IS_ABORTED :SAS_DPRINTK ("%s: task 0x%p is aborted\n" , __func__, task); -sas_eh_defer_cmd (cmd); +sas_eh_finish_cmd (cmd);continue ;case TASK_IS_AT_LU :SAS_DPRINTK ("task 0x%p is at LU: lu recover\n" , task);
@@ -694,7 +687,7 @@ static void sas_eh_handle_sas_errors(struct Scsi_Host *shost, struct list_head *"recovered\n" ,SAS_ADDR (task->dev), cmd->device->lun); -sas_eh_defer_cmd (cmd); +sas_eh_finish_cmd (cmd);sas_scsi_clear_queue_lu (work_q, cmd); goto Again; }
drivers/scsi/sg.c +1 -1
@@ -1950,7 +1950,7 @@ retry: num = (rem_sz > scatter_elem_sz_prev) ? scatter_elem_sz_prev : rem_sz; - schp->pages[k] =alloc_pages (gfp_mask, order); + schp->pages[k] =alloc_pages (gfp_mask | __GFP_ZERO, order);if (!schp->pages[k]) goto out;
drivers/usb/usbip/stub.h +2 -0
@@ -88,6 +88,7 @@ struct bus_id_priv {struct stub_device *sdev;struct usb_device *udev;char shutdown_busid; +spinlock_t busid_lock; };/* stub_priv is allocated from stub_priv_cache */
@@ -98,6 +99,7 @@ extern struct usb_device_driver stub_driver;/* stub_main.c */ struct bus_id_priv *get_busid_priv (const char *busid); +void put_busid_priv (struct bus_id_priv *bid);int del_match_busid (char *busid);void stub_device_cleanup_urbs (struct stub_device *sdev);
drivers/usb/usbip/stub_dev.c +41 -28
139 lines not on this page · raw message
drivers/usb/usbip/stub_main.c +92 -13
202 lines not on this page · raw message
fs/ext2/inode.c +0 -10
@@ -1169,21 +1169,11 @@ do_indirects:static void ext2_truncate_blocks (struct inode *inode,loff_t offset) { -/* -* XXX: it seems like a bug here that we don't allow -* IS_APPEND inode to have blocks-past-i_size trimmed off. -* review and fix this. -* -* Also would be nice to be able to handle IO errors and such, -* but that's probably too much to ask. -*/ if (!(S_ISREG (inode->i_mode) ||S_ISDIR (inode->i_mode) ||S_ISLNK (inode->i_mode)))return ;if (ext2_inode_is_fast_symlink (inode))return ; -if (IS_APPEND (inode) ||IS_IMMUTABLE (inode)) -return ;__ext2_truncate_blocks (inode, offset); }
fs/hfsplus/super.c +1 -0
@@ -582,6 +582,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)return 0 ; out_put_hidden_dir: +cancel_delayed_work_sync (&sbi->sync_work);iput (sbi->hidden_dir); out_put_root:dput (sb->s_root);
fs/lockd/svc.c +2 -0
@@ -271,6 +271,8 @@ static void lockd_down_net(struct svc_serv *serv, struct net *net)if (ln->nlmsvc_users) {if (--ln->nlmsvc_users ==0 ) {nlm_shutdown_hosts_net (net); +cancel_delayed_work_sync (&ln->grace_period_end); +locks_end_grace (&ln->lockd_manager);svc_shutdown_net (serv, net);dprintk ("lockd_down_net: per-net data destroyed; net=%p\n" , net); }
fs/pipe.c +3 -0
@@ -618,6 +618,9 @@ struct pipe_inode_info *alloc_pipe_info(void)unsigned long pipe_bufs =PIPE_DEF_BUFFERS ;struct user_struct *user =get_current_user (); +if (pipe_bufs *PAGE_SIZE > pipe_max_size && !capable (CAP_SYS_RESOURCE )) + pipe_bufs = pipe_max_size >>PAGE_SHIFT ; +if (!too_many_pipe_buffers_hard (user)) {if (too_many_pipe_buffers_soft (user)) pipe_bufs =1 ;
include/linux/efi.h +4 -4
@@ -360,8 +360,8 @@ typedef struct {u32 attributes;u32 get_bar_attributes;u32 set_bar_attributes; -uint64_t romsize; -void *romimage; +u64 romsize; +u32 romimage; } efi_pci_io_protocol_32; typedef struct {
@@ -380,8 +380,8 @@ typedef struct {u64 attributes;u64 get_bar_attributes;u64 set_bar_attributes; -uint64_t romsize; -void *romimage; +u64 romsize; +u64 romimage; } efi_pci_io_protocol_64; typedef struct {
include/trace/events/xen.h +0 -16
@@ -377,22 +377,6 @@ DECLARE_EVENT_CLASS(xen_mmu_pgd,DEFINE_XEN_MMU_PGD_EVENT (xen_mmu_pgd_pin);DEFINE_XEN_MMU_PGD_EVENT (xen_mmu_pgd_unpin); -TRACE_EVENT (xen_mmu_flush_tlb_all, - TP_PROTO(int x), -TP_ARGS (x), -TP_STRUCT__entry (__array (char, x,0 )), -TP_fast_assign ((void )x), -TP_printk ("%s" ,"" ) - ); - -TRACE_EVENT (xen_mmu_flush_tlb, - TP_PROTO(int x), -TP_ARGS (x), -TP_STRUCT__entry (__array (char, x,0 )), -TP_fast_assign ((void )x), -TP_printk ("%s" ,"" ) - ); - TRACE_EVENT(xen_mmu_flush_tlb_single, TP_PROTO(unsigned long addr), TP_ARGS(addr),
include/uapi/linux/nl80211.h +2 -0
@@ -2026,6 +2026,8 @@ enum nl80211_attrs {#define NL80211_ATTR_KEYS NL80211_ATTR_KEYS#define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS +#define NL80211_WIPHY_NAME_MAXLEN 128 +#define NL80211_MAX_SUPP_RATES 32#define NL80211_MAX_SUPP_HT_RATES 77#define NL80211_MAX_SUPP_REG_RULES 32
kernel/exit.c +4 -0
@@ -1620,6 +1620,10 @@ SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr, __WNOTHREAD|__WCLONE|__WALL))return -EINVAL ; +/* -INT_MIN is not defined */ +if (upid ==INT_MIN ) +return -ESRCH ; +if (upid ==-1 ) type =PIDTYPE_MAX ;else if (upid <0 ) {
kernel/time/tick-broadcast.c +8 -0
@@ -585,6 +585,14 @@ again: now =ktime_get ();/* Find all expired events */ for_each_cpu (cpu, tick_broadcast_oneshot_mask) { +/* +* Required for !SMP because for_each_cpu() reports +* unconditionally CPU0 as set on UP kernels. +*/ +if (!IS_ENABLED (CONFIG_SMP ) && +cpumask_empty (tick_broadcast_oneshot_mask)) +break ; + td = &per_cpu (tick_cpu_device, cpu);if (td->evtdev->next_event.tv64 <= now.tv64) {cpumask_set_cpu (cpu, tmpmask);
net/bridge/br_if.c +2 -2
@@ -445,8 +445,8 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)if (dev->netdev_ops->ndo_start_xmit == br_dev_xmit)return -ELOOP ; -/* Device is already being bridged */ -if (br_port_exists (dev)) +/* Device has master upper dev */ +if (netdev_master_upper_dev_get (dev))return -EBUSY ;/* No bridging devices that dislike that (e.g. wireless) */
net/compat.c +4 -2
@@ -387,7 +387,8 @@ static int compat_sock_setsockopt(struct socket *sock, int level, int optname,if (optname ==SO_ATTACH_FILTER )return do_set_attach_filter (sock, level, optname, optval, optlen); -if (optname ==SO_RCVTIMEO || optname ==SO_SNDTIMEO ) +if (!COMPAT_USE_64BIT_TIME && + (optname ==SO_RCVTIMEO || optname ==SO_SNDTIMEO ))return do_set_sock_timeout (sock, level, optname, optval, optlen);return sock_setsockopt (sock, level, optname, optval, optlen);
@@ -452,7 +453,8 @@ static int do_get_sock_timeout(struct socket *sock, int level, int optname,static int compat_sock_getsockopt (struct socket *sock,int level,int optname,char __user *optval,int __user *optlen) { -if (optname ==SO_RCVTIMEO || optname ==SO_SNDTIMEO ) +if (!COMPAT_USE_64BIT_TIME && + (optname ==SO_RCVTIMEO || optname ==SO_SNDTIMEO ))return do_get_sock_timeout (sock, level, optname, optval, optlen);return sock_getsockopt (sock, level, optname, optval, optlen); }
net/dccp/ccids/ccid2.c +12 -2
@@ -126,6 +126,16 @@ static void ccid2_change_l_seq_window(struct sock *sk, u64 val) DCCPF_SEQ_WMAX)); } +static void dccp_tasklet_schedule (struct sock *sk) +{ +struct tasklet_struct *t = &dccp_sk (sk)->dccps_xmitlet; + +if (!test_and_set_bit (TASKLET_STATE_SCHED , &t->state)) { +sock_hold (sk); +__tasklet_schedule (t); + } +} +static void ccid2_hc_tx_rto_expire (unsigned long data) {struct sock *sk = (struct sock *)data;
@@ -166,7 +176,7 @@ static void ccid2_hc_tx_rto_expire(unsigned long data)/* if we were blocked before, we may now send cwnd=1 packet */ if (sender_was_blocked) -tasklet_schedule (&dccp_sk (sk)->dccps_xmitlet); +dccp_tasklet_schedule (sk);/* restart backed-off timer */ sk_reset_timer (sk, &hc->tx_rtotimer, jiffies + hc->tx_rto); out:
@@ -706,7 +716,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) done:/* check if incoming Acks allow pending packets to be sent */ if (sender_was_blocked && !ccid2_cwnd_network_limited (hc)) -tasklet_schedule (&dccp_sk (sk)->dccps_xmitlet); +dccp_tasklet_schedule (sk);dccp_ackvec_parsed_cleanup (&hc->tx_av_chunks); }
net/dccp/timer.c +1 -1
@@ -252,12 +252,12 @@ static void dccp_write_xmitlet(unsigned long data)else dccp_write_xmit (sk);bh_unlock_sock (sk); +sock_put (sk); }static void dccp_write_xmit_timer (unsigned long data) {dccp_write_xmitlet (data); -sock_put ((struct sock *)data); }void dccp_init_xmit_timers (struct sock *sk)
net/ipv4/ip_output.c +2 -1
@@ -1028,7 +1028,8 @@ alloc_new_skb:if (copy > length) copy = length; -if (!(rt->dst.dev->features&NETIF_F_SG )) { +if (!(rt->dst.dev->features&NETIF_F_SG ) && +skb_tailroom (skb) >= copy) {unsigned int off; off = skb->len;
net/ipv4/ping.c +5 -2
@@ -771,8 +771,10 @@ static int ping_v4_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m ipc.addr = faddr = daddr;if (ipc.opt && ipc.opt->opt.srr) { -if (!daddr) -return -EINVAL ; +if (!daddr) { + err = -EINVAL ; + goto out_free; + } faddr = ipc.opt->opt.faddr; } tos =get_rttos (&ipc, inet);
@@ -837,6 +839,7 @@ back_from_confirm: out:ip_rt_put (rt); +out_free:if (free)kfree (ipc.opt);if (!err) {
net/ipv4/tcp.c +1 -1
@@ -1105,7 +1105,7 @@ int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,lock_sock (sk); flags = msg->msg_flags; -if (flags &MSG_FASTOPEN ) { +if ((flags &MSG_FASTOPEN ) && !tp->repair) { err =tcp_sendmsg_fastopen (sk, msg, &copied_syn, size);if (err == -EINPROGRESS && copied_syn >0 ) goto out;
net/ipv4/tcp_output.c +5 -2
@@ -2497,8 +2497,10 @@ int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)return -EBUSY ;if (before (TCP_SKB_CB (skb)->seq, tp->snd_una)) { -if (before (TCP_SKB_CB (skb)->end_seq, tp->snd_una)) -BUG (); +if (unlikely (before (TCP_SKB_CB (skb)->end_seq, tp->snd_una))) { +WARN_ON_ONCE (1 ); +return -EINVAL ; + }if (tcp_trim_head (sk, skb, tp->snd_una -TCP_SKB_CB (skb)->seq))return -ENOMEM ; }
@@ -2989,6 +2991,7 @@ static void tcp_connect_init(struct sock *sk)sock_reset_flag (sk,SOCK_DONE ); tp->snd_wnd =0 ;tcp_init_wl (tp,0 ); +tcp_write_queue_purge (sk); tp->snd_una = tp->write_seq; tp->snd_sml = tp->write_seq; tp->snd_up = tp->write_seq;
net/ipv4/udp.c +5 -2
@@ -975,8 +975,10 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ipc.addr = faddr = daddr;if (ipc.opt && ipc.opt->opt.srr) { -if (!daddr) -return -EINVAL ; +if (!daddr) { + err = -EINVAL ; + goto out_free; + } faddr = ipc.opt->opt.faddr; connected =0 ; }
@@ -1081,6 +1083,7 @@ do_append_data: out:ip_rt_put (rt); +out_free:if (free)kfree (ipc.opt);if (!err)
net/ipv6/ip6_output.c +2 -1
@@ -1462,7 +1462,8 @@ alloc_new_skb:if (copy > length) copy = length; -if (!(rt->dst.dev->features&NETIF_F_SG )) { +if (!(rt->dst.dev->features&NETIF_F_SG ) && +skb_tailroom (skb) >= copy) {unsigned int off; off = skb->len;
net/l2tp/l2tp_netlink.c +0 -2
@@ -633,8 +633,6 @@ static int l2tp_nl_session_send(struct sk_buff *skb, u32 portid, u32 seq, int fl if ((session->ifname[0] && nla_put_string(skb, L2TP_ATTR_IFNAME, session->ifname)) || - (session->offset && - nla_put_u16(skb, L2TP_ATTR_OFFSET, session->offset)) || (session->cookie_len && nla_put(skb, L2TP_ATTR_COOKIE, session->cookie_len, &session->cookie[0])) ||
net/llc/af_llc.c +3 -0
@@ -928,6 +928,9 @@ static int llc_ui_sendmsg(struct kiocb *iocb, struct socket *sock,if (size > llc->dev->mtu) size = llc->dev->mtu; copied = size - hdrlen; + rc = -EINVAL ; +if (copied <0 ) + goto release;release_sock (sk); skb =sock_alloc_send_skb (sk, size, noblock, &rc);lock_sock (sk);
net/sched/sch_fq.c +25 -12
@@ -124,6 +124,28 @@ static bool fq_flow_is_detached(const struct fq_flow *f)return f->next == &detached; } +static bool fq_flow_is_throttled (const struct fq_flow *f) +{ +return f->next == &throttled; +} + +static void fq_flow_add_tail (struct fq_flow_head *head,struct fq_flow *flow) +{ +if (head->first) + head->last->next = flow; +else + head->first = flow; + head->last = flow; + flow->next =NULL ; +} + +static void fq_flow_unset_throttled (struct fq_sched_data *q,struct fq_flow *f) +{ +rb_erase (&f->rate_node, &q->delayed); + q->throttled_flows--; +fq_flow_add_tail (&q->old_flows, f); +} +static void fq_flow_set_throttled (struct fq_sched_data *q,struct fq_flow *f) {struct rb_node **p = &q->delayed.rb_node, *parent =NULL ;
@@ -151,15 +173,6 @@ static void fq_flow_set_throttled(struct fq_sched_data *q, struct fq_flow *f)static struct kmem_cache *fq_flow_cachep__read_mostly ; -static void fq_flow_add_tail (struct fq_flow_head *head,struct fq_flow *flow) -{ -if (head->first) - head->last->next = flow; -else - head->first = flow; - head->last = flow; - flow->next =NULL ; -}/* limit number of collected flows per round */ #define FQ_GC_MAX 8
@@ -251,6 +264,8 @@ static struct fq_flow *fq_classify(struct sk_buff *skb, struct fq_sched_data *q) f->socket_hash != sk->sk_hash)) { f->credit = q->initial_quantum; f->socket_hash = sk->sk_hash; +if (fq_flow_is_throttled (f)) +fq_flow_unset_throttled (q, f); f->time_next_packet =0ULL ; }return f;
@@ -405,9 +420,7 @@ static void fq_check_throttled(struct fq_sched_data *q, u64 now) q->time_next_delayed_flow = f->time_next_packet;break ; } -rb_erase (p, &q->delayed); - q->throttled_flows--; -fq_flow_add_tail (&q->old_flows, f); +fq_flow_unset_throttled (q, f); } }
net/sctp/associola.c +29 -1
@@ -1001,9 +1001,10 @@ static void sctp_assoc_bh_rcv(struct work_struct *work)struct sctp_endpoint *ep;struct sctp_chunk *chunk;struct sctp_inq *inqueue; -int state;sctp_subtype_t subtype; +int first_time =1 ;/* is this the first time through the loop */ int error =0 ; +int state;/* The association should be held so we should be safe. */ ep = asoc->ep;
@@ -1014,6 +1015,30 @@ static void sctp_assoc_bh_rcv(struct work_struct *work) state = asoc->state; subtype =SCTP_ST_CHUNK (chunk->chunk_hdr->type); +/* If the first chunk in the packet is AUTH, do special +* processing specified in Section 6.3 of SCTP-AUTH spec +*/ +if (first_time && subtype.chunk ==SCTP_CID_AUTH ) { +struct sctp_chunkhdr *next_hdr; + + next_hdr =sctp_inq_peek (inqueue); +if (!next_hdr) + goto normal; + +/* If the next chunk is COOKIE-ECHO, skip the AUTH +* chunk while saving a pointer to it so we can do +* Authentication later (during cookie-echo +* processing). +*/ +if (next_hdr->type ==SCTP_CID_COOKIE_ECHO ) { + chunk->auth_chunk =skb_clone (chunk->skb, +GFP_ATOMIC ); + chunk->auth =1 ; +continue ; + } + } + +normal:/* SCTP-AUTH, Section 6.3: * The receiver has a list of chunk types which it expects * to be received only after an AUTH-chunk. This list has
@@ -1052,6 +1077,9 @@ static void sctp_assoc_bh_rcv(struct work_struct *work)/* If there is an error on chunk, discard this packet. */ if (error && chunk) chunk->pdiscard =1 ; + +if (first_time) + first_time =0 ; }sctp_association_put (asoc); }
net/sctp/inqueue.c +1 -1
@@ -178,7 +178,7 @@ struct sctp_chunk *sctp_inq_pop(struct sctp_inq *queue)skb_pull (chunk->skb,sizeof (sctp_chunkhdr_t)); chunk->subh.v =NULL ;/* Subheader is no longer valid. */ -if (chunk->chunk_end +sizeof (sctp_chunkhdr_t) < +if (chunk->chunk_end +sizeof (sctp_chunkhdr_t) <=skb_tail_pointer (chunk->skb)) {/* This is not a singleton */ chunk->singleton =0 ;
net/sctp/sm_statefuns.c +49 -40
150 lines not on this page · raw message
net/wireless/core.c +3 -0
@@ -94,6 +94,9 @@ int cfg80211_dev_rename(struct cfg80211_registered_device *rdev,ASSERT_RTNL (); +if (strlen (newname) >NL80211_WIPHY_NAME_MAXLEN ) +return -EINVAL ; +/* prohibit calling the thing phy%d when %d is not its number */ sscanf (newname,PHY_NAME "%d%n" , &wiphy_idx, &taken);if (taken ==strlen (newname) && wiphy_idx != rdev->wiphy_idx) {
sound/core/control_compat.c +1 -2
@@ -400,8 +400,7 @@ static int snd_ctl_elem_add_compat(struct snd_ctl_file *file,if (copy_from_user (&data->id, &data32->id,sizeof (data->id)) ||copy_from_user (&data->type, &data32->type,3 *sizeof (u32))) goto error; -if (get_user (data->owner, &data32->owner) || -get_user (data->type, &data32->type)) +if (get_user (data->owner, &data32->owner)) goto error;switch (data->type) {case SNDRV_CTL_ELEM_TYPE_BOOLEAN :
sound/usb/mixer.c +8 -0
@@ -883,6 +883,14 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval, }break ; +case USB_ID (0x0d8c ,0x0103 ): +if (!strcmp (kctl->id.name,"PCM Playback Volume" )) { +usb_audio_info (chip, +"set volume quirk for CM102-A+/102S+\n" ); + cval->min =-256 ; + } +break ; +case USB_ID (0x0471 ,0x0101 ):case USB_ID (0x0471 ,0x0104 ):case USB_ID (0x0471 ,0x0105 ):