Linux 2.6.28.10
Subsystems (48)
I'm announcing the release of the 2.6.28.10 kernel.
It contains a wide range of bugfixes, and all users of the 2.6.28 kernel series are strongly encouraged to upgrade. Especially due to the CVE issues that are fixed here.
NOTE, this is the LAST update of the 2.6.28 kernel series, so all users are very strongly encouraged to upgrade to the 2.6.29 series at this point in time!
I'll also be replying to this message with a copy of the patch between 2.6.28.9 and 2.6.28.10
The updated 2.6.28.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.28.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.28.y.git;a=summarythanks,
greg k-h
------------
Makefile | 2 arch/powerpc/include/asm/futex.h | 12 arch/powerpc/include/asm/processor.h | 19 + arch/powerpc/kernel/signal.c | 4 arch/powerpc/kernel/signal.h | 2 arch/powerpc/kernel/signal_32.c | 4 arch/powerpc/kernel/signal_64.c | 2 arch/x86/boot/memory.c | 7 arch/x86/include/asm/kvm_host.h | 10 arch/x86/kernel/cpu/mtrr/generic.c | 51 ++- arch/x86/kvm/i8254.c | 2 arch/x86/kvm/irq.c | 7 arch/x86/kvm/irq.h | 1 arch/x86/kvm/lapic.c | 66 +--- arch/x86/kvm/lapic.h | 2 arch/x86/kvm/mmu.c | 24 + arch/x86/kvm/paging_tmpl.h | 8 arch/x86/kvm/svm.c | 17 + arch/x86/kvm/vmx.c | 7 arch/x86/kvm/vmx.h | 5 arch/x86/kvm/x86.c | 14 arch/x86/kvm/x86_emulate.c | 2 arch/x86/pci/i386.c | 3 block/genhd.c | 12 drivers/acpi/dock.c | 3 drivers/ata/pata_hpt37x.c | 22 - drivers/char/agp/generic.c | 4 drivers/char/raw.c | 1 drivers/crypto/ixp4xx_crypto.c | 182 ++++-------- drivers/ide/hpt366.c | 4 drivers/input/gameport/gameport.c | 14 drivers/isdn/gigaset/bas-gigaset.c | 16 - drivers/md/md.c | 27 + drivers/misc/thinkpad_acpi.c | 41 +- drivers/net/b44.c | 2 drivers/net/bonding/bond_main.c | 25 + drivers/net/bonding/bonding.h | 6 drivers/net/r8169.c | 5 drivers/net/wireless/ath9k/ath9k.h | 4 drivers/net/wireless/ath9k/core.c | 1 drivers/net/wireless/ath9k/core.h | 33 ++ drivers/net/wireless/ath9k/hw.c | 22 + drivers/net/wireless/b43/xmit.c | 2 drivers/scsi/libiscsi.c | 9 drivers/scsi/sg.c | 466 +++++++++++++++------------------ drivers/spi/spi.c | 22 - drivers/usb/class/cdc-wdm.c | 2 drivers/usb/core/message.c | 3 drivers/usb/core/quirks.c | 4 drivers/usb/core/sysfs.c | 4 drivers/usb/gadget/f_rndis.c | 2 drivers/usb/gadget/u_ether.c | 8 drivers/usb/host/ehci-q.c | 32 ++ drivers/usb/host/ehci.h | 3 drivers/usb/serial/ftdi_sio.c | 1 drivers/usb/serial/ftdi_sio.h | 7 drivers/usb/storage/cypress_atacb.c | 15 - drivers/usb/storage/scsiglue.c | 6 drivers/usb/storage/unusual_devs.h | 6 fs/anon_inodes.c | 7 fs/buffer.c | 2 fs/cifs/CHANGES | 3 fs/cifs/cifssmb.c | 6 fs/cifs/connect.c | 2 fs/compat.c | 12 fs/dquot.c | 2 fs/drop_caches.c | 2 fs/exec.c | 4 fs/fs-writeback.c | 3 fs/hugetlbfs/inode.c | 3 fs/ocfs2/file.c | 8 fs/proc/base.c | 50 +-- fs/splice.c | 25 + include/linux/capability.h | 23 + include/linux/genhd.h | 1 include/linux/kvm.h | 2 include/linux/pagemap.h | 12 include/linux/pci_regs.h | 2 include/linux/raid/md_k.h | 2 include/linux/sched.h | 3 include/linux/usb/quirks.h | 3 kernel/exit.c | 3 kernel/kprobes.c | 4 kernel/posix-cpu-timers.c | 7 kernel/sched.c | 65 ++++ kernel/signal.c | 8 mm/filemap_xip.c | 4 mm/mmap.c | 2 net/bridge/br_if.c | 1 net/ipv4/netfilter/arp_tables.c | 4 net/ipv4/netfilter/ip_tables.c | 4 net/ipv6/inet6_hashtables.c | 4 net/ipv6/ip6_input.c | 4 net/ipv6/netfilter/ip6_tables.c | 4 net/netfilter/nf_conntrack_proto_tcp.c | 3 net/netrom/af_netrom.c | 8 net/rose/af_rose.c | 4 net/sctp/endpointola.c | 3 net/x25/af_x25.c | 6 net/xfrm/xfrm_state.c | 2 security/selinux/hooks.c | 1 security/smack/smack_lsm.c | 4 sound/pci/hda/patch_analog.c | 2 virt/kvm/kvm_main.c | 41 ++ virt/kvm/kvm_trace.c | 1 105 files changed, 952 insertions(+), 701 deletions(-)
Akinobu Mita (2):
ALSA: hda - add missing comma in ad1884_slave_vols
hugetlbfs: return negative error code for bad mount option
Al Viro (1):
net: fix sctp breakage
Alan Cox (1):
af_rose/x25: Sanity check the maximum user frame size
Alan Stern (4):
USB: EHCI: add software retry for transaction errors
USB: usb-storage: increase max_sectors for tape drives
USB: add quirk to avoid config and interface strings
USB: usb-storage: augment unusual_devs entry for Simple Tech/Datafab
Amit Shah (3):
KVM: SVM: Set the 'g' bit of the cs selector for cross-vendor migration
KVM: SVM: Set the 'busy' flag of the TR selector
KVM: x86 emulator: Fix handling of VMMCALL instruction
Ananth N Mavinakayanahalli (1):
kprobes: Fix locking imbalance in kretprobes
Andreas Herrmann (1):
x86: mtrr: don't modify RdDram/WrDram bits of fixed MTRRs
Avi Kivity (2):
KVM: Advertise the bug in memory region destruction as fixed
KVM: VMX: Flush volatile msrs before emulating rdmsr
Boaz Harrosh (1):
USB: fix USB_STORAGE_CYPRESS_ATACB
Christian Borntraeger (2):
anon_inodes: use fops->owner for module refcount
KVM: set owner of cpu and vm file operations
Christian Hohnstaedt (1):
crypto: ixp4xx - Fix handling of chained sg buffers
Chuck Ebbert (1):
xfrm: spin_lock() should be spin_unlock() in xfrm_state.c
Dan Carpenter (2):
Add a missing unlock_kernel() in raw_open()
dock: fix dereference after kfree()
Dan Williams (1):
md: fix deadlock when stopping arrays
David Brownell (2):
USB: gadget: fix rndis regression
spi: spi_write_then_read() bugfixes
Dmitry Torokhov (1):
Input: gameport - fix attach driver code
Etienne Basset (1):
security/smack: fix oops when setting a size 0 SMACK64 xattr
Eugene Teo (1):
unreached code in selinux_ip_postroute_iptables_compat() (CVE-2009-1184)
FUJITA Tomonori (1):
SCSI: sg: avoid blk_put_request/blk_rq_unmap_user in interrupt
Francois Romieu (1):
r8169: Reset IntrStatus after chip reset
Glauber Costa (1):
KVM: Really remove a slot when a user ask us so
Gleb Natapov (1):
KVM: call kvm_arch_vcpu_reset() instead of the kvm_x86_ops callback
Greg Kroah-Hartman (1):
Linux 2.6.28.10
Henrique de Moraes Holschuh (1):
thinkpad-acpi: fix LED blinking through timer trigger
Hidetoshi Seto (1):
posixtimers, sched: Fix posix clock monotonicity
Hugh Dickins (2):
mm: pass correct mm when growing stack
fs core fixes
Izik Eidus (1):
KVM: MMU: Fix aliased gfns treated as unaliased
Jan Kiszka (1):
KVM: x86: Reset pending/inject NMI state on CPU reset
Jay Vosburgh (1):
bonding: Fix updating of speed/duplex changes
Jean Delvare (3):
net/netrom: Fix socket locking
SCSI: libiscsi: fix iscsi pool error path
SCSI: libiscsi: fix iscsi pool error path again
Jeff Layton (1):
cifs: fix buffer format byte on NT Rename/hardlink
Jens Axboe (1):
block: revert part of 18ce3751ccd488c78d3827e9f6bf54e6322676fb
Jesper Nilsson (1):
ipv6: Plug sk_buff leak in ipv6_rcv (net/ipv6/ip6_input.c)
Jonathan McDowell (1):
usb gadget: fix ethernet link reports to ethtool
Josh Boyer (1):
powerpc: Sanitize stack pointer in signal handling code
Lee Schermerhorn (1):
mm: define a UNIQUE value for AS_UNEVICTABLE flag
Lorenzo Nava (1):
b43: fix b43_plcp_get_bitrate_idx_ofdm return type
Luis R. Rodriguez (2):
ath9k: implement IO serialization
ath9k: AR9280 PCI devices must serialize IO as well
Marcelo Tosatti (6):
KVM: MMU: check for present pdptr shadow page in walk_shadow
KVM: MMU: handle large host sptes on invlpg/resync
KVM: mmu_notifiers release method
KVM: PIT: fix i8254 pending count read
KVM: x86: disable kvmclock on non constant TSC hosts
KVM: x86: fix LAPIC pending count calculation
Mark H. Weaver (1):
netfilter: nf_conntrack_tcp: fix unaligned memory access in tcp_sack
Martin Schwidefsky (1):
mm: do_xip_mapping_read: fix length calculation
Michael Buesch (1):
b44: Use kernel DMA addresses for the kernel DMA API
Michael K. Johnson (1):
x86, setup: mark %esi as clobbered in E820 BIOS call
Miklos Szeredi (2):
splice: fix deadlock in splicing to file
fix ptrace slowness
Nathan Lynch (1):
sched: do not count frozen tasks toward load
Nitin A Kamble (2):
KVM: Fix cpuid leaf 0xb loop termination
KVM: Fix cpuid iteration on multiple leaves per eac
Oleg Nesterov (1):
exit_notify: kill the wrong capable(CAP_KILL) check (CVE-2009-1337)
Oliver Neukum (1):
USB: fix oops in cdc-wdm in case of malformed descriptors
Patrick McHardy (1):
netfilter: {ip, ip6, arp}_tables: fix incorrect loop detection
Paul Mackerras (1):
powerpc: Fix data-corrupting bug in __futex_atomic_op
Pavel Emelyanov (1):
ipv6: don't use tw net when accounting for recycled tw
Peter Korsgaard (1):
USB: ftdi_sio: add vendor/project id for JETI specbos 1201 spectrometer
Serge E. Hallyn (1):
add some long-missing capabilities to fs_mask
Sergei Shtylyov (2):
hpt366: fix HPT370 DMA timeouts
pata_hpt37x: fix HPT370 DMA timeouts
Shaohua Li (1):
agp: zero pages before sending to userspace
Sheng Yang (2):
KVM: MMU: Extend kvm_mmu_page->slot_bitmap size
KVM: VMX: Move private memory slot position
Stephen Hemminger (1):
bridge: bad error handling when adding invalid ether address
Steve French (1):
CIFS: Fix memory overwrite when saving nativeFileSystem field during mount
Tejun Heo (1):
block: include empty disks in /proc/diskstats
Tilman Schmidt (1):
bas_gigaset: correctly allocate USB interrupt transfer buffer
Tony Battersby (2):
SCSI: sg: fix races during device removal
SCSI: sg: fix races with ioctl(SG_IO)
Venkatesh Pallipadi (1):
x86, PAT, PCI: Change vma prot in pci_mmap to reflect inherited prot
Wu Fengguang (2):
vfs: skip I_CLEAR state inodes
KVM: Prevent trace call into unloaded module text
Yu Zhao (1):
PCI: fix incorrect mask of PM No_Soft_Reset bit
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 28 -EXTRAVERSION = .9 +EXTRAVERSION = .10 NAME = Erotic Pickled Herring # *DOCUMENTATION*
arch/powerpc/include/asm/futex.h +6 -6
@@ -27,7 +27,7 @@PPC_LONG "1b,4b,2b,4b\n" \".previous" \ : "=&r" (oldval), "=&r" (ret) \ - : "b" (uaddr), "i" (-EFAULT), "1" (oparg) \ +: " b" (uaddr), " i" (-EFAULT), " r" (oparg) \ : "cr0", "memory") static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
@@ -47,19 +47,19 @@ static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr)switch (op) {case FUTEX_OP_SET : -__futex_atomic_op ("" , ret, oldval, uaddr, oparg); +__futex_atomic_op ("mr %1,%4\n" , ret, oldval, uaddr, oparg);break ;case FUTEX_OP_ADD : -__futex_atomic_op ("add %1,%0,%1\n" , ret, oldval, uaddr, oparg); +__futex_atomic_op ("add %1,%0,%4\n" , ret, oldval, uaddr, oparg);break ;case FUTEX_OP_OR : -__futex_atomic_op ("or %1,%0,%1\n" , ret, oldval, uaddr, oparg); +__futex_atomic_op ("or %1,%0,%4\n" , ret, oldval, uaddr, oparg);break ;case FUTEX_OP_ANDN : -__futex_atomic_op ("andc %1,%0,%1\n" , ret, oldval, uaddr, oparg); +__futex_atomic_op ("andc %1,%0,%4\n" , ret, oldval, uaddr, oparg);break ;case FUTEX_OP_XOR : -__futex_atomic_op ("xor %1,%0,%1\n" , ret, oldval, uaddr, oparg); +__futex_atomic_op ("xor %1,%0,%4\n" , ret, oldval, uaddr, oparg);break ;default : ret = -ENOSYS ;
arch/powerpc/include/asm/processor.h +19 -0
@@ -309,6 +309,25 @@ static inline void prefetchw(const void *x)#define HAVE_ARCH_PICK_MMAP_LAYOUT #endif +#ifdef CONFIG_PPC64 +static inline unsigned long get_clean_sp (struct pt_regs *regs,int is_32) +{ +unsigned long sp; + +if (is_32) + sp = regs->gpr[1 ] &0x0ffffffffUL ; +else + sp = regs->gpr[1 ]; + +return sp; +} +#else +static inline unsigned long get_clean_sp (struct pt_regs *regs,int is_32) +{ +return regs->gpr[1 ]; +} +#endif +#endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ #endif /* _ASM_POWERPC_PROCESSOR_H */
arch/powerpc/kernel/signal.c +2 -2
@@ -26,12 +26,12 @@ int show_unhandled_signals = 0;* Allocate space for the signal frame */ void __user *get_sigframe (struct k_sigaction *ka,struct pt_regs *regs, -size_t frame_size) +size_t frame_size,int is_32) {unsigned long oldsp, newsp;/* Default to using normal stack */ - oldsp = regs->gpr[1 ]; + oldsp =get_clean_sp (regs, is_32);/* Check for alt stack */ if ((ka->sa.sa_flags & SA_ONSTACK) &&
arch/powerpc/kernel/signal.h +1 -1
@@ -15,7 +15,7 @@extern void do_signal (struct pt_regs *regs,unsigned long thread_info_flags);extern void __user *get_sigframe (struct k_sigaction *ka,struct pt_regs *regs, -size_t frame_size); +size_t frame_size,int is_32);extern void restore_sigmask (sigset_t *set); extern int handle_signal32(unsigned long sig, struct k_sigaction *ka,
arch/powerpc/kernel/signal_32.c +2 -2
@@ -836,7 +836,7 @@ int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka,/* Set up Signal Frame */ /* Put a Real Time Context onto stack */ - rt_sf =get_sigframe (ka, regs,sizeof (*rt_sf)); + rt_sf =get_sigframe (ka, regs,sizeof (*rt_sf),1 ); addr = rt_sf;if (unlikely (rt_sf ==NULL )) goto badframe;
@@ -1182,7 +1182,7 @@ int handle_signal32(unsigned long sig, struct k_sigaction *ka,unsigned long newsp =0 ;/* Set up Signal Frame */ - frame =get_sigframe (ka, regs,sizeof (*frame)); + frame =get_sigframe (ka, regs,sizeof (*frame),1 );if (unlikely (frame ==NULL )) goto badframe; sc = (struct sigcontext __user *) &frame->sctx;
arch/powerpc/kernel/signal_64.c +1 -1
@@ -402,7 +402,7 @@ int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info,unsigned long newsp =0 ;long err =0 ; - frame =get_sigframe (ka, regs,sizeof (*frame)); + frame =get_sigframe (ka, regs,sizeof (*frame),0 );if (unlikely (frame ==NULL )) goto badframe;
arch/x86/boot/memory.c +4 -3
@@ -27,13 +27,14 @@ static int detect_memory_e820(void) do { size = sizeof(struct e820entry); - /* Important: %edx is clobbered by some BIOSes, - so it must be either used for the error output + /* Important: %edx and %esi are clobbered by some BIOSes, + so they must be either used for the error output or explicitly marked clobbered. */ asm("int $0x15; setc %0" : "=d" (err), "+b" (next), "=a" (id), "+c" (size), "=m" (*desc) - : "D" (desc), "d" (SMAP), "a" (0xe820)); + : "D" (desc), "d" (SMAP), "a" (0xe820) + : "esi"); /* BIOSes which terminate the chain with CF = 1 as opposed to %ebx = 0 don't always report the SMAP signature on
arch/x86/include/asm/kvm_host.h +7 -3
@@ -190,9 +190,11 @@ struct kvm_mmu_page {u64 *spt;/* hold the gfn of each spte inside spt */ gfn_t *gfns; -unsigned long slot_bitmap;/* One bit set per slot which has memory -* in this shadow page. -*/ +/* +* One bit set per slot which has memory +* in this shadow page. +*/ +DECLARE_BITMAP (slot_bitmap,KVM_MEMORY_SLOTS +KVM_PRIVATE_MEM_SLOTS );int multimapped;/* More than one parent_pte? */ int root_count;/* Currently serving as active root */ bool unsync;
@@ -607,6 +609,8 @@ void kvm_disable_tdp(void);int load_pdptrs (struct kvm_vcpu *vcpu,unsigned long cr3);int complete_pio (struct kvm_vcpu *vcpu); +struct kvm_memory_slot *gfn_to_memslot_unaliased (struct kvm *kvm,gfn_t gfn); +static inline struct kvm_mmu_page *page_header (hpa_t shadow_page) {struct page *page =pfn_to_page (shadow_page >>PAGE_SHIFT );
arch/x86/kernel/cpu/mtrr/generic.c +30 -21
85 lines not on this page · raw message
arch/x86/kvm/i8254.c +1 -1
@@ -207,7 +207,7 @@ static int __pit_timer_fn(struct kvm_kpit_state *ps)hrtimer_add_expires_ns (&pt->timer, pt->period); pt->scheduled =hrtimer_get_expires_ns (&pt->timer);if (pt->period) - ps->channels[0 ].count_load_time =hrtimer_get_expires (&pt->timer); + ps->channels[0 ].count_load_time =ktime_get ();return (pt->period ==0 ?0 :1 ); }
arch/x86/kvm/irq.c +0 -7
@@ -87,13 +87,6 @@ void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu) }EXPORT_SYMBOL_GPL (kvm_inject_pending_timer_irqs); -void kvm_timer_intr_post (struct kvm_vcpu *vcpu,int vec) -{ -kvm_apic_timer_intr_post (vcpu, vec); -/* TODO: PIT, RTC etc. */ -} -EXPORT_SYMBOL_GPL (kvm_timer_intr_post); -void __kvm_migrate_timers (struct kvm_vcpu *vcpu) {__kvm_migrate_apic_timer (vcpu);
arch/x86/kvm/irq.h +0 -1
@@ -84,7 +84,6 @@ static inline int irqchip_in_kernel(struct kvm *kvm)void kvm_pic_reset (struct kvm_kpic_state *s); -void kvm_timer_intr_post (struct kvm_vcpu *vcpu,int vec);void kvm_inject_pending_timer_irqs (struct kvm_vcpu *vcpu);void kvm_inject_apic_timer_irqs (struct kvm_vcpu *vcpu);void __kvm_migrate_apic_timer (struct kvm_vcpu *vcpu);
arch/x86/kvm/lapic.c +15 -51
97 lines not on this page · raw message
arch/x86/kvm/lapic.h +0 -2
@@ -12,7 +12,6 @@ struct kvm_lapic {atomic_t pending;s64 period;/* unit: ns */ u32 divide_count; -ktime_t last_update;struct hrtimer dev; } timer;struct kvm_vcpu *vcpu;
@@ -42,7 +41,6 @@ void kvm_set_apic_base(struct kvm_vcpu *vcpu, u64 data);void kvm_apic_post_state_restore (struct kvm_vcpu *vcpu);int kvm_lapic_enabled (struct kvm_vcpu *vcpu);int kvm_lapic_find_highest_irr (struct kvm_vcpu *vcpu); -void kvm_apic_timer_intr_post (struct kvm_vcpu *vcpu,int vec);void kvm_lapic_set_vapic_addr (struct kvm_vcpu *vcpu,gpa_t vapic_addr);void kvm_lapic_sync_from_vapic (struct kvm_vcpu *vcpu);
arch/x86/kvm/mmu.c +16 -8
@@ -384,7 +384,9 @@ static void account_shadowed(struct kvm *kvm, gfn_t gfn) {int *write_count; - write_count =slot_largepage_idx (gfn,gfn_to_memslot (kvm, gfn)); + gfn =unalias_gfn (kvm, gfn); + write_count =slot_largepage_idx (gfn, +gfn_to_memslot_unaliased (kvm, gfn)); *write_count +=1 ; }
@@ -392,16 +394,20 @@ static void unaccount_shadowed(struct kvm *kvm, gfn_t gfn) {int *write_count; - write_count =slot_largepage_idx (gfn,gfn_to_memslot (kvm, gfn)); + gfn =unalias_gfn (kvm, gfn); + write_count =slot_largepage_idx (gfn, +gfn_to_memslot_unaliased (kvm, gfn)); *write_count -=1 ;WARN_ON (*write_count <0 ); }static int has_wrprotected_page (struct kvm *kvm,gfn_t gfn) { -struct kvm_memory_slot *slot =gfn_to_memslot (kvm, gfn); +struct kvm_memory_slot *slot;int *largepage_idx; + gfn =unalias_gfn (kvm, gfn); + slot =gfn_to_memslot_unaliased (kvm, gfn);if (slot) { largepage_idx =slot_largepage_idx (gfn, slot);return *largepage_idx;
@@ -787,7 +793,7 @@ static struct kvm_mmu_page *kvm_mmu_alloc_page(struct kvm_vcpu *vcpu,set_page_private (virt_to_page (sp->spt), (unsigned long )sp);list_add (&sp->link, &vcpu->kvm->arch.active_mmu_pages);ASSERT (is_empty_shadow_page (sp->spt)); - sp->slot_bitmap =0 ; +bitmap_zero (sp->slot_bitmap,KVM_MEMORY_SLOTS +KVM_PRIVATE_MEM_SLOTS ); sp->multimapped =0 ; sp->parent_pte = parent_pte; --vcpu->kvm->arch.n_free_mmu_pages;
@@ -975,7 +981,7 @@ static int mmu_unsync_walk(struct kvm_mmu_page *sp,for_each_unsync_children (sp->unsync_child_bitmap, i) {u64 ent = sp->spt[i]; -if (is_shadow_present_pte (ent)) { +if (is_shadow_present_pte (ent) && !is_large_pte (ent)) {struct kvm_mmu_page *child; child =page_header (ent &PT64_BASE_ADDR_MASK );
@@ -1153,6 +1159,8 @@ static int walk_shadow(struct kvm_shadow_walk *walker,if (level ==PT32E_ROOT_LEVEL ) { shadow_addr = vcpu->arch.mmu.pae_root[(addr >>30 ) &3 ]; shadow_addr &=PT64_BASE_ADDR_MASK ; +if (!shadow_addr) +return 1 ; --level; }
@@ -1362,7 +1370,7 @@ static void page_header_update_slot(struct kvm *kvm, void *pte, gfn_t gfn)int slot =memslot_id (kvm,gfn_to_memslot (kvm, gfn));struct kvm_mmu_page *sp =page_header (__pa (pte)); -__set_bit (slot, &sp->slot_bitmap); +__set_bit (slot, sp->slot_bitmap); }static void mmu_convert_notrap (struct kvm_mmu_page *sp)
@@ -2451,7 +2459,7 @@ void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot)int i;u64 *pt; -if (!test_bit (slot, &sp->slot_bitmap)) +if (!test_bit (slot, sp->slot_bitmap))continue ; pt = sp->spt;
@@ -2860,8 +2868,8 @@ static void audit_write_protection(struct kvm_vcpu *vcpu)if (sp->role.metaphysical)continue ; - slot =gfn_to_memslot (vcpu->kvm, sp->gfn); gfn =unalias_gfn (vcpu->kvm, sp->gfn); + slot =gfn_to_memslot_unaliased (vcpu->kvm, sp->gfn); rmapp = &slot->rmap[gfn - slot->base_gfn];if (*rmapp) printk(KERN_ERR "%s: (%s) shadow page has writable"
arch/x86/kvm/paging_tmpl.h +6 -2
@@ -467,9 +467,13 @@ static int FNAME(shadow_invlpg_entry)(struct kvm_shadow_walk *_sw, u64 *sptep, int level) { -if (level ==PT_PAGE_TABLE_LEVEL ) { -if (is_shadow_present_pte (*sptep)) +if (level ==PT_PAGE_TABLE_LEVEL || + ((level ==PT_DIRECTORY_LEVEL ) &&is_large_pte (*sptep))) { +if (is_shadow_present_pte (*sptep)) {rmap_remove (vcpu->kvm, sptep); +if (is_large_pte (*sptep)) + --vcpu->kvm->stat.lpages; + }set_shadow_pte (sptep, shadow_trap_nonpresent_pte);return 1 ; }
arch/x86/kvm/svm.c +16 -1
@@ -772,6 +772,22 @@ static void svm_get_segment(struct kvm_vcpu *vcpu, var->l = (s->attrib >>SVM_SELECTOR_L_SHIFT ) &1 ; var->db = (s->attrib >>SVM_SELECTOR_DB_SHIFT ) &1 ; var->g = (s->attrib >>SVM_SELECTOR_G_SHIFT ) &1 ; + +/* +* SVM always stores 0 for the 'G' bit in the CS selector in +* the VMCB on a VMEXIT. This hurts cross-vendor migration: +* Intel's VMENTRY has a check on the 'G' bit. +*/ +if (seg ==VCPU_SREG_CS ) + var->g = s->limit >0xfffff ; + +/* +* Work around a bug where the busy flag in the tr selector +* isn't exposed +*/ +if (seg ==VCPU_SREG_TR ) + var->type |=0x2 ; + var->unusable = !var->present; }
@@ -1596,7 +1612,6 @@ static void svm_intr_assist(struct kvm_vcpu *vcpu)/* Okay, we can deliver the interrupt: grab it and update PIC state. */ intr_vector =kvm_cpu_get_interrupt (vcpu);svm_inject_irq (svm, intr_vector); -kvm_timer_intr_post (vcpu, intr_vector); out:update_cr8_intercept (vcpu); }
arch/x86/kvm/vmx.c +3 -4
@@ -897,6 +897,7 @@ static int vmx_get_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata) data =vmcs_readl (GUEST_SYSENTER_ESP );break ;default : +vmx_load_host_state (to_vmx (vcpu)); msr =find_msr_entry (to_vmx (vcpu), msr_index);if (msr) { data = msr->data;
@@ -2407,7 +2408,7 @@ static int vmx_set_tss_addr(struct kvm *kvm, unsigned int addr) {int ret;struct kvm_userspace_memory_region tss_mem = { - .slot =8 , + .slot =TSS_PRIVATE_MEMSLOT , .guest_phys_addr = addr, .memory_size =PAGE_SIZE *3 , .flags =0 ,
@@ -3171,10 +3172,8 @@ static void vmx_intr_assist(struct kvm_vcpu *vcpu)else enable_irq_window (vcpu); } -if (vcpu->arch.interrupt.pending) { +if (vcpu->arch.interrupt.pending)vmx_inject_irq (vcpu, vcpu->arch.interrupt.nr); -kvm_timer_intr_post (vcpu, vcpu->arch.interrupt.nr); - } }/*
arch/x86/kvm/vmx.h +3 -2
@@ -331,8 +331,9 @@ enum vmcs_field {#define AR_RESERVD_MASK 0xfffe0f00 -#define APIC_ACCESS_PAGE_PRIVATE_MEMSLOT 9 -#define IDENTITY_PAGETABLE_PRIVATE_MEMSLOT 10 +#define TSS_PRIVATE_MEMSLOT (KVM_MEMORY_SLOTS + 0) +#define APIC_ACCESS_PAGE_PRIVATE_MEMSLOT (KVM_MEMORY_SLOTS + 1) +#define IDENTITY_PAGETABLE_PRIVATE_MEMSLOT (KVM_MEMORY_SLOTS + 2)#define VMX_NR_VPIDS (1 << 16)#define VMX_VPID_EXTENT_SINGLE_CONTEXT 1
arch/x86/kvm/x86.c +10 -4
@@ -906,7 +906,6 @@ int kvm_dev_ioctl_check_extension(long ext)case KVM_CAP_USER_MEMORY :case KVM_CAP_SET_TSS_ADDR :case KVM_CAP_EXT_CPUID : -case KVM_CAP_CLOCKSOURCE :case KVM_CAP_PIT :case KVM_CAP_NOP_IO_DELAY :case KVM_CAP_MP_STATE :
@@ -931,6 +930,9 @@ int kvm_dev_ioctl_check_extension(long ext)case KVM_CAP_IOMMU : r =intel_iommu_found ();break ; +case KVM_CAP_CLOCKSOURCE : + r =boot_cpu_has (X86_FEATURE_CONSTANT_TSC ); +break ;default : r =0 ;break ;
@@ -1188,6 +1190,7 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,int t, times = entry->eax &0xff ; entry->flags |=KVM_CPUID_FLAG_STATEFUL_FUNC ; + entry->flags |=KVM_CPUID_FLAG_STATE_READ_NEXT ;for (t =1 ; t < times && *nent < maxnent; ++t) {do_cpuid_1_ent (&entry[t], function,0 ); entry[t].flags |=KVM_CPUID_FLAG_STATEFUL_FUNC ;
@@ -1218,7 +1221,7 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, entry->flags |=KVM_CPUID_FLAG_SIGNIFCANT_INDEX ;/* read more entries until level_type is zero */ for (i =1 ; *nent < maxnent; ++i) { - level_type = entry[i -1 ].ecx &0xff ; + level_type = entry[i -1 ].ecx &0xff00 ;if (!level_type)break ;do_cpuid_1_ent (&entry[i], function, i);
@@ -2729,7 +2732,7 @@ static int move_to_next_stateful_cpuid_entry(struct kvm_vcpu *vcpu, int i) e->flags &= ~KVM_CPUID_FLAG_STATE_READ_NEXT ;/* when no next entry is found, the current entry[i] is reselected */ -for (j = i +1 ; j == i; j = (j +1 ) % nent) { +for (j = i +1 ; ; j = (j +1 ) % nent) {struct kvm_cpuid_entry2 *ej = &vcpu->arch.cpuid_entries[j];if (ej->function == e->function) { ej->flags |=KVM_CPUID_FLAG_STATE_READ_NEXT ;
@@ -2973,7 +2976,7 @@ static int __vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)pr_debug ("vcpu %d received sipi with vector # %x\n" , vcpu->vcpu_id, vcpu->arch.sipi_vector);kvm_lapic_reset (vcpu); - r = kvm_x86_ops->vcpu_reset (vcpu); + r =kvm_arch_vcpu_reset (vcpu);if (r)return r; vcpu->arch.mp_state =KVM_MP_STATE_RUNNABLE ;
@@ -3925,6 +3928,9 @@ void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu)int kvm_arch_vcpu_reset (struct kvm_vcpu *vcpu) { + vcpu->arch.nmi_pending = false; + vcpu->arch.nmi_injected = false; +return kvm_x86_ops->vcpu_reset (vcpu); }
arch/x86/kvm/x86_emulate.c +1 -1
@@ -299,7 +299,7 @@ static u16 group_table[] = {static u16 group2_table[] = { [Group7*8 ] = - SrcNone | ModRM,0 ,0 ,0 , + SrcNone | ModRM,0 ,0 , SrcNone | ModRM, SrcNone | ModRM | DstMem | Mov,0 , SrcMem16 | ModRM | Mov,0 , };
arch/x86/pci/i386.c +3 -0
@@ -329,6 +329,9 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,return -EINVAL ; } flags = new_flags; + vma->vm_page_prot =__pgprot ( + (pgprot_val (vma->vm_page_prot) & ~_PAGE_CACHE_MASK) | + flags); } if (((vma->vm_pgoff < max_low_pfn_mapped) ||
block/genhd.c +8 -4
@@ -98,7 +98,7 @@ void disk_part_iter_init(struct disk_part_iter *piter, struct gendisk *disk,if (flags &DISK_PITER_REVERSE ) piter->idx = ptbl->len -1 ; -else if (flags &DISK_PITER_INCL_PART0 ) +else if (flags & (DISK_PITER_INCL_PART0 |DISK_PITER_INCL_EMPTY_PART0 )) piter->idx =0 ;else piter->idx =1 ;
@@ -134,7 +134,8 @@ struct hd_struct *disk_part_iter_next(struct disk_part_iter *piter)/* determine iteration parameters */ if (piter->flags &DISK_PITER_REVERSE ) { inc =-1 ; -if (piter->flags &DISK_PITER_INCL_PART0 ) +if (piter->flags & (DISK_PITER_INCL_PART0 | +DISK_PITER_INCL_EMPTY_PART0 )) end =-1 ;else end =0 ;
@@ -150,7 +151,10 @@ struct hd_struct *disk_part_iter_next(struct disk_part_iter *piter) part =rcu_dereference (ptbl->part[piter->idx]);if (!part)continue ; -if (!(piter->flags &DISK_PITER_INCL_EMPTY ) && !part->nr_sects) +if (!part->nr_sects && + !(piter->flags &DISK_PITER_INCL_EMPTY ) && + !(piter->flags &DISK_PITER_INCL_EMPTY_PART0 && + piter->idx ==0 ))continue ;get_device (part_to_dev (part));
@@ -980,7 +984,7 @@ static int diskstats_show(struct seq_file *seqf, void *v)"\n\n"); */ -disk_part_iter_init (&piter, gp,DISK_PITER_INCL_PART0 ); +disk_part_iter_init (&piter, gp,DISK_PITER_INCL_EMPTY_PART0 );while ((hd =disk_part_iter_next (&piter))) { cpu =part_stat_lock ();part_round_stats (cpu, hd);
drivers/acpi/dock.c +2 -1
@@ -1146,9 +1146,10 @@ static int __init dock_init(void) static void __exit dock_exit(void) {struct dock_station *dock_station; +struct dock_station *tmp;unregister_acpi_bus_notifier (&dock_acpi_notifier); -list_for_each_entry (dock_station, &dock_stations, sibiling) +list_for_each_entry_safe (dock_station, tmp, &dock_stations, sibiling)dock_remove (dock_station); }
drivers/ata/pata_hpt37x.c +2 -20
@@ -8,7 +8,7 @@* Copyright (C) 1999-2003 Andre Hedrick <[email protected]> * Portions Copyright (C) 2001 Sun Microsystems, Inc. * Portions Copyright (C) 2003 Red Hat Inc -* Portions Copyright (C) 2005-2007 MontaVista Software, Inc. +* Portions Copyright (C) 2005-2009 MontaVista Software, Inc. * * TODO * Look into engine reset on timeout errors. Should not be required.
@@ -24,7 +24,7 @@#include <linux/libata.h> #define DRV_NAME "pata_hpt37x" -#define DRV_VERSION "0.6.11" +#define DRV_VERSION "0.6.12"struct hpt_clock {u8 xfer_speed;
@@ -445,23 +445,6 @@ static void hpt370_set_dmamode(struct ata_port *ap, struct ata_device *adev) }/** -* hpt370_bmdma_start - DMA engine begin -* @qc: ATA command -* -* The 370 and 370A want us to reset the DMA engine each time we -* use it. The 372 and later are fine. -*/ - -static void hpt370_bmdma_start (struct ata_queued_cmd *qc) -{ -struct ata_port *ap = qc->ap; -struct pci_dev *pdev =to_pci_dev (ap->host->dev); -pci_write_config_byte (pdev,0x50 +4 * ap->port_no,0x37 ); -udelay (10 ); -ata_bmdma_start (qc); -} - -/** * hpt370_bmdma_end - DMA engine stop * @qc: ATA command *
@@ -598,7 +581,6 @@ static struct scsi_host_template hpt37x_sht = {static struct ata_port_operations hpt370_port_ops = { .inherits = &ata_bmdma_port_ops, - .bmdma_start = hpt370_bmdma_start, .bmdma_stop = hpt370_bmdma_stop, .mode_filter = hpt370_filter,
drivers/char/agp/generic.c +2 -2
@@ -1226,7 +1226,7 @@ int agp_generic_alloc_pages(struct agp_bridge_data *bridge, struct agp_memory *mint i, ret = -ENOMEM ;for (i =0 ; i < num_pages; i++) { - page =alloc_page (GFP_KERNEL |GFP_DMA32 ); + page =alloc_page (GFP_KERNEL |GFP_DMA32 | __GFP_ZERO);/* agp_free_memory() needs gart address */ if (page ==NULL ) goto out;
@@ -1257,7 +1257,7 @@ void *agp_generic_alloc_page(struct agp_bridge_data *bridge) {struct page * page; - page =alloc_page (GFP_KERNEL |GFP_DMA32 ); + page =alloc_page (GFP_KERNEL |GFP_DMA32 | __GFP_ZERO);if (page ==NULL )return NULL ;
drivers/char/raw.c +1 -0
@@ -90,6 +90,7 @@ out1:blkdev_put (bdev, filp->f_mode); out:mutex_unlock (&raw_mutex); +unlock_kernel ();return err; }
drivers/crypto/ixp4xx_crypto.c +63 -119
349 lines not on this page · raw message
drivers/ide/hpt366.c +3 -1
@@ -114,6 +114,8 @@* the register setting lists into the table indexed by the clock selected * - set the correct hwif->ultra_mask for each individual chip * - add Ultra and MW DMA mode filtering for the HPT37[24] based SATA cards +* - stop resetting HPT370's state machine before each DMA transfer as that has +* caused more harm than good * Sergei Shtylyov, <[email protected]> or <[email protected]> */
@@ -133,7 +135,7 @@#define DRV_NAME "hpt366"/* various tuning parameters */ -#define HPT_RESET_STATE_ENGINE +#undef HPT_RESET_STATE_ENGINE#undef HPT_DELAY_INTERRUPT#define HPT_SERIALIZE_IO 0
drivers/input/gameport/gameport.c +6 -8
@@ -50,9 +50,8 @@ static LIST_HEAD(gameport_list);static struct bus_type gameport_bus; -static void gameport_add_driver (struct gameport_driver *drv);static void gameport_add_port (struct gameport *gameport); -static void gameport_destroy_port (struct gameport *gameport); +static void gameport_attach_driver (struct gameport_driver *drv);static void gameport_reconnect_port (struct gameport *gameport);static void gameport_disconnect_port (struct gameport *gameport);
@@ -230,7 +229,6 @@ static void gameport_find_driver(struct gameport *gameport)enum gameport_event_type {GAMEPORT_REGISTER_PORT , -GAMEPORT_REGISTER_DRIVER ,GAMEPORT_ATTACH_DRIVER , };
@@ -374,8 +372,8 @@ static void gameport_handle_event(void)gameport_add_port (event->object);break ; -case GAMEPORT_REGISTER_DRIVER : -gameport_add_driver (event->object); +case GAMEPORT_ATTACH_DRIVER : +gameport_attach_driver (event->object);break ;default :
@@ -707,14 +705,14 @@ static int gameport_driver_remove(struct device *dev)return 0 ; } -static void gameport_add_driver (struct gameport_driver *drv) +static void gameport_attach_driver (struct gameport_driver *drv) {int error; - error =driver_register (&drv->driver); + error =driver_attach (&drv->driver);if (error)printk (KERN_ERR -"gameport: driver_register() failed for %s, error: %d\n" , +"gameport: driver_attach() failed for %s, error: %d\n" , drv->driver.name, error); }
drivers/isdn/gigaset/bas-gigaset.c +13 -3
@@ -46,6 +46,9 @@ MODULE_PARM_DESC(cidmode, "Call-ID mode");/* length limit according to Siemens 3070usb-protokoll.doc ch. 2.1 */ #define IF_WRITEBUF 264 +/* interrupt pipe message size according to ibid. ch. 2.2 */ +#define IP_MSGSIZE 3 +/* Values for the Gigaset 307x */ #define USB_GIGA_VENDOR_ID 0x0681#define USB_3070_PRODUCT_ID 0x0001
@@ -110,7 +113,7 @@ struct bas_cardstate {unsigned char *rcvbuf;/* AT reply receive buffer */ struct urb *urb_int_in;/* URB for interrupt pipe */ -unsigned char int_in_buf[3 ]; +unsigned char *int_in_buf;spinlock_t lock;/* locks all following */ int basstate;/* bitmap (BS_*) */
@@ -657,7 +660,7 @@ static void read_int_callback(struct urb *urb) }/* drop incomplete packets even if the missing bytes wouldn't matter */ -if (unlikely (urb->actual_length <3 )) { +if (unlikely (urb->actual_length <IP_MSGSIZE )) {dev_warn (cs->dev,"incomplete interrupt packet (%d bytes)\n" , urb->actual_length); goto resubmit;
@@ -2127,6 +2130,7 @@ static void gigaset_reinitbcshw(struct bc_state *bcs)static void gigaset_freecshw (struct cardstate *cs) {/* timers, URBs and rcvbuf are disposed of in disconnect */ +kfree (cs->hw.bas->int_in_buf);kfree (cs->hw.bas); cs->hw.bas =NULL ; }
@@ -2232,6 +2236,12 @@ static int gigaset_probe(struct usb_interface *interface, } hostif = interface->cur_altsetting; } + ucs->int_in_buf =kmalloc (IP_MSGSIZE ,GFP_KERNEL ); +if (!ucs->int_in_buf) { +kfree (ucs); +pr_err ("out of memory\n" ); +return 0 ; + }/* Reject application specific interfaces */
@@ -2290,7 +2300,7 @@ static int gigaset_probe(struct usb_interface *interface,usb_fill_int_urb (ucs->urb_int_in, udev,usb_rcvintpipe (udev, (endpoint->bEndpointAddress) &0x0f ), - ucs->int_in_buf,3 , read_int_callback, cs, + ucs->int_in_buf,IP_MSGSIZE , read_int_callback, cs, endpoint->bInterval);if ((rc =usb_submit_urb (ucs->urb_int_in,GFP_KERNEL )) !=0 ) { dev_err(cs->dev, "could not submit interrupt URB: %s\n",
drivers/md/md.c +24 -3
@@ -3694,6 +3694,10 @@ static int do_md_run(mddev_t * mddev)return err; }if (mddev->pers->sync_request) { +/* wait for any previously scheduled redundancy groups +* to be removed +*/ +flush_scheduled_work ();if (sysfs_create_group (&mddev->kobj, &md_redundancy_group)) printk(KERN_WARNING "md: cannot register extra attributes for %s\n",
@@ -3824,6 +3828,14 @@ static void restore_bitmap_write_access(struct file *file)spin_unlock (&inode->i_lock); } + +static void sysfs_delayed_rm (struct work_struct *ws) +{ +mddev_t *mddev =container_of (ws, mddev_t, del_work); + +sysfs_remove_group (&mddev->kobj, &md_redundancy_group); +} +/* mode: * 0 - completely stop and dis-assemble array * 1 - switch to readonly
@@ -3833,6 +3845,7 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open) {int err =0 ;struct gendisk *disk = mddev->gendisk; +int remove_group =0 ;if (atomic_read (&mddev->openers) > is_open) {printk ("md: %s still in use.\n" ,mdname (mddev));
@@ -3868,10 +3881,9 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open) mddev->queue->merge_bvec_fn =NULL ; mddev->queue->unplug_fn =NULL ; mddev->queue->backing_dev_info.congested_fn =NULL ; -if (mddev->pers->sync_request) -sysfs_remove_group (&mddev->kobj, &md_redundancy_group); -module_put (mddev->pers->owner); +if (mddev->pers->sync_request) + remove_group =1 ; mddev->pers =NULL ;/* tell userspace to handle 'inactive' */ sysfs_notify_dirent (mddev->sysfs_state);
@@ -3919,6 +3931,15 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)/* make sure all md_delayed_delete calls have finished */ flush_scheduled_work (); +/* we can't wait for group removal under mddev_lock as +* threads holding the group 'active' need to acquire +* mddev_lock before going inactive +*/ +if (remove_group) { +INIT_WORK (&mddev->del_work, sysfs_delayed_rm); +schedule_work (&mddev->del_work); + } +export_array (mddev); mddev->array_sectors =0 ;
drivers/misc/thinkpad_acpi.c +19 -22
93 lines not on this page · raw message
drivers/net/b44.c +1 -1
@@ -750,7 +750,7 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked) dest_idx * sizeof(dest_desc), DMA_BIDIRECTIONAL); -ssb_dma_sync_single_for_device (bp->sdev,le32_to_cpu (src_desc->addr), +ssb_dma_sync_single_for_device (bp->sdev, dest_map->mapping,RX_PKT_BUF_SZ ,DMA_FROM_DEVICE ); }
drivers/net/bonding/bond_main.c +20 -5
@@ -3536,11 +3536,26 @@ static int bond_slave_netdev_event(unsigned long event, struct net_device *slave }break ;case NETDEV_CHANGE : -/* -* TODO: is this what we get if somebody -* sets up a hierarchical bond, then rmmod's -* one of the slave bonding devices? -*/ +if (bond->params.mode ==BOND_MODE_8023AD ||bond_is_lb (bond)) { +struct slave *slave; + + slave =bond_get_slave_by_dev (bond, slave_dev); +if (slave) { +u16 old_speed = slave->speed; +u16 old_duplex = slave->duplex; + +bond_update_speed_duplex (slave); + +if (bond_is_lb (bond)) +break ; + +if (old_speed != slave->speed) +bond_3ad_adapter_speed_changed (slave); +if (old_duplex != slave->duplex) +bond_3ad_adapter_duplex_changed (slave); + } + } +break ;case NETDEV_DOWN :/*
drivers/net/bonding/bonding.h +6 -0
@@ -248,6 +248,12 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)return (struct bonding *)slave->dev->master->priv; } +static inline bool bond_is_lb (const struct bonding *bond) +{ +return bond->params.mode ==BOND_MODE_TLB + || bond->params.mode ==BOND_MODE_ALB ; +} +#define BOND_FOM_NONE 0#define BOND_FOM_ACTIVE 1#define BOND_FOM_FOLLOW 2
drivers/net/r8169.c +3 -2
@@ -2026,8 +2026,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)if (!tp->pcie_cap &&netif_msg_probe (tp))dev_info (&pdev->dev,"no PCI Express capability\n" ); -/* Unneeded ? Don't mess with Mrs. Murphy. */ -rtl8169_irq_mask_and_ack (ioaddr); +RTL_W16 (IntrMask,0x0000 );/* Soft reset the chip. */ RTL_W8 (ChipCmd, CmdReset);
@@ -2039,6 +2038,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)msleep_interruptible (1 ); } +RTL_W16 (IntrStatus,0xffff ); +/* Identify chip attached to board */ rtl8169_get_mac_version (tp, ioaddr);
drivers/net/wireless/ath9k/ath9k.h +2 -2
@@ -590,8 +590,8 @@ struct ath9k_country_entry {u8 iso[3 ]; }; -#define REG_WRITE (_ah, _reg, _val) iowrite32(_val, _ah->ah_sh + _reg) -#define REG_READ (_ah, _reg) ioread32(_ah->ah_sh + _reg) +#define REG_WRITE (_ah, _reg, _val) ath9k_iowrite32((_ah), (_reg), (_val)) +#define REG_READ (_ah, _reg) ath9k_ioread32((_ah), (_reg))#define SM (_v, _f) (((_v) << _f##_S) & _f)#define MS (_v, _f) (((_v) & _f) >> _f##_S)
drivers/net/wireless/ath9k/core.c +1 -0
@@ -1089,6 +1089,7 @@ int ath_init(u16 devid, struct ath_softc *sc) sc->sc_cachelsz = csz <<2 ;/* convert to bytes */ spin_lock_init (&sc->sc_resetlock); +spin_lock_init (&sc->sc_serial_rw); ah =ath9k_hw_attach (devid, sc, sc->mem, &status);if (ah ==NULL ) {
drivers/net/wireless/ath9k/core.h +33 -0
@@ -1040,6 +1040,7 @@ struct ath_softc {spinlock_t sc_rxbuflock;spinlock_t sc_txbuflock;spinlock_t sc_resetlock; +spinlock_t sc_serial_rw;spinlock_t node_lock;/* LEDs */
@@ -1081,4 +1082,36 @@ void ath_get_currentCountry(struct ath_softc *sc, struct ath9k_country_entry *ctry);u64 ath_extend_tsf (struct ath_softc *sc,u32 rstamp); +/* +* Read and write, they both share the same lock. We do this to serialize +* reads and writes on Atheros 802.11n PCI devices only. This is required +* as the FIFO on these devices can only accept sanely 2 requests. After +* that the device goes bananas. Serializing the reads/writes prevents this +* from happening. +*/ + +static inline void ath9k_iowrite32 (struct ath_hal *ah,u32 reg_offset,u32 val) +{ +if (ah->ah_config.serialize_regmode ==SER_REG_MODE_ON ) { +unsigned long flags; +spin_lock_irqsave (&ah->ah_sc->sc_serial_rw, flags); +iowrite32 (val, ah->ah_sc->mem + reg_offset); +spin_unlock_irqrestore (&ah->ah_sc->sc_serial_rw, flags); + }else +iowrite32 (val, ah->ah_sc->mem + reg_offset); +} + +static inline unsigned int ath9k_ioread32 (struct ath_hal *ah,u32 reg_offset) +{ +u32 val; +if (ah->ah_config.serialize_regmode ==SER_REG_MODE_ON ) { +unsigned long flags; +spin_lock_irqsave (&ah->ah_sc->sc_serial_rw, flags); + val =ioread32 (ah->ah_sc->mem + reg_offset); +spin_unlock_irqrestore (&ah->ah_sc->sc_serial_rw, flags); + }else + val =ioread32 (ah->ah_sc->mem + reg_offset); +return val; +} +#endif /* CORE_H */
drivers/net/wireless/ath9k/hw.c +21 -1
@@ -346,6 +346,25 @@ static void ath9k_hw_set_defaults(struct ath_hal *ah) } ah->ah_config.intr_mitigation =0 ; + +/* +* We need this for PCI devices only (Cardbus, PCI, miniPCI) +* _and_ if on non-uniprocessor systems (Multiprocessor/HT). +* This means we use it for all AR5416 devices, and the few +* minor PCI AR9280 devices out there. +* +* Serialization is required because these devices do not handle +* well the case of two concurrent reads/writes due to the latency +* involved. During one read/write another read/write can be issued +* on another CPU while the previous read/write may still be working +* on our hardware, if we hit this case the hardware poops in a loop. +* We prevent this by serializing reads and writes. +* +* This issue is not present on PCI-Express devices or pre-AR5416 +* devices (legacy, 802.11abg). +*/ +if (num_possible_cpus () >1 ) + ah->ah_config.serialize_regmode =SER_REG_MODE_AUTO ; } static void ath9k_hw_override_ini(struct ath_hal *ah,
@@ -3292,7 +3311,8 @@ static struct ath_hal *ath9k_hw_do_attach(u16 devid, }if (ah->ah_config.serialize_regmode ==SER_REG_MODE_AUTO ) { -if (ah->ah_macVersion ==AR_SREV_VERSION_5416_PCI ) { +if (ah->ah_macVersion ==AR_SREV_VERSION_5416_PCI || + (AR_SREV_9280 (ah) && !ah->ah_isPciExpress)) { ah->ah_config.serialize_regmode =SER_REG_MODE_ON ; }else {
drivers/net/wireless/b43/xmit.c +1 -1
@@ -51,7 +51,7 @@ static int b43_plcp_get_bitrate_idx_cck(struct b43_plcp_hdr6 *plcp) }/* Extract the bitrate index out of an OFDM PLCP header. */ -static u8 b43_plcp_get_bitrate_idx_ofdm (struct b43_plcp_hdr6 *plcp,bool aphy) +static int b43_plcp_get_bitrate_idx_ofdm (struct b43_plcp_hdr6 *plcp,bool aphy) {int base = aphy ?0 :4 ;
drivers/scsi/libiscsi.c +5 -4
@@ -1862,12 +1862,14 @@ iscsi_pool_init(struct iscsi_pool *q, int max, void ***items, int item_size) num_arrays++; q->pool =kzalloc (num_arrays * max *sizeof (void *),GFP_KERNEL );if (q->pool ==NULL ) - goto enomem; +return -ENOMEM ; q->queue =kfifo_init ((void *)q->pool, max *sizeof (void *),GFP_KERNEL ,NULL ); -if (q->queue ==ERR_PTR (-ENOMEM )) +if (IS_ERR (q->queue)) { + q->queue =NULL ; goto enomem; + }for (i =0 ; i < max; i++) { q->pool[i] =kzalloc (item_size,GFP_KERNEL );
@@ -1897,8 +1899,7 @@ void iscsi_pool_free(struct iscsi_pool *q)for (i =0 ; i < q->max; i++)kfree (q->pool[i]); -if (q->pool) -kfree (q->pool); +kfree (q->pool);kfree (q->queue); }EXPORT_SYMBOL_GPL (iscsi_pool_free);
drivers/scsi/sg.c +224 -242
771 lines not on this page · raw message
drivers/spi/spi.c +14 -8
@@ -660,7 +660,7 @@ int spi_write_then_read(struct spi_device *spi,int status;struct spi_message message; -struct spi_transfer x; +struct spi_transfer x[2 ];u8 *local_buf;/* Use preallocated DMA-safe buffer. We can't avoid copying here,
@@ -671,9 +671,15 @@ int spi_write_then_read(struct spi_device *spi,return -EINVAL ;spi_message_init (&message); -memset (&x,0 ,sizeof x); - x.len = n_tx + n_rx; -spi_message_add_tail (&x, &message); +memset (x,0 ,sizeof x); +if (n_tx) { + x[0 ].len = n_tx; +spi_message_add_tail (&x[0 ], &message); + } +if (n_rx) { + x[1 ].len = n_rx; +spi_message_add_tail (&x[1 ], &message); + }/* ... unless someone else is using the pre-allocated buffer */ if (!mutex_trylock (&lock)) {
@@ -684,15 +690,15 @@ int spi_write_then_read(struct spi_device *spi, local_buf = buf;memcpy (local_buf, txbuf, n_tx); - x.tx_buf = local_buf; - x.rx_buf = local_buf; + x[0 ].tx_buf = local_buf; + x[1 ].rx_buf = local_buf + n_tx;/* do the i/o */ status =spi_sync (spi, &message);if (status ==0 ) -memcpy (rxbuf, x.rx_buf + n_tx, n_rx); +memcpy (rxbuf, x[1 ].rx_buf, n_rx); -if (x.tx_buf == buf) +if (x[0 ].tx_buf == buf)mutex_unlock (&lock);else kfree (local_buf);
drivers/usb/class/cdc-wdm.c +1 -1
@@ -652,7 +652,7 @@ next_desc: iface = &intf->altsetting[0 ]; ep = &iface->endpoint[0 ].desc; -if (!usb_endpoint_is_int_in (ep)) { +if (!ep || !usb_endpoint_is_int_in (ep)) { rv = -EINVAL ; goto err; }
drivers/usb/core/message.c +2 -1
@@ -1637,7 +1637,8 @@ free_interfaces: }kfree (new_interfaces); -if (cp->string ==NULL ) +if (cp->string ==NULL && + !(dev->quirks &USB_QUIRK_CONFIG_INTF_STRINGS )) cp->string =usb_cache_string (dev, cp->desc.iConfiguration);/* Now that all the interfaces are set up, register them
drivers/usb/core/quirks.c +4 -0
@@ -54,6 +54,10 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x0638, 0x0a13), .driver_info = USB_QUIRK_STRING_FETCH_255 }, + /* Saitek Cyborg Gold Joystick */ + { USB_DEVICE(0x06a3, 0x0006), .driver_info = + USB_QUIRK_CONFIG_INTF_STRINGS }, + /* M-Systems Flash Disk Pioneers */ { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
drivers/usb/core/sysfs.c +3 -1
@@ -13,6 +13,7 @@#include <linux/kernel.h> #include <linux/string.h> #include <linux/usb.h> +#include <linux/usb/quirks.h> #include "usb.h" /* Active configuration fields */
@@ -847,7 +848,8 @@ int usb_create_sysfs_intf_files(struct usb_interface *intf)* and missing in others. Hence its attribute cannot be created * before the uevent is broadcast. */ -if (alt->string ==NULL ) +if (alt->string ==NULL && + !(udev->quirks &USB_QUIRK_CONFIG_INTF_STRINGS )) alt->string =usb_cache_string (udev, alt->desc.iInterface);if (alt->string) retval =device_create_file (&intf->dev, &dev_attr_interface);
drivers/usb/gadget/f_rndis.c +1 -1
@@ -437,7 +437,7 @@ invalid:DBG (cdev,"rndis req%02x.%02x v%04x i%04x l%d\n" , ctrl->bRequestType, ctrl->bRequest, w_value, w_index, w_length); - req->zero =0 ; + req->zero = (value < w_length); req->length = value; value =usb_ep_queue (cdev->gadget->ep0, req,GFP_ATOMIC );if (value <0 )
drivers/usb/gadget/u_ether.c +1 -7
@@ -175,12 +175,6 @@ static void eth_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *p)strlcpy (p->bus_info,dev_name (&dev->gadget->dev),sizeof p->bus_info); } -static u32 eth_get_link (struct net_device *net) -{ -struct eth_dev *dev =netdev_priv (net); -return dev->gadget->speed !=USB_SPEED_UNKNOWN ; -} -/* REVISIT can also support: * - WOL (by tracking suspends and issuing remote wakeup) * - msglevel (implies updated messaging)
@@ -189,7 +183,7 @@ static u32 eth_get_link(struct net_device *net)static struct ethtool_ops ops = { .get_drvinfo = eth_get_drvinfo, - .get_link = eth_get_link + .get_link = ethtool_op_get_link, };static void defer_kevent (struct eth_dev *dev,int flag)
drivers/usb/host/ehci-q.c +32 -0
@@ -333,12 +333,40 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) token =hc32_to_cpu (ehci, qtd->hw_token);/* always clean up qtds the hc de-activated */ + retry_xacterr:if ((token &QTD_STS_ACTIVE ) ==0 ) {/* on STALL, error, and short reads this urb must * complete and all its qtds must be recycled. */ if ((token &QTD_STS_HALT ) !=0 ) { + +/* retry transaction errors until we +* reach the software xacterr limit +*/ +if ((token &QTD_STS_XACT ) && +QTD_CERR (token) ==0 && + --qh->xacterrs >0 && + !urb->unlinked) { +ehci_dbg (ehci, +"detected XactErr len %d/%d retry %d\n" , + qtd->length -QTD_LENGTH (token), qtd->length, +QH_XACTERR_MAX - qh->xacterrs); + +/* reset the token in the qtd and the +* qh overlay (which still contains +* the qtd) so that we pick up from +* where we left off +*/ + token &= ~QTD_STS_HALT ; + token |=QTD_STS_ACTIVE | + (EHCI_TUNE_CERR <<10 ); + qtd->hw_token =cpu_to_hc32 (ehci, + token); +wmb (); + qh->hw_token =cpu_to_hc32 (ehci, token); + goto retry_xacterr; + } stopped =1 ;/* magic dummy for some short reads; qh won't advance.
@@ -421,6 +449,9 @@ halt:/* remove qtd; it's recycled after possible urb completion */ list_del (&qtd->qtd_list); last = qtd; + +/* reinit the xacterr counter for the next qtd */ + qh->xacterrs =QH_XACTERR_MAX ; }/* last urb's completion might still need calling */
@@ -862,6 +893,7 @@ static void qh_link_async (struct ehci_hcd *ehci, struct ehci_qh *qh) head->qh_next.qh = qh; head->hw_next = dma; + qh->xacterrs =QH_XACTERR_MAX ; qh->qh_state =QH_STATE_LINKED ;/* qtd completions reported later by interrupt */ }
drivers/usb/host/ehci.h +3 -0
@@ -366,6 +366,9 @@ struct ehci_qh {#define QH_STATE_UNLINK_WAIT 4/* LINKED and on reclaim q */ #define QH_STATE_COMPLETING 5/* don't touch token.HALT */ +u8 xacterrs;/* XactErr retry counter */ +#define QH_XACTERR_MAX 32/* XactErr retry limit */ +/* periodic schedule info */ u8 usecs;/* intr bandwidth */ u8 gap_uf;/* uframes split/csplit gap */
drivers/usb/serial/ftdi_sio.c +1 -0
@@ -665,6 +665,7 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(DE_VID, WHT_PID) }, { USB_DEVICE(ADI_VID, ADI_GNICE_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(JETI_VID, JETI_SPC1201_PID) }, { }, /* Optional parameter entry */ { } /* Terminating entry */ };
drivers/usb/serial/ftdi_sio.h +7 -0
@@ -901,6 +901,13 @@#define ADI_GNICE_PID 0xF000/* +* JETI SPECTROMETER SPECBOS 1201 +* http://www.jeti.com/products/sys/scb/scb1201.php +*/ +#define JETI_VID 0x0c6c +#define JETI_SPC1201_PID 0x04b2 + +/* * BmRequestType: 1100 0000b * bRequest: FTDI_E2_READ * wValue: 0
drivers/usb/storage/cypress_atacb.c +7 -8
@@ -133,19 +133,18 @@ void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us)/* build the command for * reading the ATA registers */ -scsi_eh_prep_cmnd (srb, &ses,NULL ,0 ,0 ); - srb->sdb.length =sizeof (regs); -sg_init_one (&ses.sense_sgl, regs, srb->sdb.length); - srb->sdb.table.sgl = &ses.sense_sgl; - srb->sc_data_direction =DMA_FROM_DEVICE ; - srb->sdb.table.nents =1 ; +scsi_eh_prep_cmnd (srb, &ses,NULL ,0 ,sizeof (regs)); +/* we use the same command as before, but we set * the read taskfile bit, for not executing atacb command, * but reading register selected in srb->cmnd[4] */ + srb->cmd_len =16 ; + srb->cmnd = ses.cmnd; srb->cmnd[2 ] =1 ;usb_stor_transparent_scsi_command (srb, us); +memcpy (regs, srb->sense_buffer,sizeof (regs)); tmp_result = srb->result;scsi_eh_restore_cmnd (srb, &ses);/* we fail to get registers, report invalid command */
@@ -162,8 +161,8 @@ void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us)/* XXX we should generate sk, asc, ascq from status and error * regs -* (see 11.1 Error translation ATA device error to SCSI error map) -* and ata_to_sense_error from libata. +* (see 11.1 Error translation ATA device error to SCSI error +* map, and ata_to_sense_error from libata.) */ /* Sense data is current and format is descriptor. */
drivers/usb/storage/scsiglue.c +6 -0
@@ -135,6 +135,12 @@ static int slave_configure(struct scsi_device *sdev)if (sdev->request_queue->max_sectors > max_sectors)blk_queue_max_sectors (sdev->request_queue, max_sectors); + }else if (sdev->type ==TYPE_TAPE ) { +/* Tapes need much higher max_sector limits, so just +* raise it to the maximum possible (4 GB / 512) and +* let the queue segment size sort out the real limit. +*/ +blk_queue_max_sectors (sdev->request_queue,0x7FFFFF ); }/* We can't put these settings in slave_alloc() because that gets
drivers/usb/storage/unusual_devs.h +4 -2
@@ -1164,12 +1164,14 @@ UNUSUAL_DEV( 0x07c4, 0xa400, 0x0000, 0xffff, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), -/* Reported by Rauch Wolke <[email protected]> */ +/* Reported by Rauch Wolke <[email protected]> +* and augmented by binbin <[email protected]> (Bugzilla #12882) +*/ UNUSUAL_DEV (0x07c4 ,0xa4a5 ,0x0000 ,0xffff ,"Simple Tech/Datafab" ,"CF+SM Reader" ,US_SC_DEVICE ,US_PR_DEVICE ,NULL , - US_FL_IGNORE_RESIDUE ), + US_FL_IGNORE_RESIDUE | US_FL_MAX_SECTORS_64 ),/* Casio QV 2x00/3x00/4000/8000 digital still cameras are not conformant * to the USB storage specification in two ways:
fs/anon_inodes.c +6 -1
@@ -79,9 +79,12 @@ int anon_inode_getfd(const char *name, const struct file_operations *fops,if (IS_ERR (anon_inode_inode))return -ENODEV ; +if (fops->owner && !try_module_get (fops->owner)) +return -ENOENT ; + error =get_unused_fd_flags (flags);if (error <0 ) -return error; + goto err_module; fd = error;/*
@@ -128,6 +131,8 @@ err_dput:dput (dentry); err_put_unused_fd:put_unused_fd (fd); +err_module: +module_put (fops->owner);return error; }EXPORT_SYMBOL_GPL (anon_inode_getfd);
fs/buffer.c +1 -1
@@ -3042,7 +3042,7 @@ int sync_dirty_buffer(struct buffer_head *bh)if (test_clear_buffer_dirty (bh)) {get_bh (bh); bh->b_end_io = end_buffer_write_sync; - ret =submit_bh (WRITE_SYNC , bh); + ret =submit_bh (WRITE , bh);wait_on_buffer (bh);if (buffer_eopnotsupp (bh)) {clear_buffer_eopnotsupp (bh);
fs/cifs/CHANGES +3 -0
@@ -1,4 +1,7 @@ Fix oops in cifs_dfs_ref.c when prefixpath is not reachable when using DFS. +Fix "redzone overwritten" bug in cifs_put_tcon (CIFSTcon may allocate too +little memory for the "nativeFileSystem" field returned by the server +during mount). Version 1.55 ------------
fs/cifs/cifssmb.c +4 -2
@@ -2350,8 +2350,10 @@ winCreateHardLinkRetry: PATH_MAX, nls_codepage, remap); name_len++;/* trailing null */ name_len *=2 ; - pSMB->OldFileName[name_len] =0 ;/* pad */ - pSMB->OldFileName[name_len +1 ] =0x04 ; + +/* protocol specifies ASCII buffer format (0x04) for unicode */ + pSMB->OldFileName[name_len] =0x04 ; + pSMB->OldFileName[name_len +1 ] =0x00 ;/* pad */ name_len2 =cifsConvertToUCS ((__le16 *)&pSMB->OldFileName[name_len +2 ], toName,PATH_MAX , nls_codepage, remap);
fs/cifs/connect.c +1 -1
@@ -3565,7 +3565,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, BCC(smb_buffer_response)) {kfree (tcon->nativeFileSystem); tcon->nativeFileSystem = -kzalloc (length +2 ,GFP_KERNEL ); +kzalloc (2 *(length +1 ),GFP_KERNEL );if (tcon->nativeFileSystem) cifs_strfromUCS_le( tcon->nativeFileSystem,
fs/compat.c +11 -1
@@ -1386,12 +1386,17 @@ int compat_do_execve(char * filename, {struct linux_binprm *bprm;struct file *file; +struct files_struct *displaced;int retval; + retval =unshare_files (&displaced); +if (retval) + goto out_ret; + retval = -ENOMEM ; bprm =kzalloc (sizeof (*bprm),GFP_KERNEL );if (!bprm) - goto out_ret; + goto out_files; file =open_exec (filename); retval =PTR_ERR (file);
@@ -1443,6 +1448,8 @@ int compat_do_execve(char * filename,security_bprm_free (bprm);acct_update_integrals (current);free_bprm (bprm); +if (displaced) +put_files_struct (displaced);return retval; }
@@ -1463,6 +1470,9 @@ out_file: out_kfree:free_bprm (bprm); +out_files: +if (displaced) +reset_files_struct (displaced); out_ret:return retval; }
fs/dquot.c +1 -1
@@ -724,7 +724,7 @@ static void add_dquot_ref(struct super_block *sb, int type)continue ;if (!dqinit_needed (inode, type))continue ; -if (inode->i_state & (I_FREEING |I_WILL_FREE )) +if (inode->i_state & (I_FREEING |I_CLEAR |I_WILL_FREE ))continue ;__iget (inode);
fs/drop_caches.c +1 -1
@@ -18,7 +18,7 @@ static void drop_pagecache_sb(struct super_block *sb)spin_lock (&inode_lock);list_for_each_entry (inode, &sb->s_inodes, i_sb_list) { -if (inode->i_state & (I_FREEING |I_WILL_FREE )) +if (inode->i_state & (I_FREEING |I_CLEAR |I_WILL_FREE ))continue ;if (inode->i_mapping->nrpages ==0 )continue ;
fs/exec.c +1 -3
@@ -1084,9 +1084,7 @@ static int unsafe_exec(struct task_struct *p) {int unsafe =tracehook_unsafe_exec (p); -if (atomic_read (&p->fs->count) >1 || -atomic_read (&p->files->count) >1 || -atomic_read (&p->sighand->count) >1 ) +if (atomic_read (&p->fs->count) >1 ) unsafe |=LSM_UNSAFE_SHARE ;return unsafe;
fs/fs-writeback.c +2 -1
@@ -538,7 +538,8 @@ void generic_sync_sb_inodes(struct super_block *sb,list_for_each_entry (inode, &sb->s_inodes, i_sb_list) {struct address_space *mapping; -if (inode->i_state & (I_FREEING |I_WILL_FREE |I_NEW )) +if (inode->i_state & + (I_FREEING |I_CLEAR |I_WILL_FREE |I_NEW ))continue ; mapping = inode->i_mapping;if (mapping->nrpages ==0 )
fs/hugetlbfs/inode.c +1 -2
@@ -26,7 +26,6 @@#include <linux/pagevec.h> #include <linux/parser.h> #include <linux/mman.h> -#include <linux/quotaops.h> #include <linux/slab.h> #include <linux/dnotify.h> #include <linux/statfs.h>
@@ -838,7 +837,7 @@ hugetlbfs_parse_options(char *options, struct hugetlbfs_config *pconfig) bad_val:printk (KERN_ERR "hugetlbfs: Bad value '%s' for mount option '%s'\n" , args[0 ].from, p); -return 1 ; +return -EINVAL ; } static int
fs/ocfs2/file.c +6 -2
@@ -1943,7 +1943,7 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe, out->f_path.dentry->d_name.len, out->f_path.dentry->d_name.name); -inode_double_lock (inode, pipe->inode); +mutex_lock_nested (&inode->i_mutex,I_MUTEX_PARENT ); ret =ocfs2_rw_lock (inode,1 );if (ret <0 ) {
@@ -1958,12 +1958,16 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe, goto out_unlock; } +if (pipe->inode) +mutex_lock_nested (&pipe->inode->i_mutex,I_MUTEX_CHILD ); ret =generic_file_splice_write_nolock (pipe, out, ppos, len, flags); +if (pipe->inode) +mutex_unlock (&pipe->inode->i_mutex); out_unlock:ocfs2_rw_unlock (inode,1 ); out: -inode_double_unlock (inode, pipe->inode); +mutex_unlock (&inode->i_mutex);mlog_exit (ret);return ret;
fs/proc/base.c +16 -34
102 lines not on this page · raw message
fs/splice.c +20 -5
@@ -735,10 +735,19 @@ ssize_t splice_from_pipe(struct pipe_inode_info *pipe, struct file *out,* ->write_end. Most of the time, these expect i_mutex to * be held. Since this may result in an ABBA deadlock with * pipe->inode, we have to order lock acquiry here. +* +* Outer lock must be inode->i_mutex, as pipe_wait() will +* release and reacquire pipe->inode->i_mutex, AND inode must +* never be a pipe. */ -inode_double_lock (inode, pipe->inode); +WARN_ON (S_ISFIFO (inode->i_mode)); +mutex_lock_nested (&inode->i_mutex,I_MUTEX_PARENT ); +if (pipe->inode) +mutex_lock_nested (&pipe->inode->i_mutex,I_MUTEX_CHILD ); ret =__splice_from_pipe (pipe, &sd, actor); -inode_double_unlock (inode, pipe->inode); +if (pipe->inode) +mutex_unlock (&pipe->inode->i_mutex); +mutex_unlock (&inode->i_mutex);return ret; }
@@ -829,11 +838,17 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out, };ssize_t ret; -inode_double_lock (inode, pipe->inode); +WARN_ON (S_ISFIFO (inode->i_mode)); +mutex_lock_nested (&inode->i_mutex,I_MUTEX_PARENT ); ret =file_remove_suid (out); -if (likely (!ret)) +if (likely (!ret)) { +if (pipe->inode) +mutex_lock_nested (&pipe->inode->i_mutex,I_MUTEX_CHILD ); ret =__splice_from_pipe (pipe, &sd, pipe_to_file); -inode_double_unlock (inode, pipe->inode); +if (pipe->inode) +mutex_unlock (&pipe->inode->i_mutex); + } +mutex_unlock (&inode->i_mutex);if (ret >0 ) {unsigned long nr_pages;
include/linux/capability.h +19 -4
@@ -366,7 +366,21 @@ typedef struct kernel_cap_struct {#define CAP_FOR_EACH_U32 (__capi) \ for (__capi = 0; __capi < _KERNEL_CAPABILITY_U32S; ++__capi) +/* +* CAP_FS_MASK and CAP_NFSD_MASKS: +* +* The fs mask is all the privileges that fsuid==0 historically meant. +* At one time in the past, that included CAP_MKNOD and CAP_LINUX_IMMUTABLE. +* +* It has never meant setting security.* and trusted.* xattrs. +* +* We could also define fsmask as follows: +* 1. CAP_FS_MASK is the privilege to bypass all fs-related DAC permissions +* 2. The security.* and trusted.* xattrs are fs-related MAC permissions +*/ +# define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \ + | CAP_TO_MASK(CAP_MKNOD) \ | CAP_TO_MASK(CAP_DAC_OVERRIDE) \ | CAP_TO_MASK(CAP_DAC_READ_SEARCH) \ | CAP_TO_MASK(CAP_FOWNER) \
@@ -381,11 +395,12 @@ typedef struct kernel_cap_struct {# define CAP_EMPTY_SET ((kernel_cap_t){{ 0, 0 }})# define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }})# define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }}) -# define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } }) +# define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \ + | CAP_TO_MASK(CAP_LINUX_IMMUTABLE), \ + CAP_FS_MASK_B1 } })# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \ - | CAP_TO_MASK(CAP_SYS_RESOURCE) \ - | CAP_TO_MASK(CAP_MKNOD), \ - CAP_FS_MASK_B1 } }) + | CAP_TO_MASK(CAP_SYS_RESOURCE), \ + CAP_FS_MASK_B1 } })#endif /* _KERNEL_CAPABILITY_U32S != 2 */
include/linux/genhd.h +1 -0
@@ -213,6 +213,7 @@ static inline void disk_put_part(struct hd_struct *part)#define DISK_PITER_REVERSE (1 << 0)/* iterate in the reverse direction */ #define DISK_PITER_INCL_EMPTY (1 << 1)/* include 0-sized parts */ #define DISK_PITER_INCL_PART0 (1 << 2)/* include partition 0 */ +#define DISK_PITER_INCL_EMPTY_PART0 (1 << 3)/* include empty partition 0 */ struct disk_part_iter {struct gendisk *disk;
include/linux/kvm.h +2 -0
@@ -387,6 +387,8 @@ struct kvm_trace_rec {#define KVM_CAP_DEVICE_ASSIGNMENT 17#endif #define KVM_CAP_IOMMU 18 +/* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ +#define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21/* * ioctls for VM fds
include/linux/pagemap.h +8 -4
@@ -18,9 +18,14 @@* Bits in mapping->flags. The lower __GFP_BITS_SHIFT bits are the page * allocation mode flags. */ -#define AS_EIO (__GFP_BITS_SHIFT + 0)/* IO error on async write */ -#define AS_ENOSPC (__GFP_BITS_SHIFT + 1)/* ENOSPC on async write */ -#define AS_MM_ALL_LOCKS (__GFP_BITS_SHIFT + 2)/* under mm_take_all_locks() */ +enum mapping_flags { +AS_EIO = __GFP_BITS_SHIFT +0 ,/* IO error on async write */ +AS_ENOSPC = __GFP_BITS_SHIFT +1 ,/* ENOSPC on async write */ +AS_MM_ALL_LOCKS = __GFP_BITS_SHIFT +2 ,/* under mm_take_all_locks() */ +#ifdef CONFIG_UNEVICTABLE_LRU +AS_UNEVICTABLE = __GFP_BITS_SHIFT +3 ,/* e.g., ramdisk, SHM_LOCK */ +#endif +};static inline void mapping_set_error (struct address_space *mapping,int error) {
@@ -33,7 +38,6 @@ static inline void mapping_set_error(struct address_space *mapping, int error) }#ifdef CONFIG_UNEVICTABLE_LRU -#define AS_UNEVICTABLE (__GFP_BITS_SHIFT + 2)/* e.g., ramdisk, SHM_LOCK */ static inline void mapping_set_unevictable (struct address_space *mapping) {
include/linux/pci_regs.h +1 -1
@@ -234,7 +234,7 @@#define PCI_PM_CAP_PME_SHIFT 11/* Start of the PME Mask in PMC */ #define PCI_PM_CTRL 4/* PM control and status register */ #define PCI_PM_CTRL_STATE_MASK 0x0003/* Current power state (D0 to D3) */ -#define PCI_PM_CTRL_NO_SOFT_RESET 0x0004/* No reset for D3hot->D0 */ +#define PCI_PM_CTRL_NO_SOFT_RESET 0x0008/* No reset for D3hot->D0 */ #define PCI_PM_CTRL_PME_ENABLE 0x0100/* PME pin enable */ #define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00/* Data select (??) */ #define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000/* Data scale (??) */
include/linux/raid/md_k.h +2 -0
@@ -245,6 +245,8 @@ struct mddev_s* file in sysfs. */ +struct work_struct del_work;/* used for delayed sysfs removal */ +spinlock_t write_lock;wait_queue_head_t sb_wait;/* for waiting on superblock updates */ atomic_t pending_writes;/* number of active superblock writes */
include/linux/sched.h +2 -1
@@ -201,7 +201,8 @@ extern unsigned long long time_sync_thresh;#define task_is_stopped_or_traced (task) \ ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0)#define task_contributes_to_load (task) \ - ((task->state & TASK_UNINTERRUPTIBLE) != 0) + ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \ + (task->flags & PF_FROZEN) == 0)#define __set_task_state (tsk, state_value) \ do { (tsk)->state = (state_value); } while (0)
include/linux/usb/quirks.h +3 -0
@@ -16,4 +16,7 @@/* device can't handle Set-Interface requests */ #define USB_QUIRK_NO_SET_INTF 0x00000004 +/* device can't handle its Configuration or Interface strings */ +#define USB_QUIRK_CONFIG_INTF_STRINGS 0x00000008 +#endif /* __LINUX_USB_QUIRKS_H */
kernel/exit.c +1 -2
@@ -942,8 +942,7 @@ static void exit_notify(struct task_struct *tsk, int group_dead)*/ if (tsk->exit_signal !=SIGCHLD && !task_detached (tsk) && (tsk->parent_exec_id != tsk->real_parent->self_exec_id || - tsk->self_exec_id != tsk->parent_exec_id) && - !capable (CAP_KILL )) + tsk->self_exec_id != tsk->parent_exec_id)) tsk->exit_signal =SIGCHLD ; signal =tracehook_notify_death (tsk, &cookie, group_dead);
kernel/kprobes.c +1 -3
@@ -901,10 +901,8 @@ static int __kprobes pre_handler_kretprobe(struct kprobe *p, ri->rp = rp; ri->task = current; -if (rp->entry_handler && rp->entry_handler (ri, regs)) { -spin_unlock_irqrestore (&rp->lock, flags); +if (rp->entry_handler && rp->entry_handler (ri, regs))return 0 ; - }
Lines of this file are not shown. View the raw message.
kernel/sched.c +57 -8
65 lines not on this page · raw message
virt/kvm/kvm_main.c +33 -8
41 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Quoted 10 lines · Greg KH
I'm announcing the release of the 2.6.28.10 kernel.
It contains a wide range of bugfixes, and all users of the 2.6.28 kernel series are strongly encouraged to upgrade. Especially due to the CVE issues that are fixed here.
NOTE, this is the LAST update of the 2.6.28 kernel series, so all users are very strongly encouraged to upgrade to the 2.6.29 series at this point in time!
Hi,
Is there a policy about the end-of-life of kernel releases? 2.6.27 is at .21 while
.10 is the last update for 2.6.28.
Thanks,
Ozan Caglayan
http://www.pardus.org.tr/eng
Quoted 11 lines · Ozan Çağlayan
Quoted 10 lines · Greg KH
I'm announcing the release of the 2.6.28.10 kernel.
It contains a wide range of bugfixes, and all users of the 2.6.28 kernel series are strongly encouraged to upgrade. Especially due to the CVE issues that are fixed here.
NOTE, this is the LAST update of the 2.6.28 kernel series, so all users are very strongly encouraged to upgrade to the 2.6.29 series at this point in time!
Quoted 5 lines
Hi,
Is there a policy about the end-of-life of kernel releases? 2.6.27 is at .21 while
.10 is the last update for 2.6.28.
"Policy"? heh, no :)
It has been repeated many times that the 2.6.27 tree is going to be maintained for a long time. That is why I am still doing .27 releases, and will be for quite a while.
The other -stable branches are moving just like they always have been, nothing is new there.
Hope this helps,
greg k-h
Quoted 11 lines · Greg KH
"Policy"? heh, no :)
It has been repeated many times that the 2.6.27 tree is going to be maintained for a long time. That is why I am still doing .27 releases, and will be for quite a while.
The other -stable branches are moving just like they always have been, nothing is new there.
Hope this helps,
Yep it helped, thanks :)
Re: Linux 2.6.28.10 (ocfs2 build failure)
In reply to Greg KHQuoted 9 lines · Greg KH
I'm announcing the release of the 2.6.28.10 kernel.
It contains a wide range of bugfixes, and all users of the 2.6.28 kernel series are strongly encouraged to upgrade. Especially due to the CVE issues that are fixed here.
NOTE, this is the LAST update of the 2.6.28 kernel series, so all users are very strongly encouraged to upgrade to the 2.6.29 series at this point in time!
Sad. It shouldn't end with build errors,
logs/ca-ostest292/kernel.make.log.i386.~2:fs/ocfs2/journal.h:451: error: too many arguments
to function 'jbd2_journal_begin_ordered_truncate'
logs/ca-ostest292/kernel.make.log.i386.~2:make[2]: *** [fs/ocfs2/alloc.o] Error 1 logs/ca-ostest292/kernel.make.log.i386.~2:fs/ocfs2/journal.h:451: error: too many arguments
to function 'jbd2_journal_begin_ordered_truncate'
logs/ca-ostest292/kernel.make.log.i386.~2:make[2]: *** [fs/ocfs2/aops.o] Error 1 logs/ca-ostest292/kernel.make.log.i386.~2:fs/ocfs2/journal.h:451: error: too many arguments
to function 'jbd2_journal_begin_ordered_truncate'
logs/ca-ostest292/kernel.make.log.i386.~2:make[2]: *** [fs/ocfs2/buffer_head_io.o] Error 1 logs/ca-ostest292/kernel.make.log.i386.~2:fs/ocfs2/journal.h:451: error: too many arguments
to function 'jbd2_journal_begin_ordered_truncate'
logs/ca-ostest292/kernel.make.log.i386.~2:make[2]: *** [fs/ocfs2/dir.o] Error 1 [truncated]
Signature · 1 line
~Randy
Re: Linux 2.6.28.10 (ocfs2 build failure)
Quoted 14 lines · Randy Dunlap
Quoted 9 lines · Greg KH
I'm announcing the release of the 2.6.28.10 kernel.
It contains a wide range of bugfixes, and all users of the 2.6.28 kernel series are strongly encouraged to upgrade. Especially due to the CVE issues that are fixed here.
NOTE, this is the LAST update of the 2.6.28 kernel series, so all users are very strongly encouraged to upgrade to the 2.6.29 series at this point in time!
Sad. It shouldn't end with build errors,
Quoted 13 lines
logs/ca-ostest292/kernel.make.log.i386.~2:fs/ocfs2/journal.h:451: error: too many arguments
to function 'jbd2_journal_begin_ordered_truncate'
logs/ca-ostest292/kernel.make.log.i386.~2:make[2]: *** [fs/ocfs2/alloc.o] Error 1 logs/ca-ostest292/kernel.make.log.i386.~2:fs/ocfs2/journal.h:451: error: too many arguments
to function 'jbd2_journal_begin_ordered_truncate'
logs/ca-ostest292/kernel.make.log.i386.~2:make[2]: *** [fs/ocfs2/aops.o] Error 1 logs/ca-ostest292/kernel.make.log.i386.~2:fs/ocfs2/journal.h:451: error: too many arguments
to function 'jbd2_journal_begin_ordered_truncate'
logs/ca-ostest292/kernel.make.log.i386.~2:make[2]: *** [fs/ocfs2/buffer_head_io.o] Error 1 logs/ca-ostest292/kernel.make.log.i386.~2:fs/ocfs2/journal.h:451: error: too many arguments
to function 'jbd2_journal_begin_ordered_truncate'
logs/ca-ostest292/kernel.make.log.i386.~2:make[2]: *** [fs/ocfs2/dir.o] Error 1 [truncated]
No one ever sent in a patch to fix this :(
Also, it sounded like the config you are building isn't even used by people, hence no one was willing to fix it...
thanks,
greg k-h