Linux 3.10.4
Greg KH
maintainerI'm announcing the release of the 3.10.4 kernel.
All users of the 3.10 kernel series must upgrade.
The updated 3.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.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/mach-footbridge/dc21285.c | 2 arch/arm/mach-s3c24xx/clock-s3c2410.c | 161 ++++++++++++++---------- arch/arm/mach-s3c24xx/clock-s3c2440.c | 3 arch/arm/plat-samsung/include/plat/clock.h | 5 arch/mips/cavium-octeon/setup.c | 3 arch/sparc/kernel/asm-offsets.c | 2 arch/sparc/mm/hypersparc.S | 8 - arch/sparc/mm/swift.S | 8 - arch/sparc/mm/tsunami.S | 6 arch/sparc/mm/viking.S | 10 - drivers/edac/edac_mc.c | 9 + drivers/edac/edac_mc_sysfs.c | 28 ++-- drivers/edac/i5100_edac.c | 2 drivers/md/bcache/bcache.h | 1 drivers/md/bcache/btree.c | 4 drivers/md/bcache/closure.c | 6 drivers/md/bcache/journal.c | 7 - drivers/md/bcache/request.c | 8 + drivers/md/bcache/super.c | 31 +++- drivers/media/dvb-core/dmxdev.c | 8 - drivers/media/pci/saa7134/saa7134-alsa.c | 2 drivers/net/dummy.c | 4 drivers/net/ethernet/atheros/alx/main.c | 5 drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 50 +++++++ drivers/net/ethernet/cadence/macb.c | 2 drivers/net/ethernet/emulex/benet/be_main.c | 14 +- drivers/net/ethernet/sfc/rx.c | 27 ++-- drivers/net/ethernet/sun/sunvnet.c | 2 drivers/net/hyperv/netvsc_drv.c | 4 drivers/net/ifb.c | 8 + drivers/net/macvtap.c | 66 ++++++--- drivers/net/tun.c | 69 ++++++---- drivers/net/virtio_net.c | 5 drivers/rapidio/switches/idt_gen2.c | 2 drivers/scsi/megaraid/megaraid_sas_base.c | 10 - drivers/scsi/mpt3sas/mpt3sas_scsih.c | 30 ++-- drivers/usb/serial/cp210x.c | 4 drivers/usb/serial/option.c | 23 +-- drivers/vhost/net.c | 9 + drivers/virtio/virtio_ring.c | 56 ++++++-- fs/block_dev.c | 9 + fs/ext4/extents.c | 11 + fs/fuse/dir.c | 40 ++++- fs/lockd/svclock.c | 4 include/linux/edac.h | 7 - include/linux/if_vlan.h | 3 include/linux/virtio.h | 4 include/net/addrconf.h | 3 include/net/udp.h | 1 include/uapi/linux/if_pppox.h | 4 kernel/hrtimer.c | 28 +--- kernel/power/autosleep.c | 3 lib/Kconfig.debug | 2 net/8021q/vlan_core.c | 2 net/8021q/vlan_dev.c | 7 + net/9p/trans_common.c | 10 - net/core/dev.c | 11 + net/core/neighbour.c | 12 + net/ipv4/ip_gre.c | 9 - net/ipv4/ip_input.c | 7 - net/ipv4/ip_tunnel.c | 97 ++++++++------ net/ipv4/ip_vti.c | 7 - net/ipv4/ipip.c | 12 + net/ipv4/udp.c | 3 net/ipv6/addrconf.c | 28 ++-- net/ipv6/ip6_fib.c | 15 +- net/ipv6/ip6_output.c | 16 +- net/ipv6/mcast.c | 18 +- net/ipv6/route.c | 70 ++++++---- net/ipv6/sit.c | 2 net/ipv6/udp.c | 7 - net/l2tp/l2tp_ppp.c | 3 net/sched/sch_qfq.c | 85 ++++++++---- net/x25/af_x25.c | 15 +- sound/pci/hda/patch_sigmatel.c | 13 + sound/usb/6fire/pcm.c | 2 77 files changed, 839 insertions(+), 437 deletions(-)
Alexander Duyck (1):
gre: Fix MTU sizing check for gretap tunnels
Alexandr \\\"Sky\\\" Ivanov (1):
USB: option: add D-Link DWM-152/C1 and DWM-156/C1
Amerigo Wang (1):
ipv6,mcast: always hold idev->lock before mca_lock
Barry Grussling (1):
usb: cp210x support SEL C662 Vendor/Device
Ben Hutchings (1):
sfc: Fix memory leak when discarding scattered packets
Bjørn Mork (2):
SCSI: megaraid_sas: fix memory leak if SGL has zero length entries
usb: option: add TP-LINK MA260
Borislav Petkov (1):
EDAC: Fix lockdep splat
Changli Gao (1):
net: Swap ver and type in pppoe_hdr
Cong Wang (3):
gre: fix a regression in ioctl
vti: remove duplicated code to fix a memory leak
ipip: fix a regression in ioctl
Dan Williams (1):
usb: serial: option: add Olivetti Olicard 200
Daniil Bolsun (1):
USB: option: append Petatel NP10T device to GSM modems list
Dave Jones (1):
x25: Fix broken locking in ioctl error paths.
Dave Kleikamp (1):
sunvnet: vnet_port_remove must call unregister_netdev
David Jeffery (1):
lockd: protect nlm_blocked access in nlmsvc_retry_blocked
Eldad Zack (1):
ALSA: usb-audio: 6fire: return correct XRUN indication
Enrico Mioso (3):
usb: serial: option: blacklist ONDA MT689DC QMI interface
usb: serial: option.c: remove ONDA MT825UP product ID fromdriver
usb: serial: option: Add ONYX 3G device support
Eric Dumazet (4):
neighbour: fix a race in neigh_destroy()
ipv4: set transport header earlier
vlan: mask vlan prio bits
vlan: fix a race in egress prio management
Greg Kroah-Hartman (1):
Linux 3.10.4
Haiyang Zhang (1):
hyperv: Fix the NETIF_F_SG flag setting in netvsc
Hannes Frederic Sowa (7):
ipv6: only apply anti-spoofing checks to not-pointopoint tunnels
ipv6: call udp_push_pending_frames when uncorking a socket with AF_INET pending data
ipv6: ip6_append_data_mtu did not care about pmtudisc and frag_size
ipv6: rt6_check_neigh should successfully verify neigh if no NUD information are available
ipv6: in case of link failure remove route directly instead of letting it expire
ipv6: fix route selection if kernel is not compiled with CONFIG_IPV6_ROUTER_PREF
ipv6: only static routes qualify for equal cost multipathing
Jan Kara (1):
writeback: Fix periodic writeback after fs mount
Jason Wang (4):
tuntap: correctly linearize skb when zerocopy is used
macvtap: correctly linearize skb when zerocopy is used
tuntap: do not zerocopy if iov needs more pages than MAX_SKB_FRAGS
macvtap: do not zerocopy if iov needs more pages than MAX_SKB_FRAGS
Jongsung Kim (1):
net/cadence/macb: fix bug/typo in extracting gem_irq_read_clear bit
Kent Overstreet (6):
bcache: Fix a dumb race
bcache: Advertise that flushes are supported
bcache: Shutdown fix
bcache: Fix a sysfs splat on shutdown
bcache: Fix GC_SECTORS_USED() calculation
bcache: Journal replay fix
Liu ShuoX (1):
PM / Sleep: avoid 'autosleep' in shutdown progress
Luiz Angelo Daros de Luca (1):
usb: serial: cp210x: Add USB ID for Netgear Switches embedded serial adapter
Maarten Lankhorst (1):
alx: fix lockdep annotation
Markos Chandras (1):
lib/Kconfig.debug: Restrict FRAME_POINTER for MIPS
Michael S. Tsirkin (3):
virtio: support unlocked queue poll
virtio_net: fix race in RX VQ processing
vhost-net: fix use-after-free in vhost_net_flush
Mike Frysinger (1):
ARM: footbridge: fix overlapping PCI mappings
Miklos Szeredi (2):
fuse: readdirplus: fix instantiate
fuse: readdirplus: sanity checks
Neil Horman (2):
atl1e: fix dma mapping warnings
atl1e: unmap partially mapped skb on dma error and free skb
Niels de Vos (1):
fuse: readdirplus: fix dentry leak
Olivier DANET (1):
sparc32: vm_area_struct access for old Sun SPARCs.
Paolo Valente (1):
pkt_sched: sch_qfq: remove a source of high packet delay/jitter
Pravin B Shelar (1):
ip_tunnels: Use skb-len to PMTU check.
Ralf Baechle (2):
MIPS: Oceton: Fix build error.
RAPIDIO: IDT_GEN2: Fix build error.
Sami Rahman (1):
USB: cp210x: add MMB and PI ZigBee USB Device Support
Sarveshwar Bandi (1):
be2net: Fix to avoid hardware workaround when not needed
Sasha Levin (1):
9p: fix off by one causing access violations and memory corruption
Soeren Moch (1):
media: dmxdev: remove dvb_ringbuffer_flush() on writer side
Sreekanth Reddy (2):
SCSI: mpt3sas: Infinite loops can occur if MPI2_IOCSTATUS_CONFIG_INVALID_PAGE is not returned
SCSI: mpt3sas: fix for kernel panic when driver loads with HBA conected to non LUN 0 configured expander
Sylwester Nawrocki (1):
ARM: S3C24XX: Add missing clkdev entries for s3c2440 UART
Takashi Iwai (3):
media: saa7134: Fix unlocked snd_pcm_stop() call
ALSA: hda - Remove NO_PRESENCE bit override for Dell 1420n Laptop
ALSA: hda - Fix EAPD GPIO control for Sigmatel codecs
Theodore Ts'o (1):
ext4: fix error handling in ext4_ext_truncate()
Thomas Gleixner (1):
hrtimers: Move SMP function call to thread context
Wei Yongjun (1):
l2tp: add missing .owner to struct pppox_proto
dingtianhong (3):
ifb: fix rcu_sched self-detected stalls
dummy: fix oops when loading the dummy failed
ifb: fix oops when loading the ifb failed
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 3 +SUBLEVEL = 4 EXTRAVERSION = NAME = Unicycling Gorilla
arch/arm/mach-footbridge/dc21285.c +0 -2
@@ -276,8 +276,6 @@ int __init dc21285_setup(int nr, struct pci_sys_data *sys) sys->mem_offset =DC21285_PCI_MEM ; -pci_ioremap_io (0 ,DC21285_PCI_IO ); -pci_add_resource_offset (&sys->resources, &res[0 ], sys->mem_offset);pci_add_resource_offset (&sys->resources, &res[1 ], sys->mem_offset);
arch/arm/mach-s3c24xx/clock-s3c2410.c +98 -63
179 lines not on this page · raw message
arch/arm/mach-s3c24xx/clock-s3c2440.c +3 -0
@@ -166,6 +166,9 @@ static struct clk_lookup s3c2440_clk_lookup[] = {CLKDEV_INIT (NULL ,"clk_uart_baud1" , &s3c24xx_uclk),CLKDEV_INIT (NULL ,"clk_uart_baud2" , &clk_p),CLKDEV_INIT (NULL ,"clk_uart_baud3" , &s3c2440_clk_fclk_n), +CLKDEV_INIT ("s3c2440-uart.0" ,"uart" , &s3c24xx_clk_uart0), +CLKDEV_INIT ("s3c2440-uart.1" ,"uart" , &s3c24xx_clk_uart1), +CLKDEV_INIT ("s3c2440-uart.2" ,"uart" , &s3c24xx_clk_uart2), CLKDEV_INIT("s3c2440-camif", "camera", &s3c2440_clk_cam_upll), };
arch/arm/plat-samsung/include/plat/clock.h +5 -0
@@ -83,6 +83,11 @@ extern struct clk clk_ext;extern struct clksrc_clk clk_epllref;extern struct clksrc_clk clk_esysclk; +/* S3C24XX UART clocks */ +extern struct clk s3c24xx_clk_uart0; +extern struct clk s3c24xx_clk_uart1; +extern struct clk s3c24xx_clk_uart2; +/* S3C64XX specific clocks */ extern struct clk clk_h2;extern struct clk clk_27m;
arch/mips/cavium-octeon/setup.c +2 -1
@@ -7,6 +7,7 @@* Copyright (C) 2008, 2009 Wind River Systems * written by Ralf Baechle <[email protected]> */ +#include <linux/compiler.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/console.h>
@@ -712,7 +713,7 @@ void __init prom_init(void)if (cvmx_read_csr (CVMX_L2D_FUS3 ) & (3ull <<34 )) {pr_info ("Skipping L2 locking due to reduced L2 cache size\n" ); }else { -uint32_t ebase =read_c0_ebase () &0x3ffff000 ; +uint32_t __maybe_unused ebase =read_c0_ebase () &0x3ffff000 ;#ifdef CONFIG_CAVIUM_OCTEON_LOCK_L2_TLB /* TLB refill */ cvmx_l2c_lock_mem_region (ebase,0x100 );
arch/sparc/kernel/asm-offsets.c +2 -0
@@ -49,6 +49,8 @@ int foo(void)DEFINE (AOFF_task_thread, offsetof(struct task_struct , thread));BLANK ();DEFINE (AOFF_mm_context, offsetof(struct mm_struct , context)); +BLANK (); +DEFINE (VMA_VM_MM , offsetof(struct vm_area_struct , vm_mm));/* DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); */ return 0 ;
arch/sparc/mm/hypersparc.S +4 -4
@@ -74,7 +74,7 @@ hypersparc_flush_cache_mm_out: /* The things we do for performance... */ hypersparc_flush_cache_range: - ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 #ifndef CONFIG_SMP ld [%o0 + AOFF_mm_context], %g1 cmp %g1, -1
@@ -163,7 +163,7 @@ hypersparc_flush_cache_range_out: */ /* Verified, my ass... */ hypersparc_flush_cache_page: - ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 ld [%o0 + AOFF_mm_context], %g2 #ifndef CONFIG_SMP cmp %g2, -1
@@ -284,7 +284,7 @@ hypersparc_flush_tlb_mm_out: sta %g5, [%g1] ASI_M_MMUREGS hypersparc_flush_tlb_range: - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 mov SRMMU_CTX_REG, %g1 ld [%o0 + AOFF_mm_context], %o3 lda [%g1] ASI_M_MMUREGS, %g5
@@ -307,7 +307,7 @@ hypersparc_flush_tlb_range_out: sta %g5, [%g1] ASI_M_MMUREGS hypersparc_flush_tlb_page: - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 mov SRMMU_CTX_REG, %g1 ld [%o0 + AOFF_mm_context], %o3 andn %o1, (PAGE_SIZE - 1), %o1
arch/sparc/mm/swift.S +4 -4
@@ -105,7 +105,7 @@ swift_flush_cache_mm_out: .globl swift_flush_cache_range swift_flush_cache_range: - ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 sub %o2, %o1, %o2 sethi %hi(4096), %o3 cmp %o2, %o3
@@ -116,7 +116,7 @@ swift_flush_cache_range: .globl swift_flush_cache_page swift_flush_cache_page: - ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 70: ld [%o0 + AOFF_mm_context], %g2 cmp %g2, -1
@@ -219,7 +219,7 @@ swift_flush_sig_insns: .globl swift_flush_tlb_range .globl swift_flush_tlb_all swift_flush_tlb_range: - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 swift_flush_tlb_mm: ld [%o0 + AOFF_mm_context], %g2 cmp %g2, -1
@@ -233,7 +233,7 @@ swift_flush_tlb_all_out: .globl swift_flush_tlb_page swift_flush_tlb_page: - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 mov SRMMU_CTX_REG, %g1 ld [%o0 + AOFF_mm_context], %o3 andn %o1, (PAGE_SIZE - 1), %o1
arch/sparc/mm/tsunami.S +3 -3
@@ -24,7 +24,7 @@ /* Sliiick... */ tsunami_flush_cache_page: tsunami_flush_cache_range: - ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 tsunami_flush_cache_mm: ld [%o0 + AOFF_mm_context], %g2 cmp %g2, -1
@@ -46,7 +46,7 @@ tsunami_flush_sig_insns: /* More slick stuff... */ tsunami_flush_tlb_range: - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 tsunami_flush_tlb_mm: ld [%o0 + AOFF_mm_context], %g2 cmp %g2, -1
@@ -65,7 +65,7 @@ tsunami_flush_tlb_out: /* This one can be done in a fine grained manner... */ tsunami_flush_tlb_page: - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 mov SRMMU_CTX_REG, %g1 ld [%o0 + AOFF_mm_context], %o3 andn %o1, (PAGE_SIZE - 1), %o1
arch/sparc/mm/viking.S +5 -5
@@ -108,7 +108,7 @@ viking_mxcc_flush_page: viking_flush_cache_page: viking_flush_cache_range: #ifndef CONFIG_SMP - ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 #endif viking_flush_cache_mm: #ifndef CONFIG_SMP
@@ -148,7 +148,7 @@ viking_flush_tlb_mm: #endif viking_flush_tlb_range: - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 mov SRMMU_CTX_REG, %g1 ld [%o0 + AOFF_mm_context], %o3 lda [%g1] ASI_M_MMUREGS, %g5
@@ -173,7 +173,7 @@ viking_flush_tlb_range: #endif viking_flush_tlb_page: - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 mov SRMMU_CTX_REG, %g1 ld [%o0 + AOFF_mm_context], %o3 lda [%g1] ASI_M_MMUREGS, %g5
@@ -239,7 +239,7 @@ sun4dsmp_flush_tlb_range: tst %g5 bne 3f mov SRMMU_CTX_REG, %g1 - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 ld [%o0 + AOFF_mm_context], %o3 lda [%g1] ASI_M_MMUREGS, %g5 sethi %hi(~((1 << SRMMU_PGDIR_SHIFT) - 1)), %o4
@@ -265,7 +265,7 @@ sun4dsmp_flush_tlb_page: tst %g5 bne 2f mov SRMMU_CTX_REG, %g1 - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ + ld [%o0 + VMA_VM_MM], %o0 ld [%o0 + AOFF_mm_context], %o3 lda [%g1] ASI_M_MMUREGS, %g5 and %o1, PAGE_MASK, %o1
drivers/edac/edac_mc.c +9 -0
@@ -48,6 +48,8 @@ static LIST_HEAD(mc_devices);*/ static void const *edac_mc_owner; +static struct bus_type mc_bus[EDAC_MAX_MCS ]; +unsigned edac_dimm_info_location (struct dimm_info *dimm,char *buf,unsigned len) {
@@ -723,6 +725,11 @@ int edac_mc_add_mc(struct mem_ctl_info *mci)int ret = -EINVAL ;edac_dbg (0 ,"\n" ); +if (mci->mc_idx >=EDAC_MAX_MCS ) { +pr_warn_once ("Too many memory controllers: %d\n" , mci->mc_idx); +return -ENODEV ; + } +#ifdef CONFIG_EDAC_DEBUG if (edac_debug_level >=3 )edac_mc_dump_mci (mci);
@@ -762,6 +769,8 @@ int edac_mc_add_mc(struct mem_ctl_info *mci)/* set load time so that error rate can be tracked */ mci->start_time = jiffies; + mci->bus = &mc_bus[mci->mc_idx]; +if (edac_create_sysfs_mci_device (mci)) {edac_mc_printk (mci,KERN_WARNING ,"failed to create sysfs device\n" );
drivers/edac/edac_mc_sysfs.c +15 -13
@@ -370,7 +370,7 @@ static int edac_create_csrow_object(struct mem_ctl_info *mci,return -ENODEV ; csrow->dev.type = &csrow_attr_type; - csrow->dev.bus = &mci->bus; + csrow->dev.bus = mci->bus;device_initialize (&csrow->dev); csrow->dev.parent = &mci->dev; csrow->mci = mci;
@@ -605,7 +605,7 @@ static int edac_create_dimm_object(struct mem_ctl_info *mci, dimm->mci = mci; dimm->dev.type = &dimm_attr_type; - dimm->dev.bus = &mci->bus; + dimm->dev.bus = mci->bus;device_initialize (&dimm->dev); dimm->dev.parent = &mci->dev;
@@ -975,11 +975,13 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)* The memory controller needs its own bus, in order to avoid * namespace conflicts at /sys/bus/edac. */ - mci->bus.name =kasprintf (GFP_KERNEL ,"mc%d" , mci->mc_idx); -if (!mci->bus.name) + mci->bus->name =kasprintf (GFP_KERNEL ,"mc%d" , mci->mc_idx); +if (!mci->bus->name)return -ENOMEM ; -edac_dbg (0 ,"creating bus %s\n" , mci->bus.name); - err =bus_register (&mci->bus); + +edac_dbg (0 ,"creating bus %s\n" , mci->bus->name); + + err =bus_register (mci->bus);if (err <0 )return err;
@@ -988,7 +990,7 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)device_initialize (&mci->dev); mci->dev.parent = mci_pdev; - mci->dev.bus = &mci->bus; + mci->dev.bus = mci->bus;dev_set_name (&mci->dev,"mc%d" , mci->mc_idx);dev_set_drvdata (&mci->dev, mci);pm_runtime_forbid (&mci->dev);
@@ -997,8 +999,8 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) err =device_add (&mci->dev);if (err <0 ) {edac_dbg (1 ,"failure: create device %s\n" ,dev_name (&mci->dev)); -bus_unregister (&mci->bus); -kfree (mci->bus.name); +bus_unregister (mci->bus); +kfree (mci->bus->name);return err; }
@@ -1064,8 +1066,8 @@ fail: } fail2:device_unregister (&mci->dev); -bus_unregister (&mci->bus); -kfree (mci->bus.name); +bus_unregister (mci->bus); +kfree (mci->bus->name);return err; }
@@ -1098,8 +1100,8 @@ void edac_unregister_sysfs(struct mem_ctl_info *mci) {edac_dbg (1 ,"Unregistering device %s\n" ,dev_name (&mci->dev));device_unregister (&mci->dev); -bus_unregister (&mci->bus); -kfree (mci->bus.name); +bus_unregister (mci->bus); +kfree (mci->bus->name); }static void mc_attr_release (struct device *dev)
drivers/edac/i5100_edac.c +1 -1
@@ -974,7 +974,7 @@ static int i5100_setup_debugfs(struct mem_ctl_info *mci)if (!i5100_debugfs)return -ENODEV ; - priv->debugfs =debugfs_create_dir (mci->bus.name, i5100_debugfs); + priv->debugfs =debugfs_create_dir (mci->bus->name, i5100_debugfs);if (!priv->debugfs)return -ENOMEM ;
drivers/md/bcache/bcache.h +1 -0
@@ -437,6 +437,7 @@ struct bcache_device {/* If nonzero, we're detaching/unregistering from cache set */ atomic_t detaching; +int flush_done;atomic_long_t sectors_dirty;unsigned long sectors_dirty_gc;
drivers/md/bcache/btree.c +3 -1
@@ -1419,8 +1419,10 @@ static void btree_gc_start(struct cache_set *c)for_each_cache (ca, c, i)for_each_bucket (b, ca) { b->gc_gen = b->gen; -if (!atomic_read (&b->pin)) +if (!atomic_read (&b->pin)) {SET_GC_MARK (b,GC_MARK_RECLAIMABLE ); +SET_GC_SECTORS_USED (b,0 ); + } } for (d = c->devices;
drivers/md/bcache/closure.c +4 -2
@@ -66,16 +66,18 @@ static inline void closure_put_after_sub(struct closure *cl, int flags) }else {struct closure *parent = cl->parent;struct closure_waitlist *wait =closure_waitlist (cl); +closure_fn *destructor = cl->fn;closure_debug_destroy (cl); +smp_mb ();atomic_set (&cl->remaining,-1 );if (wait)closure_wake_up (wait); -if (cl->fn) - cl->fn (cl); +if (destructor) +destructor (cl);if (parent)closure_put (parent);
drivers/md/bcache/journal.c +6 -1
@@ -182,9 +182,14 @@ bsearch:pr_debug ("starting binary search, l %u r %u" , l, r);while (l +1 < r) { + seq = list_entry(list->prev, struct journal_replay, + list)->j.seq; + m = (l + r) >>1 ; +read_bucket (m); -if (read_bucket (m)) + if (seq != list_entry(list->prev, struct journal_replay, + list)->j.seq) l = m;else r = m;
drivers/md/bcache/request.c +7 -1
@@ -489,6 +489,12 @@ static void bch_insert_data_loop(struct closure *cl)bch_queue_gc (op->c); } +/* +* Journal writes are marked REQ_FLUSH; if the original write was a +* flush, it'll wait on the journal write. +*/ + bio->bi_rw &= ~(REQ_FLUSH |REQ_FUA ); + do { unsigned i; struct bkey *k;
@@ -716,7 +722,7 @@ static struct search *search_alloc(struct bio *bio, struct bcache_device *d) s->task = current; s->orig_bio = bio; s->write = (bio->bi_rw &REQ_WRITE ) !=0 ; - s->op.flush_journal = (bio->bi_rw &REQ_FLUSH ) !=0 ; + s->op.flush_journal = (bio->bi_rw & (REQ_FLUSH |REQ_FUA )) !=0 ; s->op.skip = (bio->bi_rw &REQ_DISCARD ) !=0 ; s->recoverable =1 ; s->start_time = jiffies;
drivers/md/bcache/super.c +23 -8
@@ -704,7 +704,8 @@ static void bcache_device_detach(struct bcache_device *d)atomic_set (&d->detaching,0 ); } -bcache_device_unlink (d); +if (!d->flush_done) +bcache_device_unlink (d); d->c->devices[d->id] =NULL ;closure_put (&d->c->caching);
@@ -781,6 +782,8 @@ static int bcache_device_init(struct bcache_device *d, unsigned block_size)set_bit (QUEUE_FLAG_NONROT , &d->disk->queue->queue_flags);set_bit (QUEUE_FLAG_DISCARD , &d->disk->queue->queue_flags); +blk_queue_flush (q,REQ_FLUSH |REQ_FUA ); +return 0 ; }
@@ -1014,6 +1017,14 @@ static void cached_dev_flush(struct closure *cl) struct cached_dev *dc = container_of(cl, struct cached_dev, disk.cl);struct bcache_device *d = &dc->disk; +mutex_lock (&bch_register_lock); + d->flush_done =1 ; + +if (d->c) +bcache_device_unlink (d); + +mutex_unlock (&bch_register_lock); +bch_cache_accounting_destroy (&dc->accounting);kobject_del (&d->kobj);
@@ -1303,18 +1314,22 @@ static void cache_set_flush(struct closure *cl)static void __cache_set_unregister (struct closure *cl) { struct cache_set *c = container_of(cl, struct cache_set, caching); -struct cached_dev *dc, *t; +struct cached_dev *dc;size_t i;mutex_lock (&bch_register_lock); -if (test_bit (CACHE_SET_UNREGISTERING , &c->flags)) -list_for_each_entry_safe (dc, t, &c->cached_devs, list) -bch_cached_dev_detach (dc); -for (i =0 ; i < c->nr_uuids; i++) -if (c->devices[i] &&UUID_FLASH_ONLY (&c->uuids[i])) -bcache_device_stop (c->devices[i]); +if (c->devices[i]) { +if (!UUID_FLASH_ONLY (&c->uuids[i]) && +test_bit (CACHE_SET_UNREGISTERING , &c->flags)) { + dc =container_of (c->devices[i], + struct cached_dev, disk); +bch_cached_dev_detach (dc); + }else { +bcache_device_stop (c->devices[i]); + } + }mutex_unlock (&bch_register_lock);
drivers/media/dvb-core/dmxdev.c +2 -6
@@ -377,10 +377,8 @@ static int dvb_dmxdev_section_callback(const u8 *buffer1, size_t buffer1_len, ret =dvb_dmxdev_buffer_write (&dmxdevfilter->buffer, buffer2, buffer2_len); } -if (ret <0 ) { -dvb_ringbuffer_flush (&dmxdevfilter->buffer); +if (ret <0 ) dmxdevfilter->buffer.error = ret; - }if (dmxdevfilter->params.sec.flags &DMX_ONESHOT ) dmxdevfilter->state =DMXDEV_STATE_DONE ;spin_unlock (&dmxdevfilter->dev->lock);
@@ -416,10 +414,8 @@ static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len, ret =dvb_dmxdev_buffer_write (buffer, buffer1, buffer1_len);if (ret == buffer1_len) ret =dvb_dmxdev_buffer_write (buffer, buffer2, buffer2_len); -if (ret <0 ) { -dvb_ringbuffer_flush (buffer); +if (ret <0 ) buffer->error = ret; - }spin_unlock (&dmxdevfilter->dev->lock);wake_up (&buffer->queue);return 0 ;
drivers/media/pci/saa7134/saa7134-alsa.c +2 -0
@@ -172,7 +172,9 @@ static void saa7134_irq_alsa_done(struct saa7134_dev *dev,dprintk ("irq: overrun [full=%d/%d] - Blocks in %d\n" ,dev->dmasound.read_count, dev->dmasound.bufsize, dev->dmasound.blocks);spin_unlock (&dev->slock); +snd_pcm_stream_lock (dev->dmasound.substream);snd_pcm_stop (dev->dmasound.substream,SNDRV_PCM_STATE_XRUN ); +snd_pcm_stream_unlock (dev->dmasound.substream);return ; }
drivers/net/dummy.c +4 -0
@@ -185,6 +185,8 @@ static int __init dummy_init_module(void)rtnl_lock (); err =__rtnl_link_register (&dummy_link_ops); +if (err <0 ) + goto out;for (i =0 ; i < numdummies && !err; i++) { err =dummy_init_one ();
@@ -192,6 +194,8 @@ static int __init dummy_init_module(void) }if (err <0 )__rtnl_link_unregister (&dummy_link_ops); + +out:rtnl_unlock ();return err;
drivers/net/ethernet/atheros/alx/main.c +2 -3
@@ -1303,6 +1303,8 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)SET_NETDEV_DEV (netdev, &pdev->dev); alx =netdev_priv (netdev); +spin_lock_init (&alx->hw.mdio_lock); +spin_lock_init (&alx->irq_lock); alx->dev = netdev; alx->hw.pdev = pdev; alx->msg_enable = NETIF_MSG_LINK | NETIF_MSG_HW | NETIF_MSG_IFUP |
@@ -1385,9 +1387,6 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)INIT_WORK (&alx->link_check_wk, alx_link_check);INIT_WORK (&alx->reset_wk, alx_reset); -spin_lock_init (&alx->hw.mdio_lock); -spin_lock_init (&alx->irq_lock); -netif_carrier_off (netdev); err =register_netdev (netdev);
drivers/net/ethernet/atheros/atl1e/atl1e_main.c +47 -3
95 lines not on this page · raw message
drivers/net/ethernet/cadence/macb.c +1 -1
@@ -1070,7 +1070,7 @@ static void macb_configure_dma(struct macb *bp)static void macb_configure_caps (struct macb *bp) {if (macb_is_gem (bp)) { -if (GEM_BF (IRQCOR ,gem_readl (bp,DCFG1 )) ==0 ) +if (GEM_BFEXT (IRQCOR ,gem_readl (bp,DCFG1 )) ==0 ) bp->caps |=MACB_CAPS_ISR_CLEAR_ON_WRITE ; } }
drivers/net/ethernet/emulex/benet/be_main.c +10 -4
@@ -782,16 +782,22 @@ static struct sk_buff *be_insert_vlan_in_pkt(struct be_adapter *adapter,if (vlan_tx_tag_present (skb)) vlan_tag =be_get_tx_vlan_tag (adapter, skb); -else if (qnq_async_evt_rcvd (adapter) && adapter->pvid) - vlan_tag = adapter->pvid; + +if (qnq_async_evt_rcvd (adapter) && adapter->pvid) { +if (!vlan_tag) + vlan_tag = adapter->pvid; +/* f/w workaround to set skip_hw_vlan = 1, informs the F/W to +* skip VLAN insertion +*/ +if (skip_hw_vlan) + *skip_hw_vlan = true; + }if (vlan_tag) { skb =__vlan_put_tag (skb,htons (ETH_P_8021Q ), vlan_tag);if (unlikely (!skb))return skb; skb->vlan_tci =0 ; -if (skip_hw_vlan) - *skip_hw_vlan = true; }/* Insert the outer VLAN, if any */
drivers/net/ethernet/sfc/rx.c +20 -7
@@ -282,9 +282,9 @@ static void efx_fini_rx_buffer(struct efx_rx_queue *rx_queue, }/* Recycle the pages that are used by buffers that have just been received. */ -static void efx_recycle_rx_buffers (struct efx_channel *channel, -struct efx_rx_buffer *rx_buf, -unsigned int n_frags) +static void efx_recycle_rx_pages (struct efx_channel *channel, +struct efx_rx_buffer *rx_buf, +unsigned int n_frags) {struct efx_rx_queue *rx_queue =efx_channel_get_rx_queue (channel);
@@ -294,6 +294,20 @@ static void efx_recycle_rx_buffers(struct efx_channel *channel, }while (--n_frags); } +static void efx_discard_rx_packet (struct efx_channel *channel, +struct efx_rx_buffer *rx_buf, +unsigned int n_frags) +{ +struct efx_rx_queue *rx_queue =efx_channel_get_rx_queue (channel); + +efx_recycle_rx_pages (channel, rx_buf, n_frags); + +do { +efx_free_rx_buffer (rx_buf); + rx_buf =efx_rx_buf_next (rx_queue, rx_buf); + }while (--n_frags); +} +/** * efx_fast_push_rx_descriptors - push new RX descriptors quickly * @rx_queue: RX descriptor queue
@@ -533,8 +547,7 @@ void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index,*/ if (unlikely (rx_buf->flags &EFX_RX_PKT_DISCARD )) {efx_rx_flush_packet (channel); -put_page (rx_buf->page); -efx_recycle_rx_buffers (channel, rx_buf, n_frags); +efx_discard_rx_packet (channel, rx_buf, n_frags);return ; }
@@ -570,9 +583,9 @@ void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index,efx_sync_rx_buffer (efx, rx_buf, rx_buf->len); } -/* All fragments have been DMA-synced, so recycle buffers and pages. */ +/* All fragments have been DMA-synced, so recycle pages. */ rx_buf =efx_rx_buffer (rx_queue, index); -efx_recycle_rx_buffers (channel, rx_buf, n_frags); +efx_recycle_rx_pages (channel, rx_buf, n_frags);/* Pipeline receives so that we give time for packet headers to be * prefetched into cache.
drivers/net/ethernet/sun/sunvnet.c +2 -0
@@ -1239,6 +1239,8 @@ static int vnet_port_remove(struct vio_dev *vdev)dev_set_drvdata (&vdev->dev,NULL );kfree (port); + +unregister_netdev (vp->dev); }return 0 ; }
drivers/net/hyperv/netvsc_drv.c +2 -2
@@ -431,8 +431,8 @@ static int netvsc_probe(struct hv_device *dev, net->netdev_ops = &device_ops;/* TODO: Add GSO and Checksum offload */ - net->hw_features =NETIF_F_SG ; - net->features =NETIF_F_SG |NETIF_F_HW_VLAN_CTAG_TX ; + net->hw_features =0 ; + net->features =NETIF_F_HW_VLAN_CTAG_TX ;SET_ETHTOOL_OPS (net, ðtool_ops);SET_NETDEV_DEV (net, &dev->device);
drivers/net/ifb.c +7 -1
@@ -291,11 +291,17 @@ static int __init ifb_init_module(void)rtnl_lock (); err =__rtnl_link_register (&ifb_link_ops); +if (err <0 ) + goto out; -for (i =0 ; i < numifbs && !err; i++) +for (i =0 ; i < numifbs && !err; i++) { err =ifb_init_one (i); +cond_resched (); + }if (err)__rtnl_link_unregister (&ifb_link_ops); + +out:rtnl_unlock ();return err;
drivers/net/macvtap.c +41 -25
95 lines not on this page · raw message
drivers/net/tun.c +43 -26
98 lines not on this page · raw message
drivers/net/virtio_net.c +3 -2
@@ -602,7 +602,7 @@ static int virtnet_poll(struct napi_struct *napi, int budget) container_of(napi, struct receive_queue, napi);struct virtnet_info *vi = rq->vq->vdev->priv;void *buf; -unsigned int len, received =0 ; +unsigned int r, len, received =0 ; again: while (received < budget &&
@@ -619,8 +619,9 @@ again:/* Out of packets? */ if (received < budget) { + r =virtqueue_enable_cb_prepare (rq->vq);napi_complete (napi); -if (unlikely (!virtqueue_enable_cb (rq->vq)) && +if (unlikely (virtqueue_poll (rq->vq, r)) &&napi_schedule_prep (napi)) {virtqueue_disable_cb (rq->vq);__napi_schedule (napi);
drivers/rapidio/switches/idt_gen2.c +2 -0
@@ -15,6 +15,8 @@#include <linux/rio_drv.h> #include <linux/rio_ids.h> #include <linux/delay.h> + +#include <asm/page.h> #include "../rio.h" #define LOCAL_RTE_CONF_DESTID_SEL 0x010070
drivers/scsi/megaraid/megaraid_sas_base.c +6 -4
@@ -4852,10 +4852,12 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance, sense, sense_handle); } -for (i =0 ; i < ioc->sge_count && kbuff_arr[i]; i++) { -dma_free_coherent (&instance->pdev->dev, - kern_sge32[i].length, - kbuff_arr[i], kern_sge32[i].phys_addr); +for (i =0 ; i < ioc->sge_count; i++) { +if (kbuff_arr[i]) +dma_free_coherent (&instance->pdev->dev, + kern_sge32[i].length, + kbuff_arr[i], + kern_sge32[i].phys_addr); }megasas_return_cmd (instance, cmd);
drivers/scsi/mpt3sas/mpt3sas_scsih.c +18 -12
@@ -1273,6 +1273,7 @@ _scsih_slave_alloc(struct scsi_device *sdev)struct MPT3SAS_DEVICE *sas_device_priv_data;struct scsi_target *starget;struct _raid_device *raid_device; +struct _sas_device *sas_device;unsigned long flags; sas_device_priv_data =kzalloc (sizeof (struct scsi_device ),GFP_KERNEL );
@@ -1301,6 +1302,19 @@ _scsih_slave_alloc(struct scsi_device *sdev)spin_unlock_irqrestore (&ioc->raid_device_lock, flags); } +if (!(sas_target_priv_data->flags &MPT_TARGET_FLAGS_VOLUME )) { +spin_lock_irqsave (&ioc->sas_device_lock, flags); + sas_device =mpt3sas_scsih_sas_device_find_by_sas_address (ioc, + sas_target_priv_data->sas_address); +if (sas_device && (sas_device->starget ==NULL )) { +sdev_printk (KERN_INFO , sdev, +"%s : sas_device->starget set to starget @ %d\n" , + __func__, __LINE__); + sas_device->starget = starget; + } +spin_unlock_irqrestore (&ioc->sas_device_lock, flags); + } +return 0 ; }
@@ -6392,7 +6406,7 @@ _scsih_search_responding_sas_devices(struct MPT3SAS_ADAPTER *ioc) handle))) { ioc_status =le16_to_cpu (mpi_reply.IOCStatus) &MPI2_IOCSTATUS_MASK ; -if (ioc_status ==MPI2_IOCSTATUS_CONFIG_INVALID_PAGE ) +if (ioc_status !=MPI2_IOCSTATUS_SUCCESS )break ; handle =le16_to_cpu (sas_device_pg0.DevHandle); device_info =le32_to_cpu (sas_device_pg0.DeviceInfo);
@@ -6494,7 +6508,7 @@ _scsih_search_responding_raid_devices(struct MPT3SAS_ADAPTER *ioc) &volume_pg1, MPI2_RAID_VOLUME_PGAD_FORM_GET_NEXT_HANDLE, handle))) { ioc_status =le16_to_cpu (mpi_reply.IOCStatus) &MPI2_IOCSTATUS_MASK ; -if (ioc_status ==MPI2_IOCSTATUS_CONFIG_INVALID_PAGE ) +if (ioc_status !=MPI2_IOCSTATUS_SUCCESS )break ; handle =le16_to_cpu (volume_pg1.DevHandle);
@@ -6518,7 +6532,7 @@ _scsih_search_responding_raid_devices(struct MPT3SAS_ADAPTER *ioc) phys_disk_num))) { ioc_status =le16_to_cpu (mpi_reply.IOCStatus) &MPI2_IOCSTATUS_MASK ; -if (ioc_status ==MPI2_IOCSTATUS_CONFIG_INVALID_PAGE ) +if (ioc_status !=MPI2_IOCSTATUS_SUCCESS )break ; phys_disk_num = pd_pg0.PhysDiskNum; handle =le16_to_cpu (pd_pg0.DevHandle);
@@ -6597,7 +6611,7 @@ _scsih_search_responding_expanders(struct MPT3SAS_ADAPTER *ioc) ioc_status =le16_to_cpu (mpi_reply.IOCStatus) &MPI2_IOCSTATUS_MASK ; -if (ioc_status ==MPI2_IOCSTATUS_CONFIG_INVALID_PAGE ) +if (ioc_status !=MPI2_IOCSTATUS_SUCCESS )break ; handle =le16_to_cpu (expander_pg0.DevHandle);
@@ -6742,8 +6756,6 @@ _scsih_scan_for_devices_after_reset(struct MPT3SAS_ADAPTER *ioc) MPI2_SAS_EXPAND_PGAD_FORM_GET_NEXT_HNDL, handle))) { ioc_status =le16_to_cpu (mpi_reply.IOCStatus) &MPI2_IOCSTATUS_MASK ; -if (ioc_status ==MPI2_IOCSTATUS_CONFIG_INVALID_PAGE ) -break ;if (ioc_status !=MPI2_IOCSTATUS_SUCCESS ) { pr_info(MPT3SAS_FMT "\tbreak from expander scan: " \ "ioc_status(0x%04x), loginfo(0x%08x)\n",
@@ -6787,8 +6799,6 @@ _scsih_scan_for_devices_after_reset(struct MPT3SAS_ADAPTER *ioc) phys_disk_num))) { ioc_status =le16_to_cpu (mpi_reply.IOCStatus) &MPI2_IOCSTATUS_MASK ; -if (ioc_status ==MPI2_IOCSTATUS_CONFIG_INVALID_PAGE ) -break ;if (ioc_status !=MPI2_IOCSTATUS_SUCCESS ) { pr_info(MPT3SAS_FMT "\tbreak from phys disk scan: "\ "ioc_status(0x%04x), loginfo(0x%08x)\n",
@@ -6854,8 +6864,6 @@ _scsih_scan_for_devices_after_reset(struct MPT3SAS_ADAPTER *ioc) &volume_pg1, MPI2_RAID_VOLUME_PGAD_FORM_GET_NEXT_HANDLE, handle))) { ioc_status =le16_to_cpu (mpi_reply.IOCStatus) &MPI2_IOCSTATUS_MASK ; -if (ioc_status ==MPI2_IOCSTATUS_CONFIG_INVALID_PAGE ) -break ;if (ioc_status !=MPI2_IOCSTATUS_SUCCESS ) { pr_info(MPT3SAS_FMT "\tbreak from volume scan: " \ "ioc_status(0x%04x), loginfo(0x%08x)\n",
@@ -6914,8 +6922,6 @@ _scsih_scan_for_devices_after_reset(struct MPT3SAS_ADAPTER *ioc) handle))) { ioc_status =le16_to_cpu (mpi_reply.IOCStatus) &MPI2_IOCSTATUS_MASK ; -if (ioc_status ==MPI2_IOCSTATUS_CONFIG_INVALID_PAGE ) -break ;if (ioc_status !=MPI2_IOCSTATUS_SUCCESS ) { pr_info(MPT3SAS_FMT "\tbreak from end device scan:"\ " ioc_status(0x%04x), loginfo(0x%08x)\n",
drivers/usb/serial/cp210x.c +4 -0
@@ -53,6 +53,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ { USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ { USB_DEVICE(0x0745, 0x1000) }, /* CipherLab USB CCD Barcode Scanner 1000 */ + { USB_DEVICE(0x0846, 0x1100) }, /* NetGear Managed Switch M4100 series, M5300 series, M7100 series */ { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */ { USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */ { USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */
@@ -118,6 +119,8 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */ { USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */ { USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */ + { USB_DEVICE(0x10C4, 0x88A4) }, /* MMB Networks ZigBee USB Device */ + { USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */ { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */
@@ -148,6 +151,7 @@ static const struct usb_device_id id_table[] = { { 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 */ + { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */ { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */
drivers/usb/serial/option.c +13 -10
@@ -341,17 +341,12 @@ static void option_instat_callback(struct urb *urb);#define OLIVETTI_VENDOR_ID 0x0b3c#define OLIVETTI_PRODUCT_OLICARD100 0xc000#define OLIVETTI_PRODUCT_OLICARD145 0xc003 +#define OLIVETTI_PRODUCT_OLICARD200 0xc005/* Celot products */ #define CELOT_VENDOR_ID 0x211f#define CELOT_PRODUCT_CT680M 0x6801 -/* ONDA Communication vendor id */ -#define ONDA_VENDOR_ID 0x1ee8 - -/* ONDA MT825UP HSDPA 14.2 modem */ -#define ONDA_MT825UP 0x000b -/* Samsung products */ #define SAMSUNG_VENDOR_ID 0x04e8#define SAMSUNG_PRODUCT_GT_B3730 0x6889
@@ -444,7 +439,8 @@ static void option_instat_callback(struct urb *urb);/* Hyundai Petatel Inc. products */ #define PETATEL_VENDOR_ID 0x1ff4 -#define PETATEL_PRODUCT_NP10T 0x600e +#define PETATEL_PRODUCT_NP10T_600A 0x600a +#define PETATEL_PRODUCT_NP10T_600E 0x600e/* TP-LINK Incorporated products */ #define TPLINK_VENDOR_ID 0x2357
@@ -782,6 +778,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC650) }, { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) },
@@ -817,7 +814,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0018, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff), + .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0020, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0021, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
@@ -1256,8 +1254,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) }, + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200) }, { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ - { USB_DEVICE(ONDA_VENDOR_ID, ONDA_MT825UP) }, /* ONDA MT825UP modem */ { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) }, { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM610) },
@@ -1329,9 +1327,12 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) }, { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) }, { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) }, - { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T) }, + { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600A) }, + { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600E) }, { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180), .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { USB_DEVICE(TPLINK_VENDOR_ID, 0x9000), /* TP-Link MA260 */ + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(CHANGHONG_VENDOR_ID, CHANGHONG_PRODUCT_CH690) }, { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x02, 0x01) }, /* D-Link DWM-156 (variant) */ { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x00, 0x00) }, /* D-Link DWM-156 (variant) */
@@ -1339,6 +1340,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x00, 0x00) }, { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) }, { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) }, + { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ + { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */ { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
drivers/vhost/net.c +7 -2
@@ -150,6 +150,11 @@ static void vhost_net_ubuf_put_and_wait(struct vhost_net_ubuf_ref *ubufs) {kref_put (&ubufs->kref, vhost_net_zerocopy_done_signal);wait_event (ubufs->wait, !atomic_read (&ubufs->kref.refcount)); +} + +static void vhost_net_ubuf_put_wait_and_free (struct vhost_net_ubuf_ref *ubufs) +{ +vhost_net_ubuf_put_and_wait (ubufs);kfree (ubufs); }
@@ -948,7 +953,7 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd)mutex_unlock (&vq->mutex);if (oldubufs) { -vhost_net_ubuf_put_and_wait (oldubufs); +vhost_net_ubuf_put_wait_and_free (oldubufs);mutex_lock (&vq->mutex);vhost_zerocopy_signal_used (n, vq);mutex_unlock (&vq->mutex);
@@ -966,7 +971,7 @@ err_used:rcu_assign_pointer (vq->private_data, oldsock);vhost_net_enable_vq (n, vq);if (ubufs) -vhost_net_ubuf_put_and_wait (ubufs); +vhost_net_ubuf_put_wait_and_free (ubufs); err_ubufs:fput (sock->file); err_vq:
drivers/virtio/virtio_ring.c +44 -12
78 lines not on this page · raw message
fs/block_dev.c +8 -1
@@ -58,17 +58,24 @@ static void bdev_inode_switch_bdi(struct inode *inode, struct backing_dev_info *dst) {struct backing_dev_info *old = inode->i_data.backing_dev_info; +bool wakeup_bdi = false;if (unlikely (dst == old))/* deadlock avoidance */ return ;bdi_lock_two (&old->wb, &dst->wb);spin_lock (&inode->i_lock); inode->i_data.backing_dev_info = dst; -if (inode->i_state &I_DIRTY ) +if (inode->i_state &I_DIRTY ) { +if (bdi_cap_writeback_dirty (dst) && !wb_has_dirty_io (&dst->wb)) + wakeup_bdi = true;list_move (&inode->i_wb_list, &dst->wb.b_dirty); + }spin_unlock (&inode->i_lock);spin_unlock (&old->wb.list_lock);spin_unlock (&dst->wb.list_lock); + +if (wakeup_bdi) +bdi_wakeup_thread_delayed (dst); }/* Kill _all_ buffers and pagecache , dirty or not.. */
fs/ext4/extents.c +11 -0
@@ -4386,9 +4386,20 @@ void ext4_ext_truncate(handle_t *handle, struct inode *inode) last_block = (inode->i_size + sb->s_blocksize -1 ) >>EXT4_BLOCK_SIZE_BITS (sb); +retry: err =ext4_es_remove_extent (inode, last_block,EXT_MAX_BLOCKS - last_block); +if (err ==ENOMEM ) { +cond_resched (); +congestion_wait (BLK_RW_ASYNC ,HZ /50 ); + goto retry; + } +if (err) { +ext4_std_error (inode->i_sb, err); +return ; + } err =ext4_ext_remove_space (inode, last_block,EXT_MAX_BLOCKS -1 ); +ext4_std_error (inode->i_sb, err); } static void ext4_falloc_update_inode(struct inode *inode,
fs/fuse/dir.c +31 -9
@@ -1225,13 +1225,29 @@ static int fuse_direntplus_link(struct file *file,if (name.name[1 ] =='.' && name.len ==2 )return 0 ; } + +if (invalid_nodeid (o->nodeid)) +return -EIO ; +if (!fuse_valid_type (o->attr.mode)) +return -EIO ; + fc =get_fuse_conn (dir); name.hash =full_name_hash (name.name, name.len); dentry =d_lookup (parent, &name); -if (dentry && dentry->d_inode) { +if (dentry) { inode = dentry->d_inode; -if (get_node_id (inode) == o->nodeid) { +if (!inode) { +d_drop (dentry); + }else if (get_node_id (inode) != o->nodeid || + ((o->attr.mode ^ inode->i_mode) &S_IFMT )) { + err =d_invalidate (dentry); +if (err) + goto out; + }else if (is_bad_inode (inode)) { + err = -EIO ; + goto out; + }else {struct fuse_inode *fi; fi =get_fuse_inode (inode);spin_lock (&fc->lock);
@@ -1244,9 +1260,6 @@ static int fuse_direntplus_link(struct file *file,*/ goto found; } - err =d_invalidate (dentry); -if (err) - goto out;dput (dentry); dentry =NULL ; }
@@ -1261,10 +1274,19 @@ static int fuse_direntplus_link(struct file *file,if (!inode) goto out; - alias =d_materialise_unique (dentry, inode); - err =PTR_ERR (alias); -if (IS_ERR (alias)) - goto out; +if (S_ISDIR (inode->i_mode)) { +mutex_lock (&fc->inst_mutex); + alias =fuse_d_add_directory (dentry, inode); +mutex_unlock (&fc->inst_mutex); + err =PTR_ERR (alias); +if (IS_ERR (alias)) { +iput (inode); + goto out; + } + }else { + alias =d_splice_alias (inode, dentry); + } +if (alias) {dput (dentry); dentry = alias;
fs/lockd/svclock.c +4 -0
@@ -939,6 +939,7 @@ nlmsvc_retry_blocked(void)unsigned long timeout =MAX_SCHEDULE_TIMEOUT ;struct nlm_block *block; +spin_lock (&nlm_blocked_lock);while (!list_empty (&nlm_blocked) && !kthread_should_stop ()) { block = list_entry(nlm_blocked.next, struct nlm_block, b_list);
@@ -948,6 +949,7 @@ nlmsvc_retry_blocked(void) timeout = block->b_when - jiffies;break ; } +spin_unlock (&nlm_blocked_lock);dprintk ("nlmsvc_retry_blocked(%p, when=%ld)\n" , block, block->b_when);
@@ -957,7 +959,9 @@ nlmsvc_retry_blocked(void)retry_deferred_block (block); }else nlmsvc_grant_blocked (block); +spin_lock (&nlm_blocked_lock); } +spin_unlock (&nlm_blocked_lock);return timeout; }
include/linux/edac.h +6 -1
@@ -622,7 +622,7 @@ struct edac_raw_error_desc {*/ struct mem_ctl_info {struct device dev; -struct bus_type bus; +struct bus_type *bus;struct list_head link;/* for global list of mem_ctl_info structs */
@@ -742,4 +742,9 @@ struct mem_ctl_info { #endif }; +/* +* Maximum number of memory controllers in the coherent fabric. +*/ +#define EDAC_MAX_MCS 16 +#endif
include/linux/if_vlan.h +1 -2
@@ -79,9 +79,8 @@ static inline int is_vlan_dev(struct net_device *dev) }#define vlan_tx_tag_present (__skb) ((__skb)->vlan_tci & VLAN_TAG_PRESENT) -#define vlan_tx_nonzero_tag_present (__skb) \ - (vlan_tx_tag_present(__skb) && ((__skb)->vlan_tci & VLAN_VID_MASK))#define vlan_tx_tag_get (__skb) ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT) +#define vlan_tx_tag_get_id (__skb) ((__skb)->vlan_tci & VLAN_VID_MASK)#if defined(CONFIG_VLAN_8021Q ) || defined(CONFIG_VLAN_8021Q_MODULE )
include/linux/virtio.h +4 -0
@@ -70,6 +70,10 @@ void virtqueue_disable_cb(struct virtqueue *vq);bool virtqueue_enable_cb (struct virtqueue *vq); +unsigned virtqueue_enable_cb_prepare (struct virtqueue *vq); + +bool virtqueue_poll (struct virtqueue *vq,unsigned ); +bool virtqueue_enable_cb_delayed (struct virtqueue *vq);void *virtqueue_detach_unused_buf (struct virtqueue *vq);
include/net/addrconf.h +3 -0
@@ -86,6 +86,9 @@ extern int ipv6_dev_get_saddr(struct net *net,const struct in6_addr *daddr, unsigned int srcprefs, struct in6_addr *saddr); +extern int __ipv6_get_lladdr (struct inet6_dev *idev, +struct in6_addr *addr, +unsigned char banned_flags);extern int ipv6_get_lladdr (struct net_device *dev,struct in6_addr *addr,unsigned char banned_flags);
include/net/udp.h +1 -0
@@ -181,6 +181,7 @@ extern int udp_get_port(struct sock *sk, unsigned short snum,extern void udp_err (struct sk_buff *,u32 );extern int udp_sendmsg (struct kiocb *iocb,struct sock *sk,struct msghdr *msg,size_t len); +extern int udp_push_pending_frames (struct sock *sk);extern void udp_flush_pending_frames (struct sock *sk);extern int udp_rcv (struct sk_buff *skb);extern int udp_ioctl (struct sock *sk,int cmd,unsigned long arg);
include/uapi/linux/if_pppox.h +2 -2
@@ -135,11 +135,11 @@ struct pppoe_tag {struct pppoe_hdr {#if defined(__LITTLE_ENDIAN_BITFIELD) -__u8 ver :4 ;__u8 type :4 ; +__u8 ver :4 ;#elif defined(__BIG_ENDIAN_BITFIELD) -__u8 type :4 ;__u8 ver :4 ; +__u8 type :4 ;#else #error "Please fix <asm/byteorder.h>"#endif
kernel/hrtimer.c +13 -15
@@ -721,17 +721,20 @@ static int hrtimer_switch_to_hres(void)return 1 ; } +static void clock_was_set_work (struct work_struct *work) +{ +clock_was_set (); +} + +static DECLARE_WORK(hrtimer_work, clock_was_set_work); +/* -* Called from timekeeping code to reprogramm the hrtimer interrupt -* device. If called from the timer interrupt context we defer it to -* softirq context. +* Called from timekeeping and resume code to reprogramm the hrtimer +* interrupt device on all cpus. */ void clock_was_set_delayed (void ) { -struct hrtimer_cpu_base *cpu_base = &__get_cpu_var (hrtimer_bases); - - cpu_base->clock_was_set =1 ; -__raise_softirq_irqoff (HRTIMER_SOFTIRQ ); +schedule_work (&hrtimer_work); }#else
@@ -780,8 +783,10 @@ void hrtimers_resume(void)WARN_ONCE (!irqs_disabled (),KERN_INFO "hrtimers_resume() called with IRQs enabled!" ); +/* Retrigger on the local CPU */ retrigger_next_event (NULL ); -timerfd_clock_was_set (); +/* And schedule a retrigger for all others */ +clock_was_set_delayed (); }static inline void timer_stats_hrtimer_set_start_info (struct hrtimer *timer)
@@ -1432,13 +1437,6 @@ void hrtimer_peek_ahead_timers(void)static void run_hrtimer_softirq (struct softirq_action *h) { -struct hrtimer_cpu_base *cpu_base = &__get_cpu_var (hrtimer_bases); - -if (cpu_base->clock_was_set) { - cpu_base->clock_was_set =0 ; -clock_was_set (); - } -hrtimer_peek_ahead_timers (); }
kernel/power/autosleep.c +2 -1
@@ -32,7 +32,8 @@ static void try_to_suspend(struct work_struct *work)mutex_lock (&autosleep_lock); -if (!pm_save_wakeup_count (initial_count)) { +if (!pm_save_wakeup_count (initial_count) || + system_state !=SYSTEM_RUNNING ) {mutex_unlock (&autosleep_lock); goto out; }
lib/Kconfig.debug +1 -1
@@ -1272,7 +1272,7 @@ config FAULT_INJECTION_STACKTRACE_FILTER depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT depends on !X86_64 select STACKTRACE - select FRAME_POINTER if !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND + select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND help Provide stacktrace filter for fault-injection capabilities
net/8021q/vlan_core.c +1 -1
@@ -9,7 +9,7 @@ bool vlan_do_receive(struct sk_buff **skbp) {struct sk_buff *skb = *skbp;__be16 vlan_proto = skb->vlan_proto; -u16 vlan_id = skb->vlan_tci &VLAN_VID_MASK ; +u16 vlan_id =vlan_tx_tag_get_id (skb);struct net_device *vlan_dev;struct vlan_pcpu_stats *rx_stats;
net/8021q/vlan_dev.c +7 -0
@@ -73,6 +73,8 @@ vlan_dev_get_egress_qos_mask(struct net_device *dev, struct sk_buff *skb) {struct vlan_priority_tci_mapping *mp; +smp_rmb ();/* coupled with smp_wmb() in vlan_dev_set_egress_priority() */ + mp =vlan_dev_priv (dev)->egress_priority_map[(skb->priority &0xF )];while (mp) {if (mp->priority == skb->priority) {
@@ -249,6 +251,11 @@ int vlan_dev_set_egress_priority(const struct net_device *dev, np->next = mp; np->priority = skb_prio; np->vlan_qos = vlan_qos; +/* Before inserting this element in hash table, make sure all its fields +* are committed to memory. +* coupled with smp_rmb() in vlan_dev_get_egress_qos_mask() +*/ +smp_wmb (); vlan->egress_priority_map[skb_prio &0xF ] = np;if (vlan_qos) vlan->nr_egress_mappings++;
net/9p/trans_common.c +5 -5
@@ -24,11 +24,11 @@*/ void p9_release_pages (struct page **pages,int nr_pages) { -int i =0 ; -while (pages[i] && nr_pages--) { -put_page (pages[i]); - i++; - } +int i; + +for (i =0 ; i < nr_pages; i++) +if (pages[i]) +put_page (pages[i]); }EXPORT_SYMBOL (p9_release_pages);
net/core/dev.c +9 -2
@@ -3513,8 +3513,15 @@ ncls: } } -if (vlan_tx_nonzero_tag_present (skb)) - skb->pkt_type =PACKET_OTHERHOST ; +if (unlikely (vlan_tx_tag_present (skb))) { +if (vlan_tx_tag_get_id (skb)) + skb->pkt_type =PACKET_OTHERHOST ; +/* Note: we might in the future use prio bits +* and set skb->priority like in vlan_do_receive() +* For the time being, just ignore Priority Code Point +*/ + skb->vlan_tci =0 ; + }/* deliver only exact match when indicated */ null_or_dev = deliver_exact ? skb->dev :NULL ;
net/core/neighbour.c +7 -5
@@ -231,7 +231,7 @@ static void neigh_flush_dev(struct neigh_table *tbl, struct net_device *dev)we must kill timers etc. and move it to safe state. */ -skb_queue_purge (&n->arp_queue); +__skb_queue_purge (&n->arp_queue); n->arp_queue_len_bytes =0 ; n->output = neigh_blackhole;if (n->nud_state &NUD_VALID )
@@ -286,7 +286,7 @@ static struct neighbour *neigh_alloc(struct neigh_table *tbl, struct net_deviceif (!n) goto out_entries; -skb_queue_head_init (&n->arp_queue); +__skb_queue_head_init (&n->arp_queue);rwlock_init (&n->lock);seqlock_init (&n->ha_lock); n->updated = n->used = now;
@@ -708,7 +708,9 @@ void neigh_destroy(struct neighbour *neigh)if (neigh_del_timer (neigh))pr_warn ("Impossible event\n" ); -skb_queue_purge (&neigh->arp_queue); +write_lock_bh (&neigh->lock); +__skb_queue_purge (&neigh->arp_queue); +write_unlock_bh (&neigh->lock); neigh->arp_queue_len_bytes =0 ;if (dev->netdev_ops->ndo_neigh_destroy)
@@ -858,7 +860,7 @@ static void neigh_invalidate(struct neighbour *neigh) neigh->ops->error_report (neigh, skb);write_lock (&neigh->lock); } -skb_queue_purge (&neigh->arp_queue); +__skb_queue_purge (&neigh->arp_queue); neigh->arp_queue_len_bytes =0 ; }
@@ -1210,7 +1212,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,write_lock_bh (&neigh->lock); } -skb_queue_purge (&neigh->arp_queue); +__skb_queue_purge (&neigh->arp_queue); neigh->arp_queue_len_bytes =0 ; } out:
net/ipv4/ip_gre.c +5 -4
@@ -503,10 +503,11 @@ static int ipgre_tunnel_ioctl(struct net_device *dev,if (copy_from_user (&p, ifr->ifr_ifru.ifru_data,sizeof (p)))return -EFAULT ; -if (p.iph.version !=4 || p.iph.protocol !=IPPROTO_GRE || - p.iph.ihl !=5 || (p.iph.frag_off&htons (~IP_DF )) || - ((p.i_flags|p.o_flags)&(GRE_VERSION |GRE_ROUTING ))) { -return -EINVAL ; +if (cmd ==SIOCADDTUNNEL || cmd ==SIOCCHGTUNNEL ) { +if (p.iph.version !=4 || p.iph.protocol !=IPPROTO_GRE || + p.iph.ihl !=5 || (p.iph.frag_off&htons (~IP_DF )) || + ((p.i_flags|p.o_flags)&(GRE_VERSION |GRE_ROUTING ))) +return -EINVAL ; } p.i_flags =gre_flags_to_tnl_flags (p.i_flags); p.o_flags =gre_flags_to_tnl_flags (p.o_flags);
net/ipv4/ip_input.c +3 -4
@@ -190,10 +190,7 @@ static int ip_local_deliver_finish(struct sk_buff *skb) {struct net *net =dev_net (skb->dev); -__skb_pull (skb,ip_hdrlen (skb)); - -/* Point into the IP datagram, just past the header. */ -skb_reset_transport_header (skb); +__skb_pull (skb,skb_network_header_len (skb));rcu_read_lock (); {
@@ -437,6 +434,8 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, goto drop; } + skb->transport_header = skb->network_header + iph->ihl*4 ; +/* Remove any debris in the socket control block */ memset (IPCB (skb),0 ,sizeof (struct inet_skb_parm ));
net/ipv4/ip_tunnel.c +54 -43
123 lines not on this page · raw message
net/ipv4/ip_vti.c +0 -7
@@ -606,17 +606,10 @@ static int __net_init vti_fb_tunnel_init(struct net_device *dev)struct iphdr *iph = &tunnel->parms.iph;struct vti_net *ipn =net_generic (dev_net (dev), vti_net_id); - tunnel->dev = dev; -strcpy (tunnel->parms.name, dev->name); - iph->version =4 ; iph->protocol =IPPROTO_IPIP ; iph->ihl =5 ; - dev->tstats = alloc_percpu(struct pcpu_tstats); -if (!dev->tstats) -return -ENOMEM ; -dev_hold (dev);rcu_assign_pointer (ipn->tunnels_wc[0 ], tunnel);return 0 ;
net/ipv4/ipip.c +7 -5
@@ -240,11 +240,13 @@ ipip_tunnel_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)if (copy_from_user (&p, ifr->ifr_ifru.ifru_data,sizeof (p)))return -EFAULT ; -if (p.iph.version !=4 || p.iph.protocol !=IPPROTO_IPIP || - p.iph.ihl !=5 || (p.iph.frag_off&htons (~IP_DF ))) -return -EINVAL ; -if (p.i_key || p.o_key || p.i_flags || p.o_flags) -return -EINVAL ; +if (cmd ==SIOCADDTUNNEL || cmd ==SIOCCHGTUNNEL ) { +if (p.iph.version !=4 || p.iph.protocol !=IPPROTO_IPIP || + p.iph.ihl !=5 || (p.iph.frag_off&htons (~IP_DF ))) +return -EINVAL ; + } + + p.i_key = p.o_key = p.i_flags = p.o_flags =0 ;if (p.iph.ttl) p.iph.frag_off |=htons (IP_DF );
net/ipv4/udp.c +2 -1
@@ -799,7 +799,7 @@ send:/* * Push out all pending data as one UDP datagram. Socket is locked. */ -static int udp_push_pending_frames (struct sock *sk) +int udp_push_pending_frames (struct sock *sk) {struct udp_sock *up =udp_sk (sk);struct inet_sock *inet =inet_sk (sk);
@@ -818,6 +818,7 @@ out: up->pending =0 ;return err; } +EXPORT_SYMBOL (udp_push_pending_frames);int udp_sendmsg (struct kiocb *iocb,struct sock *sk,struct msghdr *msg,size_t len)
net/ipv6/addrconf.c +18 -10
@@ -1448,6 +1448,23 @@ try_nextdev: }EXPORT_SYMBOL (ipv6_dev_get_saddr); +int __ipv6_get_lladdr (struct inet6_dev *idev,struct in6_addr *addr, +unsigned char banned_flags) +{ +struct inet6_ifaddr *ifp; +int err = -EADDRNOTAVAIL ; + +list_for_each_entry (ifp, &idev->addr_list, if_list) { +if (ifp->scope ==IFA_LINK && + !(ifp->flags & banned_flags)) { + *addr = ifp->addr; + err =0 ; +break ; + } + } +return err; +} +int ipv6_get_lladdr (struct net_device *dev,struct in6_addr *addr,unsigned char banned_flags) {
@@ -1457,17 +1474,8 @@ int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr,rcu_read_lock (); idev =__in6_dev_get (dev);if (idev) { -struct inet6_ifaddr *ifp; -read_lock_bh (&idev->lock); -list_for_each_entry (ifp, &idev->addr_list, if_list) { -if (ifp->scope ==IFA_LINK && - !(ifp->flags & banned_flags)) { - *addr = ifp->addr; - err =0 ; -break ; - } - } + err =__ipv6_get_lladdr (idev, addr, banned_flags);read_unlock_bh (&idev->lock); }rcu_read_unlock ();
net/ipv6/ip6_fib.c +11 -4
@@ -632,6 +632,12 @@ insert_above:return ln; } +static inline bool rt6_qualify_for_ecmp (struct rt6_info *rt) +{ +return (rt->rt6i_flags & (RTF_GATEWAY |RTF_ADDRCONF |RTF_DYNAMIC )) == +RTF_GATEWAY ; +} +/* * Insert routing information in a node. */
@@ -646,6 +652,7 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,int add = (!info->nlh || (info->nlh->nlmsg_flags &NLM_F_CREATE ));int found =0 ; +bool rt_can_ecmp =rt6_qualify_for_ecmp (rt); ins = &fn->leaf;
@@ -691,9 +698,8 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,* To avoid long list, we only had siblings if the * route have a gateway. */ -if (rt->rt6i_flags &RTF_GATEWAY && - !(rt->rt6i_flags &RTF_EXPIRES ) && - !(iter->rt6i_flags &RTF_EXPIRES )) +if (rt_can_ecmp && +rt6_qualify_for_ecmp (iter)) rt->rt6i_nsiblings++; }
@@ -715,7 +721,8 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,/* Find the first route that have the same metric */ sibling = fn->leaf;while (sibling) { -if (sibling->rt6i_metric == rt->rt6i_metric) { +if (sibling->rt6i_metric == rt->rt6i_metric && +rt6_qualify_for_ecmp (sibling)) {list_add_tail (&rt->rt6i_siblings, &sibling->rt6i_siblings);break ;
net/ipv6/ip6_output.c +10 -6
@@ -1098,11 +1098,12 @@ static inline struct ipv6_rt_hdr *ip6_rthdr_dup(struct ipv6_rt_hdr *src,return src ?kmemdup (src, (src->hdrlen +1 ) *8 , gfp) :NULL ; } -static void ip6_append_data_mtu (int *mtu, +static void ip6_append_data_mtu (unsigned int *mtu,int *maxfraglen,unsigned int fragheaderlen,struct sk_buff *skb, -struct rt6_info *rt) +struct rt6_info *rt, +bool pmtuprobe) {if (!(rt->dst.flags &DST_XFRM_TUNNEL )) {if (skb ==NULL ) {
@@ -1114,7 +1115,9 @@ static void ip6_append_data_mtu(int *mtu,* this fragment is not first, the headers * space is regarded as data space. */ - *mtu =dst_mtu (rt->dst.path); + *mtu =min (*mtu, pmtuprobe ? + rt->dst.dev->mtu : +dst_mtu (rt->dst.path)); } *maxfraglen = ((*mtu - fragheaderlen) & ~7 ) + fragheaderlen -sizeof (struct frag_hdr );
@@ -1131,11 +1134,10 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,struct ipv6_pinfo *np =inet6_sk (sk);struct inet_cork *cork;struct sk_buff *skb, *skb_prev =NULL ; -unsigned int maxfraglen, fragheaderlen; +unsigned int maxfraglen, fragheaderlen, mtu;int exthdrlen;int dst_exthdrlen;int hh_len; -int mtu;int copy;int err;int offset =0 ;
@@ -1292,7 +1294,9 @@ alloc_new_skb:/* update mtu and maxfraglen if necessary */ if (skb ==NULL || skb_prev ==NULL )ip6_append_data_mtu (&mtu, &maxfraglen, - fragheaderlen, skb, rt); + fragheaderlen, skb, rt, + np->pmtudisc == +IPV6_PMTUDISC_PROBE ); skb_prev = skb;
net/ipv6/mcast.c +10 -8
@@ -1343,8 +1343,9 @@ static void ip6_mc_hdr(struct sock *sk, struct sk_buff *skb, hdr->daddr = *daddr; } -static struct sk_buff *mld_newpack (struct net_device *dev,int size) +static struct sk_buff *mld_newpack (struct inet6_dev *idev,int size) { +struct net_device *dev = idev->dev;struct net *net =dev_net (dev);struct sock *sk = net->ipv6.igmp_sk;struct sk_buff *skb;
@@ -1369,7 +1370,7 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size)skb_reserve (skb, hlen); -if (ipv6_get_lladdr (dev, &addr_buf,IFA_F_TENTATIVE )) { +if (__ipv6_get_lladdr (idev, &addr_buf,IFA_F_TENTATIVE )) {/* <draft-ietf-magma-mld-source-05.txt>: * use unspecified address as the source address * when a valid link-local address is not available.
@@ -1465,7 +1466,7 @@ static struct sk_buff *add_grhead(struct sk_buff *skb, struct ifmcaddr6 *pmc,struct mld2_grec *pgr;if (!skb) - skb =mld_newpack (dev, dev->mtu); + skb =mld_newpack (pmc->idev, dev->mtu);if (!skb)return NULL ; pgr = (struct mld2_grec *)skb_put (skb,sizeof (struct mld2_grec ));
@@ -1485,7 +1486,8 @@ static struct sk_buff *add_grhead(struct sk_buff *skb, struct ifmcaddr6 *pmc,static struct sk_buff *add_grec (struct sk_buff *skb,struct ifmcaddr6 *pmc,int type,int gdeleted,int sdeleted) { -struct net_device *dev = pmc->idev->dev; +struct inet6_dev *idev = pmc->idev; +struct net_device *dev = idev->dev;struct mld2_report *pmr;struct mld2_grec *pgr =NULL ;struct ip6_sf_list *psf, *psf_next, *psf_prev, **psf_list;
@@ -1514,7 +1516,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc, AVAILABLE(skb) < grec_size(pmc, type, gdeleted, sdeleted)) {if (skb)mld_sendpack (skb); - skb =mld_newpack (dev, dev->mtu); + skb =mld_newpack (idev, dev->mtu); } } first =1 ;
@@ -1541,7 +1543,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc, pgr->grec_nsrcs =htons (scount);if (skb)mld_sendpack (skb); - skb =mld_newpack (dev, dev->mtu); + skb =mld_newpack (idev, dev->mtu); first =1 ; scount =0 ; }
@@ -1596,8 +1598,8 @@ static void mld_send_report(struct inet6_dev *idev, struct ifmcaddr6 *pmc)struct sk_buff *skb =NULL ;int type; +read_lock_bh (&idev->lock);if (!pmc) { -read_lock_bh (&idev->lock);for (pmc=idev->mc_list; pmc; pmc=pmc->next) {if (pmc->mca_flags &MAF_NOREPORT )continue ;
@@ -1609,7 +1611,6 @@ static void mld_send_report(struct inet6_dev *idev, struct ifmcaddr6 *pmc) skb =add_grec (skb, pmc, type,0 ,0 );spin_unlock_bh (&pmc->mca_lock); } -read_unlock_bh (&idev->lock); }else {spin_lock_bh (&pmc->mca_lock);if (pmc->mca_sfcount[MCAST_EXCLUDE ])
@@ -1619,6 +1620,7 @@ static void mld_send_report(struct inet6_dev *idev, struct ifmcaddr6 *pmc) skb =add_grec (skb, pmc, type,0 ,0 );spin_unlock_bh (&pmc->mca_lock); } +read_unlock_bh (&idev->lock);if (skb)mld_sendpack (skb); }
net/ipv6/route.c +46 -24
156 lines not on this page · raw message
net/ipv6/sit.c +1 -1
@@ -589,7 +589,7 @@ static int ipip6_rcv(struct sk_buff *skb) tunnel->dev->stats.rx_errors++; goto out; } - } else { + } else if (!(tunnel->dev->flags&IFF_POINTOPOINT)) { if (is_spoofed_6rd(tunnel, iph->saddr, &ipv6_hdr(skb)->saddr) || is_spoofed_6rd(tunnel, iph->daddr,
net/ipv6/udp.c +6 -1
@@ -955,11 +955,16 @@ static int udp_v6_push_pending_frames(struct sock *sk)struct udphdr *uh;struct udp_sock *up =udp_sk (sk);struct inet_sock *inet =inet_sk (sk); -struct flowi6 *fl6 = &inet->cork.fl.u.ip6; +struct flowi6 *fl6;int err =0 ;int is_udplite =IS_UDPLITE (sk);__wsum csum =0 ; +if (up->pending ==AF_INET ) +return udp_push_pending_frames (sk); + + fl6 = &inet->cork.fl.u.ip6; +/* Grab the skbuff where UDP header space exists. */ if ((skb =skb_peek (&sk->sk_write_queue)) ==NULL ) goto out;
net/l2tp/l2tp_ppp.c +2 -1
@@ -1793,7 +1793,8 @@ static const struct proto_ops pppol2tp_ops = {static const struct pppox_proto pppol2tp_proto = { .create = pppol2tp_create, - .ioctl = pppol2tp_ioctl + .ioctl = pppol2tp_ioctl, + .owner =THIS_MODULE , };#ifdef CONFIG_L2TP_V3
net/sched/sch_qfq.c +56 -29
126 lines not on this page · raw message
net/x25/af_x25.c +8 -7
@@ -1583,11 +1583,11 @@ out_cud_release:case SIOCX25CALLACCPTAPPRV : { rc = -EINVAL ;lock_sock (sk); -if (sk->sk_state !=TCP_CLOSE ) -break ; -clear_bit (X25_ACCPT_APPRV_FLAG , &x25->flags); +if (sk->sk_state ==TCP_CLOSE ) { +clear_bit (X25_ACCPT_APPRV_FLAG , &x25->flags); + rc =0 ; + }release_sock (sk); - rc =0 ;break ; }
@@ -1595,14 +1595,15 @@ out_cud_release: rc = -EINVAL ;lock_sock (sk);if (sk->sk_state !=TCP_ESTABLISHED ) -break ; + goto out_sendcallaccpt_release;/* must call accptapprv above */ if (test_bit (X25_ACCPT_APPRV_FLAG , &x25->flags)) -break ; + goto out_sendcallaccpt_release;x25_write_internal (sk,X25_CALL_ACCEPTED ); x25->state =X25_STATE_3 ; -release_sock (sk); rc =0 ; +out_sendcallaccpt_release: +release_sock (sk);break ; }
sound/pci/hda/patch_sigmatel.c +7 -6
@@ -417,9 +417,11 @@ static void stac_update_outputs(struct hda_codec *codec) val &= ~spec->eapd_mask; else val |= spec->eapd_mask; -if (spec->gpio_data != val) +if (spec->gpio_data != val) { + spec->gpio_data = val;stac_gpio_set (codec, spec->gpio_mask, spec->gpio_dir, val); + } } }
@@ -3227,7 +3229,7 @@ static const struct hda_fixup stac927x_fixups[] = {/* configure the analog microphone on some laptops */ { 0x0c, 0x90a79130 },/* correct the front output jack as a hp out */ - { 0x0f, 0x0227011f }, + { 0x0f, 0x0221101f },/* correct the front input jack as a mic */ { 0x0e, 0x02a79130 }, {}
@@ -3608,20 +3610,18 @@ static int stac_parse_auto_config(struct hda_codec *codec)static int stac_init (struct hda_codec *codec) {struct sigmatel_spec *spec = codec->spec; -unsigned int gpio;int i;/* override some hints */ stac_store_hints (codec);/* set up GPIO */ - gpio = spec->gpio_data;/* turn on EAPD statically when spec->eapd_switch isn't set. * otherwise, unsol event will turn it on/off dynamically */ if (!spec->eapd_switch) - gpio |= spec->eapd_mask; -stac_gpio_set (codec, spec->gpio_mask, spec->gpio_dir, gpio); + spec->gpio_data |= spec->eapd_mask; +stac_gpio_set (codec, spec->gpio_mask, spec->gpio_dir, spec->gpio_data);snd_hda_gen_init (codec);
@@ -3921,6 +3921,7 @@ static void stac_setup_gpio(struct hda_codec *codec) {struct sigmatel_spec *spec = codec->spec; + spec->gpio_mask |= spec->eapd_mask;if (spec->gpio_led) {if (!spec->vref_mute_led_nid) { spec->gpio_mask |= spec->gpio_led;
sound/usb/6fire/pcm.c +1 -1
@@ -543,7 +543,7 @@ static snd_pcm_uframes_t usb6fire_pcm_pointer(snd_pcm_uframes_t ret;if (rt->panic || !sub) -return SNDRV_PCM_STATE_XRUN ; +return SNDRV_PCM_POS_XRUN ;spin_lock_irqsave (&sub->lock, flags); ret = sub->dma_off;