Linux 2.6.30.4
Subsystems (56)
I'm announcing the release of the 2.6.30.4 kernel. All users of the 2.6.30 kernel series are very strongly encouraged to upgrade.
I'll also be replying to this message with a copy of the patch between 2.6.30.3 and 2.6.30.4
The updated 2.6.30.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.30.y.git
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.30.y.git;a=summarythanks,
greg k-h
------------
Documentation/RCU/rculist_nulls.txt | 7 + Makefile | 2 arch/parisc/include/asm/system.h | 4 arch/parisc/include/asm/tlbflush.h | 14 +- arch/parisc/kernel/cache.c | 23 +++- arch/parisc/kernel/pci-dma.c | 12 +- arch/powerpc/sysdev/mpic.c | 29 +++-- arch/x86/boot/video-vga.c | 44 ++++++--- arch/x86/include/asm/fixmap.h | 10 +- arch/x86/include/asm/io_apic.h | 2 arch/x86/include/asm/uaccess.h | 4 arch/x86/include/asm/uaccess_64.h | 10 +- arch/x86/kernel/apic/io_apic.c | 14 -- arch/x86/kernel/mfgpt_32.c | 2 arch/x86/kernel/setup.c | 13 ++ arch/x86/mm/gup.c | 9 + arch/x86/mm/srat_64.c | 6 - arch/x86/pci/i386.c | 7 + drivers/ata/libata-eh.c | 4 drivers/char/vc_screen.c | 4 drivers/hid/usbhid/hiddev.c | 4 drivers/hwmon/max6650.c | 1 drivers/input/misc/wistron_btns.c | 9 + drivers/isdn/gigaset/ev-layer.c | 44 ++++----- drivers/md/dm-raid1.c | 1 drivers/mmc/host/mvsdio.c | 4 drivers/net/8139too.c | 1 drivers/net/arm/ixp4xx_eth.c | 4 drivers/net/ehea/ehea_main.c | 2 drivers/net/gianfar.c | 2 drivers/net/plip.c | 3 drivers/net/ps3_gelic_net.c | 1 drivers/net/ps3_gelic_wireless.c | 1 drivers/net/smc91x.c | 1 drivers/net/smsc911x.c | 1 drivers/net/sunvnet.c | 2 drivers/net/usb/kaweth.c | 3 drivers/net/usb/pegasus.c | 3 drivers/net/via-rhine.c | 1 drivers/net/wireless/orinoco/main.c | 3 drivers/scsi/sg.c | 4 drivers/scsi/zalon.c | 2 drivers/staging/rt2870/rt2870.h | 1 drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c | 12 +- drivers/usb/core/devio.c | 57 ++++++----- drivers/usb/core/message.c | 63 +++++++++---- drivers/usb/gadget/ether.c | 11 +- drivers/usb/host/ehci-sched.c | 12 +- drivers/usb/serial/ti_usb_3410_5052.c | 3 fs/binfmt_elf.c | 4 fs/bio.c | 22 ++-- fs/cifs/connect.c | 1 fs/cifs/dir.c | 9 + fs/ecryptfs/keystore.c | 13 ++ fs/nfsd/vfs.c | 3 fs/nilfs2/cpfile.c | 5 - fs/nilfs2/dat.c | 9 - fs/nilfs2/segment.c | 30 +----- fs/partitions/check.c | 2 include/linux/blkdev.h | 1 include/linux/sched.h | 3 include/net/netfilter/nf_conntrack.h | 4 kernel/freezer.c | 7 + kernel/sched.c | 1 kernel/sched_rt.c | 18 +++ kernel/trace/trace_functions.c | 2 mm/filemap.c | 1 mm/internal.h | 4 mm/nommu.c | 3 mm/page_alloc.c | 26 ++++- mm/slab.c | 2 mm/slob.c | 2 mm/slub.c | 2 mm/vmscan.c | 11 +- net/dsa/mv88e6xxx.c | 2 net/ipv4/netfilter/nf_nat_helper.c | 17 ++- net/netfilter/nf_conntrack_core.c | 36 ++++++- net/netfilter/nf_conntrack_proto_tcp.c | 6 - net/netfilter/nf_log.c | 22 ++-- net/netfilter/xt_quota.c | 1 net/netfilter/xt_rateest.c | 2 net/wireless/scan.c | 1 sound/pci/ca0106/ca0106_main.c | 4 sound/pci/hda/patch_realtek.c | 33 +++--- sound/pci/hda/patch_sigmatel.c | 7 + sound/pci/oxygen/virtuoso.c | 2 sound/soc/codecs/wm8753.c | 2 sound/usb/usbaudio.c | 14 ++ 88 files changed, 528 insertions(+), 282 deletions(-)
Alan Stern (2):
USB: handle zero-length usbfs submissions correctly
USB: EHCI: report actual_length for iso transfers
Alexey Fisher (1):
x86: Add quirk for Intel DG45ID board to avoid low memory corruption
Amerigo Wang (1):
elf: fix one check-after-use
Andi Kleen (1):
x86-64: Fix bad_srat() to clear all state
Ben Hutchings (2):
netdev: restore MAC address set and validate operations
netdev: restore MTU change operation
Benjamin Herrenschmidt (1):
powerpc/mpic: Fix mapping of "DCR" based MPIC variants
Clemens Ladisch (2):
sound: virtuoso: fix Xonar D1/DX silence after resume
sound: usb-audio: add workaround for Blue Microphones devices
Dan Aloni (1):
Staging: prevent rtl8187se from crashing dev_ioctl() in SIOCGIWNAME
Daniel Mack (1):
USB: fix LANGID=0 regression
David Brownell (1):
USB: RNDIS gadget, fix issues talking from PXA
David Howells (1):
NFSD: Don't hold unrefcounted creds over call to nfsd_setuser()
Eric Dumazet (1):
nf_conntrack: nf_conntrack_alloc() fixes
FUJITA Tomonori (1):
block: fix sg SG_DXFER_TO_FROM_DEV regression
Giuseppe Mazzotta (1):
Input: wistron_btns - recognize Maxdata Pro 7000 notebooks
Greg Kroah-Hartman (2):
USB: ti_usb_3410_5052: fix duplicate device ids.
Linux 2.6.30.4H. Peter Anvin (1):
x86: Fix movq immediate operand constraints in uaccess.h
Hao Song (1):
ALSA: hda - Add quirk for Gateway T6834c laptop
Heiko Carstens (1):
partitions: fix broken uevent_suppress conversion
Helge Deller (2):
parisc: ensure broadcast tlb purge runs single threaded
parisc: fix ldcw inline assembler
James Bottomley (1):
SCSI: zalon: fix oops on attach failure
Jan Beulich (1):
x86: Fix fixmap ordering
Jan Engelhardt (1):
netfilter: xt_quota: fix incomplete initialization
Jeff Layton (2):
cifs: fix regression with O_EXCL creates and optimize away lookup
cifs: free nativeFileSystem field before allocating a new one
Jiri Slaby (2):
HID: hiddev, fix lock imbalance
hwmon: (max6650) Fix lock imbalance
Jiro SEKIBA (1):
nilfs2: fix disorder in cp count on error during deleting checkpoints
Johannes Berg (1):
cfg80211: fix refcount leak
Jorrit Schippers (1):
Staging: rt2870: Add USB ID for Sitecom WL-608
Josef Bacik (1):
mm: mark page accessed before we write_end()
Kay Sievers (1):
vc: create vcs(a) devices for consoles
Linus Torvalds (1):
x86: don't use 'access_ok()' as a range check in get_user_pages_fast()
Marc Aurele La France (1):
x86, setup (2.6.30-stable) fix 80x34 and 80x60 console modes
Mark Brown (1):
ASoC: Fix register cache initialisation for WM8753
Mathieu Desnoyers (1):
x86: Fix fixmap page order for FIX_TEXT_POKE0,1
Mel Gorman (1):
vmscan: do not unconditionally treat zones that fail zone_reclaim() as full
Mikulas Patocka (1):
dm raid1: wake kmirrord when requeueing delayed bios after remote recovery
Nicolas Pitre (1):
mvsdio: fix handling of partial word at the end of PIO transfer
Oliver Neukum (2):
USB: fix uninitialised variable in ti_do_download
USB: fix memleak in usbfs
Patrick McHardy (6):
netfilter: nf_log: fix sleeping function called from invalid context
netfilter: nf_conntrack: fix confirmation race condition
netfilter: nf_conntrack: fix conntrack lookup race
netfilter: nf_log: fix direct userspace memory access in proc handler
netfilter: xt_rateest: fix comparison with self
netfilter: tcp conntrack: fix unacknowledged data detection with NAT
Paul E. McKenney (1):
fix RCU-callback-after-kmem_cache_destroy problem in sl[aou]b
Paul Mundt (1):
nommu: Provide mmap_min_addr definition.
Peter Zijlstra (1):
sched_rt: Fix overload bug on rt group scheduling
Ramon de Carvalho Valle (1):
eCryptfs: parse_tag_3_packet check tag 3 packet encrypted key size (CVE-2009-2407)
Ryusuke Konishi (3):
nilfs2: remove unlikely directive causing mis-conversion of error code
nilfs2: fix hang problem of log writer which occurs after write failures
nilfs2: fix incorrect KERN_CRIT messages in case of write failures
Stephane Contri (1):
dsa: fix 88e6xxx statistics counter snapshotting
Takashi Iwai (3):
ALSA: ca0106 - Fix the max capture buffer size
ALSA: hda - Fix pin-setup for Sony VAIO with STAC9872 codecs
ALSA: hda - Fix mute control with some ALC262 models
Tejun Heo (1):
libata: fix follow-up SRST failure path
Thomas Gleixner (2):
sched: fix nr_uninterruptible accounting of frozen tasks really
x86: geode: Mark mfgpt irq IRQF_TIMER to prevent resume failure
Tilman Schmidt (1):
gigaset: accept connection establishment messages in any order
Tyler Hicks (1):
eCryptfs: Check Tag 11 literal data buffer size (CVE-2009-2406)
Uros Bizjak (1):
x86: Fix movq immediate operand constraints in uaccess_64.h
Xiao Guangrong (1):
tracing/function: Fix the return value of ftrace_trace_onoff_callback()
Yinghai Lu (1):
x86/pci: insert ioapic resource before assigning unassigned resources
Documentation/RCU/rculist_nulls.txt +6 -1
@@ -83,11 +83,12 @@ not detect it missed following items in original chain. obj = kmem_cache_alloc(...); lock_chain(); // typically a spin_lock() obj->key = key; -atomic_inc(&obj->refcnt); /* * we need to make sure obj->key is updated before obj->next + * or obj->refcnt */ smp_wmb(); +atomic_set(&obj->refcnt, 1); hlist_add_head_rcu(&obj->obj_node, list); unlock_chain(); // typically a spin_unlock()
@@ -159,6 +160,10 @@ out: obj = kmem_cache_alloc(cachep); lock_chain(); // typically a spin_lock() obj->key = key; +/* + * changes to obj->key must be visible before refcnt one + */ +smp_wmb(); atomic_set(&obj->refcnt, 1); /* * insert obj in RCU way (readers might be traversing chain)
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 30 -EXTRAVERSION = .3 +EXTRAVERSION = .4 NAME = Man-Eating Seals of Antiquity # *DOCUMENTATION*
arch/parisc/include/asm/system.h +2 -2
@@ -168,8 +168,8 @@ static inline void set_eiem(unsigned long val)/* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */ #define __ldcw (a) ({ \ unsigned __ret; \ - __asm__ __volatile__(__LDCW " 0(%1),%0" \ - : "=r" (__ret) : "r" (a)); \ + __asm__ __volatile__(__LDCW " 0(%2),%0" \ + : "=r" (__ret), "+m" (*(a)) : "r" (a)); \ __ret; \ })
arch/parisc/include/asm/tlbflush.h +7 -7
@@ -12,14 +12,12 @@* N class systems, only one PxTLB inter processor broadcast can be * active at any one time on the Merced bus. This tlb purge * synchronisation is fairly lightweight and harmless so we activate -* it on all SMP systems not just the N class. We also need to have -* preemption disabled on uniprocessor machines, and spin_lock does that -* nicely. +* it on all systems not just the N class. */ extern spinlock_t pa_tlb_lock; -#define purge_tlb_start (x) spin_lock(&pa_tlb_lock) -#define purge_tlb_end (x) spin_unlock(&pa_tlb_lock) +#define purge_tlb_start (flags) spin_lock_irqsave(&pa_tlb_lock, flags) +#define purge_tlb_end (flags) spin_unlock_irqrestore(&pa_tlb_lock, flags)extern void flush_tlb_all (void );extern void flush_tlb_all_local (void *);
@@ -63,14 +61,16 @@ static inline void flush_tlb_mm(struct mm_struct *mm)static inline void flush_tlb_page (struct vm_area_struct *vma,unsigned long addr) { +unsigned long flags; +/* For one page, it's not worth testing the split_tlb variable */ mb ();mtsp (vma->vm_mm->context,1 ); -purge_tlb_start (); +purge_tlb_start (flags);pdtlb (addr);pitlb (addr); -purge_tlb_end (); +purge_tlb_end (flags); } void __flush_tlb_range(unsigned long sid,
arch/parisc/kernel/cache.c +15 -8
@@ -398,12 +398,13 @@ EXPORT_SYMBOL(flush_kernel_icache_range_asm);void clear_user_page_asm (void *page,unsigned long vaddr) { +unsigned long flags;/* This function is implemented in assembly in pacache.S */ extern void __clear_user_page_asm (void *page,unsigned long vaddr); -purge_tlb_start (); +purge_tlb_start (flags);__clear_user_page_asm (page, vaddr); -purge_tlb_end (); +purge_tlb_end (flags); }#define FLUSH_THRESHOLD 0x80000/* 0.5MB */
@@ -444,20 +445,24 @@ extern void clear_user_page_asm(void *page, unsigned long vaddr);void clear_user_page (void *page,unsigned long vaddr,struct page *pg) { +unsigned long flags; +purge_kernel_dcache_page ((unsigned long )page); -purge_tlb_start (); +purge_tlb_start (flags);pdtlb_kernel (page); -purge_tlb_end (); +purge_tlb_end (flags);clear_user_page_asm (page, vaddr); }EXPORT_SYMBOL (clear_user_page);void flush_kernel_dcache_page_addr (void *addr) { +unsigned long flags; +flush_kernel_dcache_page_asm (addr); -purge_tlb_start (); +purge_tlb_start (flags);pdtlb_kernel (addr); -purge_tlb_end (); +purge_tlb_end (flags); }EXPORT_SYMBOL (flush_kernel_dcache_page_addr);
@@ -490,8 +495,10 @@ void __flush_tlb_range(unsigned long sid, unsigned long start,if (npages >=512 )/* 2MB of space: arbitrary, should be tuned */ flush_tlb_all ();else { +unsigned long flags; +mtsp (sid,1 ); -purge_tlb_start (); +purge_tlb_start (flags);if (split_tlb) {while (npages--) {pdtlb (start);
@@ -504,7 +511,7 @@ void __flush_tlb_range(unsigned long sid, unsigned long start, start +=PAGE_SIZE ; } } -purge_tlb_end (); +purge_tlb_end (flags); } }
arch/parisc/kernel/pci-dma.c +8 -4
@@ -90,12 +90,14 @@ static inline int map_pte_uncached(pte_t * pte,if (end >PMD_SIZE ) end =PMD_SIZE ; do { + unsigned long flags; + if (!pte_none(*pte)) printk(KERN_ERR "map_pte_uncached: page already exists\n"); set_pte(pte, __mk_pte(*paddr_ptr, PAGE_KERNEL_UNC)); - purge_tlb_start(); + purge_tlb_start(flags); pdtlb_kernel(orig_vaddr); - purge_tlb_end(); + purge_tlb_end(flags); vaddr += PAGE_SIZE; orig_vaddr += PAGE_SIZE; (*paddr_ptr) += PAGE_SIZE;
@@ -168,11 +170,13 @@ static inline void unmap_uncached_pte(pmd_t * pmd, unsigned long vaddr,if (end >PMD_SIZE ) end =PMD_SIZE ; do { + unsigned long flags; pte_t page = *pte; + pte_clear(&init_mm, vaddr, pte); - purge_tlb_start(); + purge_tlb_start(flags); pdtlb_kernel(orig_vaddr); - purge_tlb_end(); + purge_tlb_end(flags); vaddr += PAGE_SIZE; orig_vaddr += PAGE_SIZE; pte++;
arch/powerpc/sysdev/mpic.c +16 -13
@@ -279,28 +279,29 @@ static void _mpic_map_mmio(struct mpic *mpic, phys_addr_t phys_addr, }#ifdef CONFIG_PPC_DCR -static void _mpic_map_dcr (struct mpic *mpic,struct mpic_reg_bank *rb, +static void _mpic_map_dcr (struct mpic *mpic,struct device_node *node, +struct mpic_reg_bank *rb,unsigned int offset,unsigned int size) {const u32 *dbasep; - dbasep =of_get_property (mpic->irqhost->of_node,"dcr-reg" ,NULL ); + dbasep =of_get_property (node,"dcr-reg" ,NULL ); - rb->dhost =dcr_map (mpic->irqhost->of_node, *dbasep + offset, size); + rb->dhost =dcr_map (node, *dbasep + offset, size);BUG_ON (!DCR_MAP_OK (rb->dhost)); } -static inline void mpic_map (struct mpic *mpic,phys_addr_t phys_addr, -struct mpic_reg_bank *rb,unsigned int offset, -unsigned int size) +static inline void mpic_map (struct mpic *mpic,struct device_node *node, +phys_addr_t phys_addr,struct mpic_reg_bank *rb, +unsigned int offset,unsigned int size) {if (mpic->flags &MPIC_USES_DCR ) -_mpic_map_dcr (mpic, rb, offset, size); +_mpic_map_dcr (mpic, node, rb, offset, size);else _mpic_map_mmio (mpic, phys_addr, rb, offset, size); }#else /* CONFIG_PPC_DCR */ -#define mpic_map (m,p,b,o,s) _mpic_map_mmio(m,p,b,o,s) +#define mpic_map (m,n,p,b,o,s) _mpic_map_mmio(m,p,b,o,s)#endif /* !CONFIG_PPC_DCR */
@@ -1150,8 +1151,8 @@ struct mpic * __init mpic_alloc(struct device_node *node, }/* Map the global registers */ -mpic_map (mpic, paddr, &mpic->gregs,MPIC_INFO (GREG_BASE ),0x1000 ); -mpic_map (mpic, paddr, &mpic->tmregs,MPIC_INFO (TIMER_BASE ),0x1000 ); +mpic_map (mpic, node, paddr, &mpic->gregs,MPIC_INFO (GREG_BASE ),0x1000 ); +mpic_map (mpic, node, paddr, &mpic->tmregs,MPIC_INFO (TIMER_BASE ),0x1000 );/* Reset */ if (flags &MPIC_WANTS_RESET ) {
@@ -1192,7 +1193,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,/* Map the per-CPU registers */ for (i =0 ; i < mpic->num_cpus; i++) { -mpic_map (mpic, paddr, &mpic->cpuregs[i], +mpic_map (mpic, node, paddr, &mpic->cpuregs[i],MPIC_INFO (CPU_BASE ) + i *MPIC_INFO (CPU_STRIDE ),0x1000 ); }
@@ -1200,7 +1201,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,/* Initialize main ISU if none provided */ if (mpic->isu_size ==0 ) { mpic->isu_size = mpic->num_sources; -mpic_map (mpic, paddr, &mpic->isus[0 ], +mpic_map (mpic, node, paddr, &mpic->isus[0 ],MPIC_INFO (IRQ_BASE ),MPIC_INFO (IRQ_STRIDE ) * mpic->isu_size); } mpic->isu_shift =1 +__ilog2 (mpic->isu_size -1 );
@@ -1254,8 +1255,10 @@ void __init mpic_assign_isu(struct mpic *mpic, unsigned int isu_num,BUG_ON (isu_num >=MPIC_MAX_ISU ); -mpic_map (mpic, paddr, &mpic->isus[isu_num],0 , +mpic_map (mpic, mpic->irqhost->of_node, + paddr, &mpic->isus[isu_num],0 ,MPIC_INFO (IRQ_STRIDE ) * mpic->isu_size); +if ((isu_first + mpic->isu_size) > mpic->num_sources) mpic->num_sources = isu_first + mpic->isu_size; }
arch/x86/boot/video-vga.c +31 -13
99 lines not on this page · raw message
arch/x86/include/asm/fixmap.h +5 -5
@@ -111,12 +111,9 @@ enum fixed_addresses {#ifdef CONFIG_PARAVIRT FIX_PARAVIRT_BOOTMAP , #endif -FIX_TEXT_POKE0 ,/* reserve 2 pages for text_poke() */ -FIX_TEXT_POKE1 , +FIX_TEXT_POKE1 ,/* reserve 2 pages for text_poke() */ +FIX_TEXT_POKE0 ,/* first page is last, because allocation is backward */ __end_of_permanent_fixed_addresses, -#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT - FIX_OHCI1394_BASE, -#endif/* * 256 temporary boot-time mappings, used by early_ioremap(), * before ioremap() is functional.
@@ -129,6 +126,9 @@ enum fixed_addresses {FIX_BTMAP_END = __end_of_permanent_fixed_addresses +256 - (__end_of_permanent_fixed_addresses &255 ),FIX_BTMAP_BEGIN =FIX_BTMAP_END +NR_FIX_BTMAPS *FIX_BTMAPS_SLOTS -1 , +#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT +FIX_OHCI1394_BASE , +#endif #ifdef CONFIG_X86_32 FIX_WP_TEST, #endif
arch/x86/include/asm/io_apic.h +2 -0
@@ -160,6 +160,7 @@ extern int io_apic_set_pci_routing(int ioapic, int pin, int irq,extern int (*ioapic_renumber_irq)(int ioapic,int irq);extern void ioapic_init_mappings (void ); +extern void ioapic_insert_resources (void );#ifdef CONFIG_X86_64 extern struct IO_APIC_route_entry **alloc_ioapic_entries (void );
@@ -183,6 +184,7 @@ extern void ioapic_write_entry(int apic, int pin,#define io_apic_assign_pci_irqs 0static const int timer_through_8259 =0 ;static inline void ioapic_init_mappings (void ) { } +static inline void ioapic_insert_resources (void ) { }static inline void probe_nr_irqs_gsi (void ) { }#endif
arch/x86/include/asm/uaccess.h +2 -2
@@ -212,9 +212,9 @@ extern int __get_user_bad(void); : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")#else #define __put_user_asm_u64 (x, ptr, retval, errret) \ - __put_user_asm(x, ptr, retval, "q", "", "Zr", errret) + __put_user_asm(x, ptr, retval, "q", "", "er", errret)#define __put_user_asm_ex_u64 (x, addr) \ - __put_user_asm_ex(x, addr, "q", "", "Zr") + __put_user_asm_ex(x, addr, "q", "", "er")#define __put_user_x8 (x, ptr, __ret_pu) __put_user_x(8, x, ptr, __ret_pu)#endif
arch/x86/include/asm/uaccess_64.h +5 -5
@@ -88,11 +88,11 @@ int __copy_to_user(void __user *dst, const void *src, unsigned size) ret, "l", "k", "ir", 4);return ret;case 8 :__put_user_asm (*(u64 *)src, (u64 __user *)dst, - ret,"q" ,"" ,"ir" ,8 ); + ret,"q" ,"" ,"er" ,8 );return ret;case 10 :__put_user_asm (*(u64 *)src, (u64 __user *)dst, - ret,"q" ,"" ,"ir" ,10 ); + ret,"q" ,"" ,"er" ,10 );if (unlikely (ret))return ret; asm("" :::"memory" );
@@ -101,12 +101,12 @@ int __copy_to_user(void __user *dst, const void *src, unsigned size)return ret;case 16 :__put_user_asm (*(u64 *)src, (u64 __user *)dst, - ret,"q" ,"" ,"ir" ,16 ); + ret,"q" ,"" ,"er" ,16 );if (unlikely (ret))return ret; asm("" :::"memory" );__put_user_asm (1 [(u64 *)src],1 + (u64 __user *)dst, - ret,"q" ,"" ,"ir" ,8 ); + ret,"q" ,"" ,"er" ,8 );return ret;default :return copy_user_generic ((__force void *)dst, src, size);
@@ -157,7 +157,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size) ret, "q", "", "=r", 8);if (likely (!ret))__put_user_asm (tmp, (u64 __user *)dst, - ret,"q" ,"" ,"ir" ,8 ); + ret,"q" ,"" ,"er" ,8 );return ret; }default :
arch/x86/kernel/apic/io_apic.c +3 -11
@@ -4182,28 +4182,20 @@ fake_ioapic_page: } } -static int __init ioapic_insert_resources (void ) +void __init ioapic_insert_resources (void ) {int i;struct resource *r = ioapic_resources;if (!r) { -if (nr_ioapics >0 ) { +if (nr_ioapics >0 )printk (KERN_ERR "IO APIC resources couldn't be allocated.\n" ); -return -1 ; - } -return 0 ; +return ; }for (i =0 ; i < nr_ioapics; i++) {insert_resource (&iomem_resource, r); r++; } - -return 0 ; } - -/* Insert the IO APIC resources after PCI initialization has occured to handle -* IO APICS that are mapped in on a BAR in PCI space. */ -late_initcall (ioapic_insert_resources);
arch/x86/kernel/mfgpt_32.c +1 -1
@@ -347,7 +347,7 @@ static irqreturn_t mfgpt_tick(int irq, void *dev_id)static struct irqaction mfgptirq = { .handler = mfgpt_tick, - .flags =IRQF_DISABLED |IRQF_NOBALANCING , + .flags =IRQF_DISABLED |IRQF_NOBALANCING |IRQF_TIMER , .name ="mfgpt-timer" };
arch/x86/kernel/setup.c +13 -0
@@ -650,6 +650,19 @@ static struct dmi_system_id __initdata bad_bios_dmi_table[] = { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies"), }, }, + { +/* +* AMI BIOS with low memory corruption was found on Intel DG45ID board. +* It hase different DMI_BIOS_VENDOR = "Intel Corp.", for now we will +* match only DMI_BOARD_NAME and see if there is more bad products +* with this vendor. +*/ + .callback = dmi_low_memory_corruption, + .ident = "AMI BIOS", + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "DG45ID"), + }, + }, #endif {} };
arch/x86/mm/gup.c +7 -2
@@ -247,10 +247,15 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, start &=PAGE_MASK ; addr = start; len = (unsigned long ) nr_pages <<PAGE_SHIFT ; + end = start + len; -if (unlikely (!access_ok (write ?VERIFY_WRITE :VERIFY_READ , - (void __user *)start, len))) +if (end < start) + goto slow_irqon; + +#ifdef CONFIG_X86_64 +if (end >>47 ) goto slow_irqon; +#endif /* * XXX: batch / limit 'nr', to avoid large irq off latency
arch/x86/mm/srat_64.c +4 -2
@@ -89,8 +89,10 @@ static __init void bad_srat(void) found_add_area =0 ;for (i =0 ; i <MAX_LOCAL_APIC ; i++) apicid_to_node[i] =NUMA_NO_NODE ; -for (i =0 ; i <MAX_NUMNODES ; i++) - nodes_add[i].start = nodes[i].end =0 ; +for (i =0 ; i <MAX_NUMNODES ; i++) { + nodes[i].start = nodes[i].end =0 ; + nodes_add[i].start = nodes_add[i].end =0 ; + }remove_all_active_ranges (); }
arch/x86/pci/i386.c +7 -0
@@ -35,6 +35,7 @@#include <asm/pat.h> #include <asm/e820.h> #include <asm/pci_x86.h> +#include <asm/io_apic.h> static int
@@ -230,6 +231,12 @@ void __init pcibios_resource_survey(void)pcibios_allocate_resources (1 );e820_reserve_resources_late (); +/* +* Insert the IO APIC resources after PCI initialization has +* occured to handle IO APICS that are mapped in on a BAR in +* PCI space, but before trying to assign unassigned pci res. +*/ +ioapic_insert_resources (); }/**
drivers/ata/libata-eh.c +4 -0
@@ -2517,6 +2517,10 @@ int ata_eh_reset(struct ata_link *link, int classify,ata_eh_about_to_do (link,NULL ,ATA_EH_RESET ); rc =ata_do_reset (link, reset, classes, deadline, true); +if (rc) { + failed_link = link; + goto fail; + } } }else {if (verbose)
drivers/char/vc_screen.c +4 -0
@@ -495,11 +495,15 @@ void vcs_remove_sysfs(int index)int __init vcs_init (void ) { +unsigned int i; +if (register_chrdev (VCS_MAJOR ,"vcs" , &vcs_fops))panic ("unable to get major %d for vcs device" ,VCS_MAJOR ); vc_class =class_create (THIS_MODULE ,"vc" );device_create (vc_class,NULL ,MKDEV (VCS_MAJOR ,0 ),NULL ,"vcs" );device_create (vc_class,NULL ,MKDEV (VCS_MAJOR ,128 ),NULL ,"vcsa" ); +for (i =0 ; i <MIN_NR_CONSOLES ; i++) +vcs_make_sysfs (i);return 0 ; }
drivers/hid/usbhid/hiddev.c +3 -1
@@ -527,8 +527,10 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd, goto goodreturn;case HIDIOCGCOLLECTIONINDEX : + i = field->usage[uref->usage_index].collection_index; +unlock_kernel ();kfree (uref_multi); -return field->usage[uref->usage_index].collection_index; +return i;case HIDIOCGUSAGES :for (i =0 ; i < uref_multi->num_values; i++) uref_multi->values[i] =
drivers/hwmon/max6650.c +1 -0
@@ -407,6 +407,7 @@ static ssize_t set_div(struct device *dev, struct device_attribute *devattr, data->count =3 ;break ;default : +mutex_unlock (&data->update_lock);dev_err (&client->dev,"illegal value for fan divider (%d)\n" , div);return -EINVAL ;
drivers/input/misc/wistron_btns.c +9 -0
@@ -646,6 +646,15 @@ static struct dmi_system_id dmi_ids[] __initdata = { }, { .callback = dmi_matched, + .ident = "Maxdata Pro 7000 DX", + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"MAXDATA" ), + DMI_MATCH(DMI_PRODUCT_NAME, "Pro 7000"), + }, + .driver_data = keymap_fs_amilo_pro_v2000 + }, + { + .callback = dmi_matched, .ident = "Fujitsu N3510", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
drivers/isdn/gigaset/ev-layer.c +20 -24
71 lines not on this page · raw message
drivers/md/dm-raid1.c +1 -0
@@ -638,6 +638,7 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes)spin_lock_irq (&ms->lock);bio_list_merge (&ms->writes, &requeue);spin_unlock_irq (&ms->lock); +delayed_wake (ms); }/*
drivers/mmc/host/mvsdio.c +2 -2
@@ -384,7 +384,7 @@ static irqreturn_t mvsd_irq(int irq, void *dev)u16 val[2 ] = {0 ,0 }; val[0 ] =mvsd_read (MVSD_FIFO ); val[1 ] =mvsd_read (MVSD_FIFO ); -memcpy (p, &val, s); +memcpy (p, ((void *)&val) +4 - s, s); s =0 ; intr_status =mvsd_read (MVSD_NOR_INTR_STATUS ); }
@@ -423,7 +423,7 @@ static irqreturn_t mvsd_irq(int irq, void *dev)if (s <4 ) {if (s && (intr_status &MVSD_NOR_TX_AVAIL )) {u16 val[2 ] = {0 ,0 }; -memcpy (&val, p, s); +memcpy (((void *)&val) +4 - s, p, s);mvsd_write (MVSD_FIFO , val[0 ]);mvsd_write (MVSD_FIFO , val[1 ]); s =0 ;
drivers/net/8139too.c +1 -0
@@ -917,6 +917,7 @@ static const struct net_device_ops rtl8139_netdev_ops = { .ndo_open = rtl8139_open, .ndo_stop = rtl8139_close, .ndo_get_stats = rtl8139_get_stats, + .ndo_change_mtu = eth_change_mtu, .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = rtl8139_set_mac_address, .ndo_start_xmit = rtl8139_start_xmit,
drivers/net/arm/ixp4xx_eth.c +3 -1
@@ -1140,7 +1140,9 @@ static const struct net_device_ops ixp4xx_netdev_ops = { .ndo_start_xmit = eth_xmit, .ndo_set_multicast_list = eth_set_mcast_list, .ndo_do_ioctl = eth_ioctl, - + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, };static int __devinit eth_init_one (struct platform_device *pdev)
drivers/net/ehea/ehea_main.c +2 -0
@@ -3080,7 +3080,9 @@ static const struct net_device_ops ehea_netdev_ops = { .ndo_poll_controller = ehea_netpoll, #endif .ndo_get_stats = ehea_get_stats, + .ndo_change_mtu = eth_change_mtu, .ndo_set_mac_address = ehea_set_mac_addr, + .ndo_validate_addr = eth_validate_addr, .ndo_set_multicast_list = ehea_set_multicast_list, .ndo_change_mtu = ehea_change_mtu, .ndo_vlan_rx_register = ehea_vlan_rx_register,
drivers/net/gianfar.c +2 -0
@@ -155,6 +155,8 @@ static const struct net_device_ops gfar_netdev_ops = { .ndo_tx_timeout = gfar_timeout, .ndo_do_ioctl = gfar_ioctl, .ndo_vlan_rx_register = gfar_vlan_rx_register, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr,#ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = gfar_netpoll,#endif
drivers/net/plip.c +3 -0
@@ -270,6 +270,9 @@ static const struct net_device_ops plip_netdev_ops = { .ndo_stop = plip_close, .ndo_start_xmit = plip_tx_packet, .ndo_do_ioctl = plip_ioctl, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, };/* Entry point of PLIP driver.
drivers/net/ps3_gelic_net.c +1 -0
@@ -1410,6 +1410,7 @@ static const struct net_device_ops gelic_netdevice_ops = { .ndo_set_multicast_list = gelic_net_set_multi, .ndo_change_mtu = gelic_net_change_mtu, .ndo_tx_timeout = gelic_net_tx_timeout, + .ndo_set_mac_address = eth_mac_addr, .ndo_validate_addr = eth_validate_addr, #ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = gelic_net_poll_controller,
drivers/net/ps3_gelic_wireless.c +1 -0
@@ -2707,6 +2707,7 @@ static const struct net_device_ops gelic_wl_netdevice_ops = { .ndo_set_multicast_list = gelic_net_set_multi, .ndo_change_mtu = gelic_net_change_mtu, .ndo_tx_timeout = gelic_net_tx_timeout, + .ndo_set_mac_address = eth_mac_addr, .ndo_validate_addr = eth_validate_addr, #ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = gelic_net_poll_controller,
drivers/net/smc91x.c +1 -0
@@ -1774,6 +1774,7 @@ static const struct net_device_ops smc_netdev_ops = { .ndo_start_xmit = smc_hard_start_xmit, .ndo_tx_timeout = smc_timeout, .ndo_set_multicast_list = smc_set_multicast_list, + .ndo_change_mtu = eth_change_mtu, .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = eth_mac_addr,#ifdef CONFIG_NET_POLL_CONTROLLER
drivers/net/smsc911x.c +1 -0
@@ -1766,6 +1766,7 @@ static const struct net_device_ops smsc911x_netdev_ops = { .ndo_get_stats = smsc911x_get_stats, .ndo_set_multicast_list = smsc911x_set_multicast_list, .ndo_do_ioctl = smsc911x_do_ioctl, + .ndo_change_mtu = eth_change_mtu, .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = smsc911x_set_mac_address, #ifdef CONFIG_NET_POLL_CONTROLLER
drivers/net/sunvnet.c +2 -0
@@ -1016,7 +1016,9 @@ static const struct net_device_ops vnet_ops = { .ndo_open = vnet_open, .ndo_stop = vnet_close, .ndo_set_multicast_list = vnet_set_rx_mode, + .ndo_change_mtu = eth_change_mtu, .ndo_set_mac_address = vnet_set_mac_addr, + .ndo_validate_addr = eth_validate_addr, .ndo_tx_timeout = vnet_tx_timeout, .ndo_change_mtu = vnet_change_mtu, .ndo_start_xmit = vnet_start_xmit,
drivers/net/usb/kaweth.c +3 -0
@@ -982,6 +982,9 @@ static const struct net_device_ops kaweth_netdev_ops = { .ndo_tx_timeout = kaweth_tx_timeout, .ndo_set_multicast_list = kaweth_set_rx_mode, .ndo_get_stats = kaweth_netdev_stats, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, }; static int kaweth_probe(
drivers/net/usb/pegasus.c +3 -0
@@ -1493,6 +1493,9 @@ static const struct net_device_ops pegasus_netdev_ops = { .ndo_set_multicast_list = pegasus_set_multicast, .ndo_get_stats = pegasus_netdev_stats, .ndo_tx_timeout = pegasus_tx_timeout, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, };static struct usb_driver pegasus_driver = {
drivers/net/via-rhine.c +1 -0
@@ -622,6 +622,7 @@ static const struct net_device_ops rhine_netdev_ops = { .ndo_start_xmit = rhine_start_tx, .ndo_get_stats = rhine_get_stats, .ndo_set_multicast_list = rhine_set_rx_mode, + .ndo_change_mtu = eth_change_mtu, .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = eth_mac_addr, .ndo_do_ioctl = netdev_ioctl,
drivers/net/wireless/orinoco/main.c +2 -1
@@ -2521,6 +2521,8 @@ static const struct net_device_ops orinoco_netdev_ops = { .ndo_start_xmit = orinoco_xmit, .ndo_set_multicast_list = orinoco_set_multicast_list, .ndo_change_mtu = orinoco_change_mtu, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, .ndo_tx_timeout = orinoco_tx_timeout, .ndo_get_stats = orinoco_get_stats, };
@@ -2555,7 +2557,6 @@ struct net_device priv->wireless_data.spy_data = &priv->spy_data; dev->wireless_data = &priv->wireless_data;#endif -/* we use the default eth_mac_addr for setting the MAC addr */ /* Reserve space in skb for the SNAP header */ dev->hard_header_len +=ENCAPS_OVERHEAD ;
drivers/scsi/sg.c +4 -0
@@ -1656,6 +1656,10 @@ static int sg_start_req(Sg_request *srp, unsigned char *cmd) md->nr_entries = req_schp->k_use_sg; md->offset =0 ; md->null_mapped = hp->dxferp ?0 :1 ; +if (dxfer_dir ==SG_DXFER_TO_FROM_DEV ) + md->from_user =1 ; +else + md->from_user =0 ; }if (iov_count) {
drivers/scsi/zalon.c +1 -1
@@ -134,7 +134,7 @@ zalon_probe(struct parisc_device *dev) host =ncr_attach (&zalon7xx_template, unit, &device);if (!host) - goto fail; +return -ENODEV ;if (request_irq (dev->irq, ncr53c8xx_intr,IRQF_SHARED ,"zalon" , host)) { dev_printk(KERN_ERR, &dev->dev, "irq problem with %d, detaching\n ",
drivers/staging/rt2870/rt2870.h +1 -0
@@ -97,6 +97,7 @@ {USB_DEVICE(0x0DF6,0x002C)}, /* Sitecom */ \ {USB_DEVICE(0x0DF6,0x002D)}, /* Sitecom */ \ {USB_DEVICE(0x0DF6,0x0039)}, /* Sitecom */ \ + {USB_DEVICE(0x0DF6,0x003F)}, /* Sitecom WL-608 */ \ {USB_DEVICE(0x14B2,0x3C06)}, /* Conceptronic */ \ {USB_DEVICE(0x14B2,0x3C28)}, /* Conceptronic */ \ {USB_DEVICE(0x2019,0xED06)}, /* Planex Communications, Inc. */ \
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c +6 -6
@@ -461,19 +461,19 @@ int ieee80211_wx_get_name(struct ieee80211_device *ieee,struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - strcpy(wrqu->name, "802.11"); + strlcpy(wrqu->name, "802.11", IFNAMSIZ);if (ieee->modulation &IEEE80211_CCK_MODULATION ){ -strcat (wrqu->name,"b" ); +strlcat (wrqu->name,"b" ,IFNAMSIZ );if (ieee->modulation &IEEE80211_OFDM_MODULATION ) -strcat (wrqu->name,"/g" ); +strlcat (wrqu->name,"/g" ,IFNAMSIZ ); }else if (ieee->modulation &IEEE80211_OFDM_MODULATION ) -strcat (wrqu->name,"g" ); +strlcat (wrqu->name,"g" ,IFNAMSIZ );if ((ieee->state ==IEEE80211_LINKED ) || (ieee->state ==IEEE80211_LINKED_SCANNING )) -strcat (wrqu->name," linked" ); +strlcat (wrqu->name," link" ,IFNAMSIZ );else if (ieee->state !=IEEE80211_NOLINK ) -strcat (wrqu->name," link.." ); +strlcat (wrqu->name," ....." ,IFNAMSIZ );return 0 ;
drivers/usb/core/devio.c +30 -27
129 lines not on this page · raw message
drivers/usb/core/message.c +45 -18
75 lines not on this page · raw message
drivers/usb/gadget/ether.c +6 -5
@@ -293,15 +293,16 @@ static int __init eth_bind(struct usb_composite_dev *cdev)/* CDC Subset */ eth_config_driver.label ="CDC Subset/SAFE" ; - device_desc.idVendor =cpu_to_le16 (SIMPLE_VENDOR_NUM ), - device_desc.idProduct =cpu_to_le16 (SIMPLE_PRODUCT_NUM ), - device_desc.bDeviceClass =USB_CLASS_VENDOR_SPEC ; + device_desc.idVendor =cpu_to_le16 (SIMPLE_VENDOR_NUM ); + device_desc.idProduct =cpu_to_le16 (SIMPLE_PRODUCT_NUM ); +if (!has_rndis ()) + device_desc.bDeviceClass =USB_CLASS_VENDOR_SPEC ; }if (has_rndis ()) {/* RNDIS plus ECM-or-Subset */ - device_desc.idVendor =cpu_to_le16 (RNDIS_VENDOR_NUM ), - device_desc.idProduct =cpu_to_le16 (RNDIS_PRODUCT_NUM ), + device_desc.idVendor =cpu_to_le16 (RNDIS_VENDOR_NUM ); + device_desc.idProduct =cpu_to_le16 (RNDIS_PRODUCT_NUM ); device_desc.bNumConfigurations =2 ; }
drivers/usb/host/ehci-sched.c +8 -4
@@ -1617,11 +1617,14 @@ itd_complete ( desc->status = -EPROTO ;/* HC need not update length with this error */ -if (!(t &EHCI_ISOC_BABBLE )) - desc->actual_length =EHCI_ITD_LENGTH (t); +if (!(t &EHCI_ISOC_BABBLE )) { + desc->actual_length =EHCI_ITD_LENGTH (t); + urb->actual_length += desc->actual_length; + } }else if (likely ((t &EHCI_ISOC_ACTIVE ) ==0 )) { desc->status =0 ; - desc->actual_length =EHCI_ITD_LENGTH (t); + desc->actual_length =EHCI_ITD_LENGTH (t); + urb->actual_length += desc->actual_length; }else {/* URB was too late */ desc->status = -EXDEV ;
@@ -2012,7 +2015,8 @@ sitd_complete ( desc->status = -EPROTO ; }else { desc->status =0 ; - desc->actual_length = desc->length -SITD_LENGTH (t); + desc->actual_length = desc->length -SITD_LENGTH (t); + urb->actual_length += desc->actual_length; } stream->depth -= stream->interval <<3 ;
drivers/usb/serial/ti_usb_3410_5052.c +1 -2
@@ -192,7 +192,6 @@ static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = { { USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) }, { USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) }, { USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) }, - { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, }; static struct usb_device_id ti_id_table_combined[14+2*TI_EXTRA_VID_PID_COUNT+1] = {
@@ -1660,7 +1659,7 @@ static int ti_do_download(struct usb_device *dev, int pipe,u8 cs =0 ;int done;struct ti_firmware_header *header; -int status; +int status =0 ;int len;for (pos =sizeof (struct ti_firmware_header ); pos < size; pos++)
fs/binfmt_elf.c +2 -2
@@ -1518,11 +1518,11 @@ static int fill_note_info(struct elfhdr *elf, int phdrs, info->thread =NULL ; psinfo =kmalloc (sizeof (*psinfo),GFP_KERNEL ); -fill_note (&info->psinfo,"CORE" ,NT_PRPSINFO ,sizeof (*psinfo), psinfo); -if (psinfo ==NULL )return 0 ; +fill_note (&info->psinfo,"CORE" ,NT_PRPSINFO ,sizeof (*psinfo), psinfo); +/* * Figure out how many notes we're going to need for each thread. */
fs/bio.c +12 -10
@@ -706,14 +706,13 @@ static struct bio_map_data *bio_alloc_map_data(int nr_segs, int iov_count, }static int __bio_copy_iov (struct bio *bio,struct bio_vec *iovecs, -struct sg_iovec *iov,int iov_count,int uncopy, -int do_free_page) +struct sg_iovec *iov,int iov_count, +int to_user,int from_user,int do_free_page) {int ret =0 , i;struct bio_vec *bvec;int iov_idx =0 ;unsigned int iov_off =0 ; -int read =bio_data_dir (bio) ==READ ;__bio_for_each_segment (bvec, bio, i,0 ) {char *bv_addr =page_address (bvec->bv_page);
@@ -728,13 +727,14 @@ static int __bio_copy_iov(struct bio *bio, struct bio_vec *iovecs, iov_addr = iov[iov_idx].iov_base + iov_off;if (!ret) { -if (!read && !uncopy) - ret =copy_from_user (bv_addr, iov_addr, - bytes); -if (read && uncopy) +if (to_user) ret =copy_to_user (iov_addr, bv_addr, bytes); +if (from_user) + ret =copy_from_user (bv_addr, iov_addr, + bytes); +if (ret) ret = -EFAULT ; }
@@ -771,7 +771,8 @@ int bio_uncopy_user(struct bio *bio)if (!bio_flagged (bio,BIO_NULL_MAPPED )) ret =__bio_copy_iov (bio, bmd->iovecs, bmd->sgvecs, - bmd->nr_sgvecs,1 , bmd->is_our_pages); + bmd->nr_sgvecs,bio_data_dir (bio) ==READ , +0 , bmd->is_our_pages);bio_free_map_data (bmd);bio_put (bio);return ret;
@@ -876,8 +877,9 @@ struct bio *bio_copy_user_iov(struct request_queue *q,/* * success */ -if (!write_to_vm && (!map_data || !map_data->null_mapped)) { - ret =__bio_copy_iov (bio, bio->bi_io_vec, iov, iov_count,0 ,0 ); +if ((!write_to_vm && (!map_data || !map_data->null_mapped)) || + (map_data && map_data->from_user)) { + ret =__bio_copy_iov (bio, bio->bi_io_vec, iov, iov_count,0 ,1 ,0 );if (ret) goto cleanup; }
fs/cifs/connect.c +1 -0
@@ -2745,6 +2745,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,strncpy (tcon->treeName, tree,MAX_TREE_SIZE );/* mostly informational -- no need to fail on error here */ +kfree (tcon->nativeFileSystem); tcon->nativeFileSystem =cifs_strndup_from_ucs (bcc_ptr, bytes_left, is_unicode, nls_codepage);
fs/cifs/dir.c +9 -0
@@ -641,6 +641,15 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, } } +/* +* O_EXCL: optimize away the lookup, but don't hash the dentry. Let +* the VFS handle the create. +*/ +if (nd->flags &LOOKUP_EXCL ) { +d_instantiate (direntry,NULL ); +return 0 ; + } +/* can not grab the rename sem here since it would deadlock in the cases (beginning of sys_rename itself) in which we already have the sb rename sem */
fs/ecryptfs/keystore.c +13 -0
@@ -1303,6 +1303,13 @@ parse_tag_3_packet(struct ecryptfs_crypt_stat *crypt_stat, } (*new_auth_tok)->session_key.encrypted_key_size = (body_size - (ECRYPTFS_SALT_SIZE +5 )); +if ((*new_auth_tok)->session_key.encrypted_key_size + >ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES ) { +printk (KERN_WARNING "Tag 3 packet contains key larger " +"than ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES\n" ); + rc = -EINVAL ; + goto out_free; + }if (unlikely (data[(*packet_size)++] !=0x04 )) {printk (KERN_WARNING "Unknown version number [%d]\n" , data[(*packet_size) -1 ]);
@@ -1449,6 +1456,12 @@ parse_tag_11_packet(unsigned char *data, unsigned char *contents, rc = -EINVAL ; goto out; } +if (unlikely ((*tag_11_contents_size) > max_contents_bytes)) { +printk (KERN_ERR "Literal data section in tag 11 packet exceeds " +"expected size\n" ); + rc = -EINVAL ; + goto out; + }if (data[(*packet_size)++] !=0x62 ) {printk (KERN_WARNING "Unrecognizable packet\n" ); rc = -EINVAL ;
fs/nfsd/vfs.c +1 -2
@@ -677,7 +677,6 @@ __be32 nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access, struct file **filp) { - const struct cred *cred = current_cred(); struct dentry *dentry;struct inode *inode;int flags =O_RDONLY |O_LARGEFILE ;
@@ -732,7 +731,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,vfs_dq_init (inode); } *filp =dentry_open (dget (dentry),mntget (fhp->fh_export->ex_path.mnt), - flags, cred); + flags,current_cred ());if (IS_ERR (*filp)) host_err =PTR_ERR (*filp); out_nfserr:
fs/nilfs2/cpfile.c +2 -3
@@ -311,7 +311,7 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile, ret =nilfs_cpfile_get_checkpoint_block (cpfile, cno,0 , &cp_bh);if (ret <0 ) {if (ret != -ENOENT ) - goto out_header; +break ;/* skip hole */ ret =0 ;continue ;
@@ -344,7 +344,7 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile,continue ;printk (KERN_ERR "%s: cannot delete block\n" , __func__); - goto out_header; +break ; } }
@@ -362,7 +362,6 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile,kunmap_atomic (kaddr,KM_USER0 ); } - out_header:brelse (header_bh); out_sem:
fs/nilfs2/dat.c +0 -9
@@ -149,15 +149,6 @@ void nilfs_dat_commit_start(struct inode *dat, struct nilfs_palloc_req *req, entry =nilfs_palloc_block_get_entry (dat, req->pr_entry_nr, req->pr_entry_bh, kaddr); entry->de_start =cpu_to_le64 (nilfs_mdt_cno (dat)); -if (entry->de_blocknr !=cpu_to_le64 (0 ) || - entry->de_end !=cpu_to_le64 (NILFS_CNO_MAX )) { -printk (KERN_CRIT -"%s: vbn = %llu, start = %llu, end = %llu, pbn = %llu\n" , - __func__, (unsigned long long )req->pr_entry_nr, - (unsigned long long )le64_to_cpu (entry->de_start), - (unsigned long long )le64_to_cpu (entry->de_end), - (unsigned long long )le64_to_cpu (entry->de_blocknr)); - } entry->de_blocknr =cpu_to_le64 (blocknr);kunmap_atomic (kaddr,KM_USER0 );
fs/nilfs2/segment.c +8 -22
@@ -1846,26 +1846,13 @@ static int nilfs_segctor_write(struct nilfs_sc_info *sci, err =nilfs_segbuf_write (segbuf, &wi); res =nilfs_segbuf_wait (segbuf, &wi); - err =unlikely (err) ? : res; -if (unlikely (err)) + err = err ? : res; +if (err)return err; }return 0 ; } -static int nilfs_page_has_uncleared_buffer (struct page *page) -{ -struct buffer_head *head, *bh; - - head = bh =page_buffers (page); -do { -if (buffer_dirty (bh) && !list_empty (&bh->b_assoc_buffers)) -return 1 ; - bh = bh->b_this_page; - }while (bh != head); -return 0 ; -} -static void __nilfs_end_page_io (struct page *page,int err) {if (!err) {
@@ -1889,12 +1876,11 @@ static void nilfs_end_page_io(struct page *page, int err)if (!page)return ; -if (buffer_nilfs_node (page_buffers (page)) && -nilfs_page_has_uncleared_buffer (page)) -/* For b-tree node pages, this function may be called twice -or more because they might be split in a segment. -This check assures that cleanup has been done for all -buffers in a split btnode page. */ +if (buffer_nilfs_node (page_buffers (page)) && !PageWriteback (page)) +/* +* For b-tree node pages, this function may be called twice +* or more because they might be split in a segment. +*/ return ;__nilfs_end_page_io (page, err);
@@ -1957,7 +1943,7 @@ static void nilfs_segctor_abort_write(struct nilfs_sc_info *sci, }if (bh->b_page != fs_page) {nilfs_end_page_io (fs_page, err); -if (unlikely (fs_page == failed_page)) +if (fs_page && fs_page == failed_page) goto done; fs_page = bh->b_page; }
fs/partitions/check.c +1 -1
@@ -426,7 +426,7 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno,rcu_assign_pointer (ptbl->part[partno], p);/* suppress uevent if the disk supresses it */ -if (!dev_get_uevent_suppress (pdev)) +if (!dev_get_uevent_suppress (ddev))kobject_uevent (&pdev->kobj,KOBJ_ADD );return p;
include/linux/blkdev.h +1 -0
@@ -723,6 +723,7 @@ struct rq_map_data {int nr_entries;unsigned long offset;int null_mapped; +int from_user; };struct req_iterator {
include/linux/sched.h +2 -1
@@ -206,7 +206,7 @@ extern unsigned long long time_sync_thresh; ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0)#define task_contributes_to_load (task) \ ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \ - (task->flags & PF_FROZEN) == 0) + (task->flags & PF_FREEZING) == 0)#define __set_task_state (tsk, state_value) \ do { (tsk)->state = (state_value); } while (0)
@@ -1630,6 +1630,7 @@ extern cputime_t task_gtime(struct task_struct *p);#define PF_MEMALLOC 0x00000800/* Allocating memory */ #define PF_FLUSHER 0x00001000/* responsible for disk writeback */ #define PF_USED_MATH 0x00002000/* if unset the fpu must be initialized before use */ +#define PF_FREEZING 0x00004000/* freeze in progress. do not account to load */ #define PF_NOFREEZE 0x00008000/* this thread should not be frozen */ #define PF_FROZEN 0x00010000/* frozen for system suspend */ #define PF_FSTRANS 0x00020000/* inside a filesystem transaction */
include/net/netfilter/nf_conntrack.h +2 -2
@@ -255,8 +255,8 @@ static inline bool nf_ct_kill(struct nf_conn *ct)/* Update TCP window tracking data when NAT mangles the packet */ extern void nf_conntrack_tcp_update (const struct sk_buff *skb,unsigned int dataoff, -struct nf_conn *ct, -int dir); +struct nf_conn *ct,int dir, +s16 offset);/* Fake conntrack entry for untracked connections */ extern struct nf_conn nf_conntrack_untracked;
kernel/freezer.c +7 -0
@@ -44,12 +44,19 @@ void refrigerator(void)recalc_sigpending ();/* We sent fake signal, clean it up */ spin_unlock_irq (¤t->sighand->siglock); +/* prevent accounting of that task to load */ + current->flags |=PF_FREEZING ; +for (;;) {set_current_state (TASK_UNINTERRUPTIBLE );if (!frozen (current))break ;schedule (); } + +/* Remove the accounting blocker */ + current->flags &= ~PF_FREEZING ; +pr_debug ("%s left refrigerator\n" , current->comm);__set_current_state (save); }
kernel/sched.c +1 -0
@@ -497,6 +497,7 @@ struct rt_rq {#endif #ifdef CONFIG_SMP unsigned long rt_nr_migratory; +unsigned long rt_nr_total;int overloaded;struct plist_head pushable_tasks;#endif
kernel/sched_rt.c +17 -1
@@ -10,6 +10,8 @@ static inline struct task_struct *rt_task_of(struct sched_rt_entity *rt_se)#ifdef CONFIG_RT_GROUP_SCHED +#define rt_entity_is_task (rt_se) (!(rt_se)->my_q) +static inline struct rq *rq_of_rt_rq (struct rt_rq *rt_rq) {return rt_rq->rq;
@@ -22,6 +24,8 @@ static inline struct rt_rq *rt_rq_of_se(struct sched_rt_entity *rt_se)#else /* CONFIG_RT_GROUP_SCHED */ +#define rt_entity_is_task (rt_se) (1) +static inline struct rq *rq_of_rt_rq (struct rt_rq *rt_rq) { return container_of(rt_rq, struct rq, rt);
@@ -73,7 +77,7 @@ static inline void rt_clear_overload(struct rq *rq)static void update_rt_migration (struct rt_rq *rt_rq) { -if (rt_rq->rt_nr_migratory && (rt_rq->rt_nr_running >1 )) { +if (rt_rq->rt_nr_migratory && rt_rq->rt_nr_total >1 ) {if (!rt_rq->overloaded) {rt_set_overload (rq_of_rt_rq (rt_rq)); rt_rq->overloaded =1 ;
@@ -86,6 +90,12 @@ static void update_rt_migration(struct rt_rq *rt_rq)static void inc_rt_migration (struct sched_rt_entity *rt_se,struct rt_rq *rt_rq) { +if (!rt_entity_is_task (rt_se)) +return ; + + rt_rq = &rq_of_rt_rq (rt_rq)->rt; + + rt_rq->rt_nr_total++;if (rt_se->nr_cpus_allowed >1 ) rt_rq->rt_nr_migratory++;
@@ -94,6 +104,12 @@ static void inc_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)static void dec_rt_migration (struct sched_rt_entity *rt_se,struct rt_rq *rt_rq) { +if (!rt_entity_is_task (rt_se)) +return ; + + rt_rq = &rq_of_rt_rq (rt_rq)->rt; + + rt_rq->rt_nr_total--;if (rt_se->nr_cpus_allowed >1 ) rt_rq->rt_nr_migratory--;
kernel/trace/trace_functions.c +1 -1
@@ -364,7 +364,7 @@ ftrace_trace_onoff_callback(char *glob, char *cmd, char *param, int enable) out_reg: ret =register_ftrace_function_probe (glob, ops, count); -return ret; +return ret <0 ? ret :0 ; }static struct ftrace_func_command ftrace_traceon_cmd = {
mm/filemap.c +1 -0
@@ -2249,6 +2249,7 @@ again:pagefault_enable ();flush_dcache_page (page); +mark_page_accessed (page); status = a_ops->write_end (file, mapping, pos, bytes, copied, page, fsdata);if (unlikely (status <0 ))
mm/internal.h +4 -0
@@ -284,4 +284,8 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, int len, int flags, struct page **pages, struct vm_area_struct **vmas); +#define ZONE_RECLAIM_NOSCAN -2 +#define ZONE_RECLAIM_FULL -1 +#define ZONE_RECLAIM_SOME 0 +#define ZONE_RECLAIM_SUCCESS 1#endif
mm/nommu.c +3 -0
@@ -69,6 +69,9 @@ int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;int sysctl_nr_trim_pages =CONFIG_NOMMU_INITIAL_TRIM_EXCESS ;int heap_stack_gap =0 ; +/* amount of vm to protect from userspace access */ +unsigned long mmap_min_addr =CONFIG_DEFAULT_MMAP_MIN_ADDR ; +atomic_long_t mmap_pages_allocated;EXPORT_SYMBOL (mem_map);
mm/page_alloc.c +22 -4
@@ -1420,20 +1420,38 @@ zonelist_scan:if (!(alloc_flags &ALLOC_NO_WATERMARKS )) {unsigned long mark; +int ret;if (alloc_flags &ALLOC_WMARK_MIN ) mark = zone->pages_min;else if (alloc_flags &ALLOC_WMARK_LOW ) mark = zone->pages_low;else mark = zone->pages_high; -if (!zone_watermark_ok (zone, order, mark, - classzone_idx, alloc_flags)) { -if (!zone_reclaim_mode || - !zone_reclaim (zone, gfp_mask, order)) + +if (zone_watermark_ok (zone, order, mark, + classzone_idx, alloc_flags)) + goto try_this_zone; + +if (zone_reclaim_mode ==0 ) + goto this_zone_full; + + ret =zone_reclaim (zone, gfp_mask, order); +switch (ret) { +case ZONE_RECLAIM_NOSCAN : +/* did not scan */ + goto try_next_zone; +case ZONE_RECLAIM_FULL : +/* scanned but unreclaimable */ + goto this_zone_full; +default : +/* did we reclaim enough */ +if (!zone_watermark_ok (zone, order, mark, + classzone_idx, alloc_flags)) goto this_zone_full; } } +try_this_zone: page =buffered_rmqueue (preferred_zone, zone, order, gfp_mask);if (page)break ;
mm/slab.c +1 -1
@@ -2592,7 +2592,7 @@ void kmem_cache_destroy(struct kmem_cache *cachep) }if (unlikely (cachep->flags &SLAB_DESTROY_BY_RCU )) -synchronize_rcu (); +rcu_barrier ();__kmem_cache_destroy (cachep);mutex_unlock (&cache_chain_mutex);
mm/slob.c +2 -0
@@ -590,6 +590,8 @@ EXPORT_SYMBOL(kmem_cache_create);void kmem_cache_destroy (struct kmem_cache *c) { +if (c->flags &SLAB_DESTROY_BY_RCU ) +rcu_barrier ();slob_free (c,sizeof (struct kmem_cache )); }EXPORT_SYMBOL (kmem_cache_destroy);
mm/slub.c +2 -0
@@ -2490,6 +2490,8 @@ static inline int kmem_cache_close(struct kmem_cache *s)*/ void kmem_cache_destroy (struct kmem_cache *s) { +if (s->flags &SLAB_DESTROY_BY_RCU ) +rcu_barrier ();down_write (&slub_lock); s->refcount--;if (!s->refcount) {
mm/vmscan.c +6 -5
@@ -2426,16 +2426,16 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)*/ if (zone_pagecache_reclaimable (zone) <= zone->min_unmapped_pages &&zone_page_state (zone,NR_SLAB_RECLAIMABLE ) <= zone->min_slab_pages) -return 0 ; +return ZONE_RECLAIM_FULL ;if (zone_is_all_unreclaimable (zone)) -return 0 ; +return ZONE_RECLAIM_FULL ;/* * Do not scan if the allocation should not be delayed. */ if (!(gfp_mask & __GFP_WAIT) || (current->flags &PF_MEMALLOC )) -return 0 ; +return ZONE_RECLAIM_NOSCAN ;/* * Only run zone reclaim on the local zone or on zones that do not
@@ -2445,10 +2445,11 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)*/ node_id =zone_to_nid (zone);if (node_state (node_id,N_CPU ) && node_id !=numa_node_id ()) -return 0 ; +return ZONE_RECLAIM_NOSCAN ;if (zone_test_and_set_flag (zone,ZONE_RECLAIM_LOCKED )) -return 0 ; +return ZONE_RECLAIM_NOSCAN ; + ret =__zone_reclaim (zone, gfp_mask, order);zone_clear_flag (zone,ZONE_RECLAIM_LOCKED );
net/dsa/mv88e6xxx.c +1 -1
@@ -418,7 +418,7 @@ static int mv88e6xxx_stats_wait(struct dsa_switch *ds)int i;for (i =0 ; i <10 ; i++) { - ret =REG_READ (REG_GLOBAL2 ,0x1d ); + ret =REG_READ (REG_GLOBAL ,0x1d );if ((ret &0x8000 ) ==0 )return 0 ; }
net/ipv4/netfilter/nf_nat_helper.c +11 -6
@@ -191,7 +191,8 @@ nf_nat_mangle_tcp_packet(struct sk_buff *skb, ct, ctinfo);/* Tell TCP window tracking about seq change */ nf_conntrack_tcp_update (skb,ip_hdrlen (skb), - ct,CTINFO2DIR (ctinfo)); + ct,CTINFO2DIR (ctinfo), + (int )rep_len - (int )match_len);nf_conntrack_event_cache (IPCT_NATSEQADJ , ct); }
@@ -377,6 +378,7 @@ nf_nat_seq_adjust(struct sk_buff *skb,struct tcphdr *tcph;int dir;__be32 newseq, newack; +s16 seqoff, ackoff;struct nf_conn_nat *nat =nfct_nat (ct);struct nf_nat_seq *this_way, *other_way;
@@ -390,15 +392,18 @@ nf_nat_seq_adjust(struct sk_buff *skb, tcph = (void *)skb->data +ip_hdrlen (skb);if (after (ntohl (tcph->seq), this_way->correction_pos)) - newseq =htonl (ntohl (tcph->seq) + this_way->offset_after); + seqoff = this_way->offset_after;else - newseq =htonl (ntohl (tcph->seq) + this_way->offset_before); + seqoff = this_way->offset_before;if (after (ntohl (tcph->ack_seq) - other_way->offset_before, other_way->correction_pos)) - newack =htonl (ntohl (tcph->ack_seq) - other_way->offset_after); + ackoff = other_way->offset_after;else - newack =htonl (ntohl (tcph->ack_seq) - other_way->offset_before); + ackoff = other_way->offset_before; + + newseq =htonl (ntohl (tcph->seq) + seqoff); + newack =htonl (ntohl (tcph->ack_seq) - ackoff);inet_proto_csum_replace4 (&tcph->check, skb, tcph->seq, newseq,0 );inet_proto_csum_replace4 (&tcph->check, skb, tcph->ack_seq, newack,0 );
@@ -413,7 +418,7 @@ nf_nat_seq_adjust(struct sk_buff *skb,if (!nf_nat_sack_adjust (skb, tcph, ct, ctinfo))return 0 ; -nf_conntrack_tcp_update (skb,ip_hdrlen (skb), ct, dir); +nf_conntrack_tcp_update (skb,ip_hdrlen (skb), ct, dir, seqoff);return 1 ; }
net/netfilter/nf_conntrack_core.c +30 -6
@@ -295,7 +295,8 @@ begin: h =__nf_conntrack_find (net, tuple);if (h) { ct =nf_ct_tuplehash_to_ctrack (h); -if (unlikely (!atomic_inc_not_zero (&ct->ct_general.use))) +if (unlikely (nf_ct_is_dying (ct) || + !atomic_inc_not_zero (&ct->ct_general.use))) h =NULL ;else {if (unlikely (!nf_ct_tuple_equal (tuple, &h->tuple))) {
@@ -385,7 +386,6 @@ __nf_conntrack_confirm(struct sk_buff *skb)/* Remove from unconfirmed list */ hlist_nulls_del_rcu (&ct->tuplehash[IP_CT_DIR_ORIGINAL ].hnnode); -__nf_conntrack_hash_insert (ct, hash, repl_hash);/* Timer relative to confirmation time, not original setting time, otherwise we'd get timer wrap in weird delay cases. */
@@ -393,8 +393,16 @@ __nf_conntrack_confirm(struct sk_buff *skb)add_timer (&ct->timeout);atomic_inc (&ct->ct_general.use);set_bit (IPS_CONFIRMED_BIT , &ct->status); + +/* Since the lookup is lockless, hash insertion must be done after +* starting the timer and setting the CONFIRMED bit. The RCU barriers +* guarantee that no other CPU can find the conntrack before the above +* stores are visible. +*/ +__nf_conntrack_hash_insert (ct, hash, repl_hash);NF_CT_STAT_INC (net, insert);spin_unlock_bh (&nf_conntrack_lock); + help =nfct_help (ct);if (help && help->helper)nf_conntrack_event_cache (IPCT_HELPER , ct);
@@ -467,7 +475,8 @@ static noinline int early_drop(struct net *net, unsigned int hash) cnt++; } -if (ct &&unlikely (!atomic_inc_not_zero (&ct->ct_general.use))) +if (ct &&unlikely (nf_ct_is_dying (ct) || + !atomic_inc_not_zero (&ct->ct_general.use))) ct =NULL ;if (ct || cnt >=NF_CT_EVICTION_RANGE )break ;
@@ -516,22 +525,37 @@ struct nf_conn *nf_conntrack_alloc(struct net *net, } } - ct =kmem_cache_zalloc (nf_conntrack_cachep, gfp); +/* +* Do not use kmem_cache_zalloc(), as this cache uses +* SLAB_DESTROY_BY_RCU. +*/ + ct =kmem_cache_alloc (nf_conntrack_cachep, gfp);if (ct ==NULL ) {pr_debug ("nf_conntrack_alloc: Can't alloc conntrack.\n" );atomic_dec (&net->ct.count);return ERR_PTR (-ENOMEM ); } - -atomic_set (&ct->ct_general.use,1 ); +/* +* Let ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode.next +* and ct->tuplehash[IP_CT_DIR_REPLY].hnnode.next unchanged. +*/ +memset (&ct->tuplehash[IP_CT_DIR_MAX ],0 , + sizeof(*ct) - offsetof(struct nf_conn, tuplehash[IP_CT_DIR_MAX])); ct->tuplehash[IP_CT_DIR_ORIGINAL ].tuple = *orig; + ct->tuplehash[IP_CT_DIR_ORIGINAL ].hnnode.pprev =NULL ; ct->tuplehash[IP_CT_DIR_REPLY ].tuple = *repl; + ct->tuplehash[IP_CT_DIR_REPLY ].hnnode.pprev =NULL ;/* Don't set timer yet: wait for confirmation */ setup_timer (&ct->timeout, death_by_timeout, (unsigned long )ct);#ifdef CONFIG_NET_NS ct->ct_net = net;#endif +/* +* changes to lookup keys must be done before setting refcnt to 1 +*/ +smp_wmb (); +atomic_set (&ct->ct_general.use,1 );return ct; }EXPORT_SYMBOL_GPL (nf_conntrack_alloc);
net/netfilter/nf_conntrack_proto_tcp.c +3 -3
@@ -706,8 +706,8 @@ static bool tcp_in_window(const struct nf_conn *ct,/* Caller must linearize skb at tcp header. */ void nf_conntrack_tcp_update (const struct sk_buff *skb,unsigned int dataoff, -struct nf_conn *ct, -int dir) +struct nf_conn *ct,int dir, +s16 offset) {const struct tcphdr *tcph = (const void *)skb->data + dataoff;const struct ip_ct_tcp_state *sender = &ct->proto.tcp.seen[dir];
@@ -720,7 +720,7 @@ void nf_conntrack_tcp_update(const struct sk_buff *skb,/* * We have to worry for the ack in the reply packet only... */ -if (after (end, ct->proto.tcp.seen[dir].td_end)) +if (ct->proto.tcp.seen[dir].td_end + offset == end) ct->proto.tcp.seen[dir].td_end = end; ct->proto.tcp.last_end = end;write_unlock_bh (&tcp_lock);
net/netfilter/nf_log.c +14 -8
@@ -47,7 +47,6 @@ int nf_log_register(u_int8_t pf, struct nf_logger *logger)mutex_lock (&nf_log_mutex);if (pf ==NFPROTO_UNSPEC ) { -int i;for (i =NFPROTO_UNSPEC ; i <NFPROTO_NUMPROTO ; i++)list_add_tail (&(logger->list[i]), &(nf_loggers_l[i])); }else {
@@ -216,7 +215,7 @@ static const struct file_operations nflog_file_ops = {#endif /* PROC_FS */ #ifdef CONFIG_SYSCTL -struct ctl_path nf_log_sysctl_path[] = { +static struct ctl_path nf_log_sysctl_path[] = { { .procname ="net" , .ctl_name =CTL_NET , }, { .procname ="netfilter" , .ctl_name =NET_NETFILTER , }, { .procname = "nf_log", .ctl_name = CTL_UNNUMBERED, },
@@ -228,19 +227,26 @@ static struct ctl_table nf_log_sysctl_table[NFPROTO_NUMPROTO+1];static struct ctl_table_header *nf_log_dir_header;static int nf_log_proc_dostring (ctl_table *table,int write,struct file *filp, -void *buffer,size_t *lenp,loff_t *ppos) +void __user *buffer,size_t *lenp,loff_t *ppos) {const struct nf_logger *logger; +char buf[NFLOGGER_NAME_LEN ]; +size_t size = *lenp;int r =0 ;int tindex = (unsigned long )table->extra1;if (write) { -if (!strcmp (buffer,"NONE" )) { +if (size >sizeof (buf)) + size =sizeof (buf); +if (copy_from_user (buf, buffer, size)) +return -EFAULT ; + +if (!strcmp (buf,"NONE" )) {nf_log_unbind_pf (tindex);return 0 ; }mutex_lock (&nf_log_mutex); - logger =__find_logger (tindex, buffer); + logger =__find_logger (tindex, buf);if (logger ==NULL ) {mutex_unlock (&nf_log_mutex);return -ENOENT ;
@@ -248,14 +254,14 @@ static int nf_log_proc_dostring(ctl_table *table, int write, struct file *filp,rcu_assign_pointer (nf_loggers[tindex], logger);mutex_unlock (&nf_log_mutex); }else { -rcu_read_lock (); - logger =rcu_dereference (nf_loggers[tindex]); +mutex_lock (&nf_log_mutex); + logger = nf_loggers[tindex];if (!logger) table->data ="NONE" ;else table->data = logger->name; r =proc_dostring (table, write, filp, buffer, lenp, ppos); -rcu_read_unlock (); +mutex_unlock (&nf_log_mutex); }return r;
net/netfilter/xt_quota.c +1 -0
@@ -54,6 +54,7 @@ static bool quota_mt_check(const struct xt_mtchk_param *par)if (q->master ==NULL )return -ENOMEM ; + q->master->quota = q->quota;return true; }
net/netfilter/xt_rateest.c +1 -1
@@ -66,7 +66,7 @@ xt_rateest_mt(const struct sk_buff *skb, const struct xt_match_param *par)if (info->flags &XT_RATEEST_MATCH_BPS ) ret &= bps1 == bps2;if (info->flags &XT_RATEEST_MATCH_PPS ) - ret &= pps2 == pps2; + ret &= pps1 == pps2;break ; }
net/wireless/scan.c +0 -1
@@ -365,7 +365,6 @@ cfg80211_bss_update(struct cfg80211_registered_device *dev, found =rb_find_bss (dev, res);if (found) { -kref_get (&found->ref); found->pub.beacon_interval = res->pub.beacon_interval; found->pub.tsf = res->pub.tsf; found->pub.signal = res->pub.signal;
sound/pci/ca0106/ca0106_main.c +2 -2
@@ -325,9 +325,9 @@ static struct snd_pcm_hardware snd_ca0106_capture_hw = { .rate_max = 192000, .channels_min = 2, .channels_max = 2, - .buffer_bytes_max = ((65536 - 64) * 8), + .buffer_bytes_max = 65536 - 128, .period_bytes_min = 64, - .period_bytes_max = (65536 - 64), + .period_bytes_max = 32768 - 64, .periods_min = 2, .periods_max = 2, .fifo_size = 0,
sound/pci/hda/patch_realtek.c +16 -17
@@ -10204,6 +10204,18 @@ static void alc262_lenovo_3000_unsol_event(struct hda_codec *codec,alc262_lenovo_3000_automute (codec,1 ); } +static int amp_stereo_mute_update (struct hda_codec *codec,hda_nid_t nid, +int dir,int idx,long *valp) +{ +int i, change =0 ; + +for (i =0 ; i <2 ; i++, valp++) + change |=snd_hda_codec_amp_update (codec, nid, i, dir, idx, +HDA_AMP_MUTE , + *valp ?0 :HDA_AMP_MUTE ); +return change; +} +/* bind hp and internal speaker mute (with plug check) */ static int alc262_fujitsu_master_sw_put (struct snd_kcontrol *kcontrol,struct snd_ctl_elem_value *ucontrol)
@@ -10212,13 +10224,8 @@ static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol,long *valp = ucontrol->value.integer.value;int change; - change =snd_hda_codec_amp_stereo (codec,0x14 ,HDA_OUTPUT ,0 , -HDA_AMP_MUTE , - valp ?0 :HDA_AMP_MUTE ); - change |=snd_hda_codec_amp_stereo (codec,0x1b ,HDA_OUTPUT ,0 , -HDA_AMP_MUTE , - valp ?0 :HDA_AMP_MUTE ); - + change =amp_stereo_mute_update (codec,0x14 ,HDA_OUTPUT ,0 , valp); + change |=amp_stereo_mute_update (codec,0x1b ,HDA_OUTPUT ,0 , valp);if (change)alc262_fujitsu_automute (codec,0 );return change;
@@ -10253,10 +10260,7 @@ static int alc262_lenovo_3000_master_sw_put(struct snd_kcontrol *kcontrol,long *valp = ucontrol->value.integer.value;int change; - change =snd_hda_codec_amp_stereo (codec,0x1b ,HDA_OUTPUT ,0 , -HDA_AMP_MUTE , - valp ?0 :HDA_AMP_MUTE ); - + change =amp_stereo_mute_update (codec,0x1b ,HDA_OUTPUT ,0 , valp);if (change)alc262_lenovo_3000_automute (codec,0 );return change;
@@ -11377,12 +11381,7 @@ static int alc268_acer_master_sw_put(struct snd_kcontrol *kcontrol,long *valp = ucontrol->value.integer.value;int change; - change =snd_hda_codec_amp_update (codec,0x14 ,0 ,HDA_OUTPUT ,0 , -HDA_AMP_MUTE , - valp[0 ] ?0 :HDA_AMP_MUTE ); - change |=snd_hda_codec_amp_update (codec,0x14 ,1 ,HDA_OUTPUT ,0 , -HDA_AMP_MUTE , - valp[1 ] ?0 :HDA_AMP_MUTE ); + change =amp_stereo_mute_update (codec,0x14 ,HDA_OUTPUT ,0 , valp);if (change)alc268_acer_automute (codec,0 );return change;
sound/pci/hda/patch_sigmatel.c +5 -2
@@ -2325,6 +2325,7 @@ static struct snd_pci_quirk stac9205_cfg_tbl[] = {SND_PCI_QUIRK (PCI_VENDOR_ID_DELL ,0x0228 ,"Dell Vostro 1500" ,STAC_9205_DELL_M42 ),/* Gateway */ +SND_PCI_QUIRK (0x107b ,0x0560 ,"Gateway T6834c" ,STAC_9205_EAPD ), SND_PCI_QUIRK(0x107b, 0x0565, "Gateway T1616", STAC_9205_EAPD), {} /* terminator */ };
@@ -5661,6 +5662,8 @@ static unsigned int *stac9872_brd_tbl[STAC_9872_MODELS] = { };static struct snd_pci_quirk stac9872_cfg_tbl[] = { +SND_PCI_QUIRK_MASK (0x104d ,0xfff0 ,0x81e0 , +"Sony VAIO F/S" ,STAC_9872_VAIO ), {}/* terminator */ };
@@ -5673,6 +5676,8 @@ static int patch_stac9872(struct hda_codec *codec)if (spec ==NULL )return -ENOMEM ; codec->spec = spec; + spec->num_pins =ARRAY_SIZE (stac9872_pin_nids); + spec->pin_nids = stac9872_pin_nids; spec->board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS, stac9872_models,
@@ -5684,8 +5689,6 @@ static int patch_stac9872(struct hda_codec *codec)stac92xx_set_config_regs (codec, stac9872_brd_tbl[spec->board_config]); - spec->num_pins =ARRAY_SIZE (stac9872_pin_nids); - spec->pin_nids = stac9872_pin_nids; spec->multiout.dac_nids = spec->dac_nids; spec->num_adcs =ARRAY_SIZE (stac9872_adc_nids); spec->adc_nids = stac9872_adc_nids;
sound/pci/oxygen/virtuoso.c +2 -0
@@ -621,6 +621,8 @@ static void xonar_d2_resume(struct oxygen *chip)static void xonar_d1_resume (struct oxygen *chip) { +oxygen_set_bits8 (chip,OXYGEN_FUNCTION ,OXYGEN_FUNCTION_RESET_CODEC ); +msleep (1 );cs43xx_init (chip);xonar_enable_output (chip); }
sound/soc/codecs/wm8753.c +1 -1
@@ -1664,7 +1664,7 @@ static int wm8753_register(struct wm8753_priv *wm8753) codec->reg_cache = &wm8753->reg_cache; codec->private_data = wm8753; -memcpy (codec->reg_cache, wm8753_reg,sizeof (codec->reg_cache)); +memcpy (codec->reg_cache, wm8753_reg,sizeof (wm8753->reg_cache));INIT_DELAYED_WORK (&codec->delayed_work, wm8753_work); ret =wm8753_reset (codec);
sound/usb/usbaudio.c +13 -1
@@ -2649,7 +2649,7 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)struct usb_interface_descriptor *altsd;int i, altno, err, stream;int format; -struct audioformat *fp; +struct audioformat *fp =NULL ;unsigned char *fmt, *csep;int num;
@@ -2722,6 +2722,18 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)continue ; } +/* +* Blue Microphones workaround: The last altsetting is identical +* with the previous one, except for a larger packet size, but +* is actually a mislabeled two-channel setting; ignore it. +*/ +if (fmt[4 ] ==1 && fmt[5 ] ==2 && altno ==2 && num ==3 && + fp && fp->altsetting ==1 && fp->channels ==1 && + fp->format ==SNDRV_PCM_FORMAT_S16_LE && +le16_to_cpu (get_endpoint (alts,0 )->wMaxPacketSize) == + fp->maxpacksize *2 ) +continue ; + csep =snd_usb_find_desc (alts->endpoint[0 ].extra, alts->endpoint[0 ].extralen,NULL ,USB_DT_CS_ENDPOINT );/* Creamware Noah has this descriptor after the 2nd endpoint */ if (!csep && altsd->bNumEndpoints >=2 )