Linux 2.6.26.3
Subsystems (30)
We (the -stable team) are announcing the release of the 2.6.26.3 kernel.
It contains lots of bugfixes, all over the map. Any users of the 2.6.26 kernel series should upgrade to this version. For details on the fixes, see the changelog entries and the diffstat below.
I'll also be replying to this message with a copy of the patch between 2.6.26.2 and 2.6.26.3
The updated 2.6.26.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.26.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.26.y.git;a=summarythanks,
greg k-h
-------------
Makefile | 2 arch/ia64/kvm/kvm-ia64.c | 5 arch/sparc64/kernel/irq.c | 52 +++++++ arch/sparc64/kernel/kstack.h | 60 ++++++++ arch/sparc64/kernel/process.c | 32 ++-- arch/sparc64/kernel/signal.c | 6 arch/sparc64/kernel/stacktrace.c | 11 - arch/sparc64/kernel/traps.c | 7 arch/sparc64/lib/mcount.S | 39 +++++ arch/sparc64/mm/init.c | 11 + arch/sparc64/mm/ultra.S | 7 arch/x86/boot/boot.h | 8 + arch/x86/boot/cpucheck.c | 8 - arch/x86/boot/main.c | 4 arch/x86/kernel/cpu/mtrr/generic.c | 2 arch/x86/kvm/mmu.c | 1 arch/x86/kvm/svm.c | 7 arch/x86/kvm/vmx.c | 2 arch/x86/kvm/x86.c | 109 ++++++--------- arch/x86/pci/k8-bus_64.c | 4 block/scsi_ioctl.c | 2 drivers/char/hw_random/via-rng.c | 8 + drivers/crypto/padlock-aes.c | 28 +++ drivers/crypto/padlock-sha.c | 9 + drivers/i2c/Kconfig | 14 + drivers/i2c/algos/Kconfig | 11 + drivers/i2c/i2c-core.c | 4 drivers/ide/ide-cd.c | 18 +- drivers/ide/pci/cs5520.c | 1 drivers/ide/pci/it821x.c | 6 drivers/misc/acer-wmi.c | 19 ++ drivers/net/r8169.c | 6 drivers/net/wireless/rtl8187.h | 4 drivers/net/wireless/rtl8187_dev.c | 3 drivers/pci/quirks.c | 7 drivers/scsi/hptiop.c | 7 drivers/scsi/qla2xxx/qla_attr.c | 43 ++++-- drivers/scsi/qla2xxx/qla_def.h | 1 drivers/scsi/qla2xxx/qla_gbl.h | 2 drivers/scsi/qla2xxx/qla_init.c | 16 -- drivers/scsi/qla2xxx/qla_os.c | 55 +++++-- drivers/scsi/scsi_transport_spi.c | 8 - drivers/scsi/ses.c | 18 +- drivers/usb/core/message.c | 2 drivers/usb/serial/ftdi_sio.c | 5 drivers/usb/serial/ftdi_sio.h | 6 drivers/usb/serial/pl2303.c | 1 drivers/usb/serial/pl2303.h | 4 drivers/usb/serial/usb-serial.c | 7 drivers/usb/storage/scsiglue.c | 25 ++- drivers/usb/storage/transport.c | 17 ++ drivers/usb/storage/unusual_devs.h | 18 ++ drivers/video/arkfb.c | 18 +- drivers/video/aty/radeon_accel.c | 12 + drivers/video/matrox/matroxfb_maven.c | 2 drivers/video/s3fb.c | 18 +- drivers/video/vt8623fb.c | 20 +- fs/cifs/asn1.c | 2 fs/cifs/cifs_spnego.c | 18 +- fs/cifs/cifsfs.c | 2 fs/cifs/inode.c | 1 include/asm-sparc64/futex.h | 2 include/asm-sparc64/irq.h | 4 include/asm-sparc64/ptrace.h | 8 - include/asm-x86/i387.h | 32 ++++ include/asm-x86/spinlock.h | 4 include/linux/usb/serial.h | 3 include/video/radeon.h | 9 - kernel/posix-timers.c | 19 +- kernel/relay.c | 12 + kernel/signal.c | 1 lib/random32.c | 48 +++--- mm/memory.c | 16 +- mm/mlock.c | 2 net/dccp/proto.c | 5 net/ipv4/ipvs/ip_vs_est.c | 7 net/ipv4/syncookies.c | 1 net/ipv6/ip6_output.c | 4 net/ipv6/syncookies.c | 1 sound/soc/fsl/fsl_dma.c | 242 ++++++++++++++++++---------------- sound/soc/fsl/fsl_ssi.c | 74 ++++++++-- 81 files changed, 940 insertions(+), 399 deletions(-)
Alan Stern (5):
USB: fix interface unregistration logic
usb-storage: unusual_devs entries for iRiver T10 and Datafab CF+SM reader
usb-serial: don't release unregistered minors
usb-storage: revert DMA-alignment change for Wireless USB
usb-storage: automatically recognize bad residues
Andre Schenk (1):
USB: ftdi_sio: Add USB Product Id for ELV HS485
Andrew Vasquez (1):
qla2xxx: Set an rport's dev_loss_tmo value in a consistent manner.
Arnaldo Carvalho de Melo (1):
dccp: change L/R must have at least one byte in the dccpsf_val field
Avi Kivity (1):
KVM: Avoid instruction emulation when event delivery is pending
Bartlomiej Zolnierkiewicz (1):
cs5520: add enablebits checking
Carlos Corbacho (1):
acer-wmi: Fix wireless and bluetooth on early AMW0 v2 laptops
Dave Jones (1):
USB: usb-storage: quirk around v1.11 firmware on Nikon D4
David Miller (2):
radeonfb: fix accel engine hangs
radeon: misc corrections
David S. Miller (7):
sparc64: Fix global reg snapshotting on self-cpu.
sparc64: Do not clobber %g7 in setcontext() trap.
sparc64: Fix end-of-stack checking in save_stack_trace().
sparc64: Fix recursion in stack overflow detection handling.
sparc64: Make global reg dumping even more useful.
sparc64: Implement IRQ stacks.
sparc64: Handle stack trace attempts before irqstacks are setup.
Dean Hildebrand (1):
PCI: Limit VPD length for Broadcom 5708S
Dimitri Gorokhovik (1):
ide: it821x in pass-through mode segfaults in 2.6.26-stable
Florian Westphal (1):
syncookies: Make sure ECN is disabled
Frederik Kriewitz (1):
USB: ftdi_sio: add support for Luminance Stellaris Evaluation/Development Kits
Greg Kroah-Hartman (1):
Linux 2.6.26.3
Hans Verkuil (1):
i2c: Fix NULL pointer dereference in i2c_new_probed_device
HighPoint Linux Team (1):
SCSI: hptiop: add more PCI device IDs
James Bottomley (2):
SCSI: ses: fix VPD inquiry overrun
SCSI: scsi_transport_spi: fix oops in revalidate
Jan Beulich (2):
CIFS: Fix compiler warning on 64-bit
x86: fix spin_is_contended()
Jean Delvare (2):
matrox maven: fix a broken error path
i2c: Let users select algorithm drivers manually again
Jeff Layton (1):
CIFS: properly account for new user= field in SPNEGO upcall string allocation
Joerg Roedel (1):
x86: fix setup code crashes on my old 486 box
Julia Lawall (1):
KVM: ia64: Fix irq disabling leak in error handling code
KOSAKI Motohiro (1):
mlock() fix return values
Larry Finger (1):
rtl8187: Fix lockups due to concurrent access to config routine
Marcelo Tosatti (3):
KVM: task switch: segment base is linear address
KVM: task switch: use seg regs provided by subarch instead of reading from GDT
KVM: task switch: translate guest segment limit to virt-extension byte granular field
Marcus Sundberg (1):
r8169: avoid thrashing PCI conf space above RTL_GIGA_MAC_VER_06
Mikael Pettersson (1):
sparc64: FUTEX_OP_ANDN fix
Oleg Nesterov (2):
posix-timers: do_schedule_next_timer: fix the setting of ->si_overrun
posix-timers: fix posix_timer_event() vs dequeue_signal() race
Ondrej Zajicek (1):
vt8623fb: fix kernel oops
Petr Tesarik (1):
ide-cd: fix endianity for the error message in cdrom_read_capacity
Seokmann Ju (1):
qla2xxx: Add dev_loss_tmo_callbk/terminate_rport_io callback support.
Stephen Hemminger (1):
random32: seeding improvement
Steve French (2):
CIFS: mount of IPC$ breaks with iget patch
CIFS: if get root inode fails during mount, cleanup tree connection
Suresh Siddha (1):
crypto: padlock - fix VIA PadLock instruction usage with irq_ts_save/restore()
Sven Wegener (1):
ipvs: Fix possible deadlock in estimator code
Tim Wright (1):
SCSI: block: Fix miscalculation of sg_io timeout in CDROM_SEND_PACKET handler.
Timur Tabi (2):
ALSA: asoc: restrict sample rate and size in Freescale MPC8610 sound drivers
ALSA: ASoC: fix SNDCTL_DSP_SYNC support in Freescale 8610 sound drivers
Tollef Fog Heen (1):
USB: pl2023: Remove USB id (4348:5523) handled by ch341
Tom Zanussi (1):
relay: fix "full buffer with exactly full last subbuffer" accounting problem
Wei Yongjun (1):
ipv6: Fix ip6_xmit to send fragments if ipfragok is true
Yinghai Lu (1):
x86: amd opteron TOM2 mask val fix
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 26 -EXTRAVERSION = .2 +EXTRAVERSION = .3 NAME = Rotary Wombat # *DOCUMENTATION*
arch/ia64/kvm/kvm-ia64.c +3 -2
@@ -125,9 +125,9 @@ void kvm_arch_hardware_enable(void *garbage) PAGE_KERNEL));local_irq_save (saved_psr); slot =ia64_itr_entry (0x3 ,KVM_VMM_BASE , pte,KVM_VMM_SHIFT ); +local_irq_restore (saved_psr);if (slot <0 )return ; -local_irq_restore (saved_psr);spin_lock (&vp_lock); status = ia64_pal_vp_init_env(kvm_vsa_base ?
@@ -160,9 +160,9 @@ void kvm_arch_hardware_disable(void *garbage)local_irq_save (saved_psr); slot =ia64_itr_entry (0x3 ,KVM_VMM_BASE , pte,KVM_VMM_SHIFT ); +local_irq_restore (saved_psr);if (slot <0 )return ; -local_irq_restore (saved_psr); status =ia64_pal_vp_exit_env (host_iva);if (status)
@@ -1258,6 +1258,7 @@ static int vti_vcpu_setup(struct kvm_vcpu *vcpu, int id) uninit:kvm_vcpu_uninit (vcpu); fail: +local_irq_restore (psr);return r; }
arch/sparc64/kernel/irq.c +52 -0
78 lines not on this page · raw message
arch/sparc64/kernel/kstack.h new file +60 -0
60 lines not on this page · raw message
arch/sparc64/kernel/process.c +21 -11
@@ -55,6 +55,8 @@/* #define VERBOSE_SHOWREGS */ +#include "kstack.h" +static void sparc64_yield (int cpu) {if (tlb_type != hypervisor)
@@ -316,14 +318,22 @@ static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7 ];if (regs->tstate &TSTATE_PRIV ) { +struct thread_info *tp =current_thread_info ();struct reg_window *rw; rw = (struct reg_window *) (regs->u_regs[UREG_FP ] +STACK_BIAS ); - global_reg_snapshot[this_cpu].i7 = rw->ins[6 ]; - }else +if (kstack_valid (tp, (unsigned long ) rw)) { + global_reg_snapshot[this_cpu].i7 = rw->ins[7 ]; + rw = (struct reg_window *) + (rw->ins[6 ] +STACK_BIAS ); +if (kstack_valid (tp, (unsigned long ) rw)) + global_reg_snapshot[this_cpu].rpc = rw->ins[7 ]; + } + }else { global_reg_snapshot[this_cpu].i7 =0 ; - + global_reg_snapshot[this_cpu].rpc =0 ; + } global_reg_snapshot[this_cpu].thread = tp; }
@@ -384,12 +394,14 @@ static void sysrq_handle_globreg(int key, struct tty_struct *tty)sprint_symbol (buffer, gp->o7);printk ("O7[%s] " , buffer);sprint_symbol (buffer, gp->i7); - printk("I7[%s]\n", buffer); +printk ("I7[%s] " , buffer); +sprint_symbol (buffer, gp->rpc); + printk("RPC[%s]\n", buffer); } else#endif { -printk (" TPC[%lx] O7[%lx] I7[%lx]\n" , - gp->tpc, gp->o7, gp->i7); +printk (" TPC[%lx] O7[%lx] I7[%lx] RPC[%lx]\n" , + gp->tpc, gp->o7, gp->i7, gp->rpc); } }
@@ -876,7 +888,7 @@ out:unsigned long get_wchan (struct task_struct *task) {unsigned long pc, fp, bias =0 ; -unsigned long thread_info_base; +struct thread_info *tp;struct reg_window *rw;unsigned long ret =0 ;int count =0 ;
@@ -885,14 +897,12 @@ unsigned long get_wchan(struct task_struct *task) task->state == TASK_RUNNING) goto out; - thread_info_base = (unsigned long )task_stack_page (task); + tp =task_thread_info (task); bias =STACK_BIAS ; fp =task_thread_info (task)->ksp + bias; do { - /* Bogus frame pointer? */ - if (fp < (thread_info_base + sizeof(struct thread_info)) || - fp >= (thread_info_base + THREAD_SIZE)) + if (!kstack_valid(tp, fp)) break; rw = (struct reg_window *) fp; pc = rw->ins[7];
arch/sparc64/kernel/signal.c +4 -2
@@ -2,7 +2,7 @@* arch/sparc64/kernel/signal.c * * Copyright (C) 1991, 1992 Linus Torvalds -* Copyright (C) 1995 David S. Miller ([email protected]) +* Copyright (C) 1995, 2008 David S. Miller ([email protected]) * Copyright (C) 1996 Miguel de Icaza ([email protected]) * Copyright (C) 1997 Eddie C. Dost ([email protected]) * Copyright (C) 1997,1998 Jakub Jelinek ([email protected])
@@ -89,7 +89,9 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs) err |=__get_user (regs->u_regs[UREG_G4 ], (&(*grp)[MC_G4 ])); err |=__get_user (regs->u_regs[UREG_G5 ], (&(*grp)[MC_G5 ])); err |=__get_user (regs->u_regs[UREG_G6 ], (&(*grp)[MC_G6 ])); - err |=__get_user (regs->u_regs[UREG_G7 ], (&(*grp)[MC_G7 ])); + +/* Skip %g7 as that's the thread register in userspace. */ + err |=__get_user (regs->u_regs[UREG_I0 ], (&(*grp)[MC_O0 ])); err |=__get_user (regs->u_regs[UREG_I1 ], (&(*grp)[MC_O1 ])); err |=__get_user (regs->u_regs[UREG_I2 ], (&(*grp)[MC_O2 ]));
arch/sparc64/kernel/stacktrace.c +5 -6
@@ -4,10 +4,12 @@#include <asm/ptrace.h> #include <asm/stacktrace.h> +#include "kstack.h" +void save_stack_trace (struct stack_trace *trace) { -unsigned long ksp, fp, thread_base;struct thread_info *tp =task_thread_info (current); +unsigned long ksp, fp;stack_trace_flush ();
@@ -17,21 +19,18 @@ void save_stack_trace(struct stack_trace *trace) ); fp = ksp +STACK_BIAS ; - thread_base = (unsigned long ) tp; do { struct sparc_stackf *sf; struct pt_regs *regs; unsigned long pc; - /* Bogus frame pointer? */ - if (fp < (thread_base + sizeof(struct thread_info)) || - fp >= (thread_base + THREAD_SIZE)) + if (!kstack_valid(tp, fp)) break; sf = (struct sparc_stackf *) fp; regs = (struct pt_regs *) (sf + 1); - if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { + if (kstack_is_trap_frame(tp, regs)) { if (!(regs->tstate & TSTATE_PRIV)) break; pc = regs->tpc;
arch/sparc64/kernel/traps.c +3 -4
@@ -43,6 +43,7 @@#include <asm/prom.h> #include "entry.h" +#include "kstack.h" /* When an irrecoverable trap occurs at tl > 0, the trap entry * code logs the trap state registers at every level in the trap
@@ -2120,14 +2121,12 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)struct pt_regs *regs;unsigned long pc; -/* Bogus frame pointer? */ -if (fp < (thread_base +sizeof (struct thread_info )) || - fp >= (thread_base +THREAD_SIZE )) +if (!kstack_valid (tp, fp))break ; sf = (struct sparc_stackf *) fp; regs = (struct pt_regs *) (sf +1 ); -if ((regs->magic & ~0x1ff ) ==PT_REGS_MAGIC ) { +if (kstack_is_trap_frame (tp, regs)) {if (!(regs->tstate &TSTATE_PRIV ))break ; pc = regs->tpc;
arch/sparc64/lib/mcount.S +36 -3
@@ -45,12 +45,45 @@ _mcount: sub %g3, STACK_BIAS, %g3 cmp %sp, %g3 bg,pt %xcc, 1f - sethi %hi(panicstring), %g3 + nop + lduh [%g6 + TI_CPU], %g1 + sethi %hi(hardirq_stack), %g3 + or %g3, %lo(hardirq_stack), %g3 + sllx %g1, 3, %g1 + ldx [%g3 + %g1], %g7 + sub %g7, STACK_BIAS, %g7 + cmp %sp, %g7 + bleu,pt %xcc, 2f + sethi %hi(THREAD_SIZE), %g3 + add %g7, %g3, %g7 + cmp %sp, %g7 + blu,pn %xcc, 1f +2: sethi %hi(softirq_stack), %g3 + or %g3, %lo(softirq_stack), %g3 + ldx [%g3 + %g1], %g7 + cmp %sp, %g7 + bleu,pt %xcc, 2f + sethi %hi(THREAD_SIZE), %g3 + add %g7, %g3, %g7 + cmp %sp, %g7 + blu,pn %xcc, 1f + nop + /* If we are already on ovstack, don't hop onto it + * again, we are already trying to output the stack overflow + * message. + */ sethi %hi(ovstack), %g7 ! cant move to panic stack fast enough or %g7, %lo(ovstack), %g7 - add %g7, OVSTACKSIZE, %g7 + add %g7, OVSTACKSIZE, %g3 + sub %g3, STACK_BIAS + 192, %g3 sub %g7, STACK_BIAS, %g7 - mov %g7, %sp + cmp %sp, %g7 + blu,pn %xcc, 2f + cmp %sp, %g3 + bleu,pn %xcc, 1f + nop +2: mov %g3, %sp + sethi %hi(panicstring), %g3 call prom_printf or %g3, %lo(panicstring), %o0 call prom_halt
arch/sparc64/mm/init.c +11 -0
@@ -49,6 +49,7 @@#include <asm/sstate.h> #include <asm/mdesc.h> #include <asm/cpudata.h> +#include <asm/irq.h> #define MAX_PHYS_ADDRESS (1UL << 42UL)#define KPTE_BITMAP_CHUNK_SZ (256UL * 1024UL * 1024UL)
@@ -1817,6 +1818,16 @@ void __init paging_init(void)if (tlb_type == hypervisor)sun4v_mdesc_init (); +/* Once the OF device tree and MDESC have been setup, we know +* the list of possible cpus. Therefore we can allocate the +* IRQ stacks. +*/ +for_each_possible_cpu (i) { +/* XXX Use node local allocations... XXX */ + softirq_stack[i] =__va (lmb_alloc (THREAD_SIZE ,THREAD_SIZE )); + hardirq_stack[i] =__va (lmb_alloc (THREAD_SIZE ,THREAD_SIZE )); + } +/* Setup bootmem... */ last_valid_pfn = end_pfn =bootmem_init (phys_base);
arch/sparc64/mm/ultra.S +7 -0
@@ -531,6 +531,13 @@ xcall_fetch_glob_regs: stx %g7, [%g1 + GR_SNAP_TNPC] stx %o7, [%g1 + GR_SNAP_O7] stx %i7, [%g1 + GR_SNAP_I7] + /* Don't try this at home kids... */ + rdpr %cwp, %g2 + sub %g2, 1, %g7 + wrpr %g7, %cwp + mov %i7, %g7 + wrpr %g2, %cwp + stx %g7, [%g1 + GR_SNAP_RPC] sethi %hi(trap_block), %g7 or %g7, %lo(trap_block), %g7 sllx %g2, TRAP_BLOCK_SZ_SHIFT, %g2
arch/x86/boot/boot.h +8 -0
@@ -25,6 +25,8 @@#include <asm/boot.h> #include <asm/setup.h> +#define NCAPINTS 8 +/* Useful macros */ #define BUILD_BUG_ON (condition) ((void)sizeof(char[1 - 2*!!(condition)]))
@@ -242,6 +244,12 @@ int cmdline_find_option(const char *option, char *buffer, int bufsize);int cmdline_find_option_bool (const char *option);/* cpu.c, cpucheck.c */ +struct cpu_features { +int level;/* Family, or 64 for x86-64 */ +int model; +u32 flags[NCAPINTS ]; +}; +extern struct cpu_features cpu;int check_cpu (int *cpu_level_ptr,int *req_level_ptr,u32 **err_flags_ptr);int validate_cpu (void );
arch/x86/boot/cpucheck.c +1 -7
@@ -30,13 +30,7 @@#include <asm/required-features.h> #include <asm/msr-index.h> -struct cpu_features { -int level;/* Family, or 64 for x86-64 */ -int model; -u32 flags[NCAPINTS ]; -}; - -static struct cpu_features cpu; +struct cpu_features cpu;static u32 cpu_vendor[3 ];static u32 err_flags[NCAPINTS ];
arch/x86/boot/main.c +4 -0
@@ -73,6 +73,10 @@ static void keyboard_set_repeat(void)*/ static void query_ist (void ) { +/* Some 486 BIOSes apparently crash on this call */ +if (cpu.level <6 ) +return ; + asm("int $0x15" : "=a" (boot_params.ist_info.signature), "=b" (boot_params.ist_info.command),
arch/x86/kernel/cpu/mtrr/generic.c +1 -1
@@ -219,7 +219,7 @@ void __init get_mtrr_state(void) tom2 = hi; tom2 <<=32 ; tom2 |= lo; - tom2 &=0xffffff8000000ULL ; + tom2 &=0xffffff800000ULL ; }if (mtrr_show) {int high_width;
arch/x86/kvm/mmu.c +1 -0
@@ -1792,6 +1792,7 @@ int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva)spin_unlock (&vcpu->kvm->mmu_lock);return r; } +EXPORT_SYMBOL_GPL (kvm_mmu_unprotect_page_virt);void __kvm_mmu_free_some_pages (struct kvm_vcpu *vcpu) {
arch/x86/kvm/svm.c +6 -1
@@ -1007,13 +1007,18 @@ static int pf_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run)struct kvm *kvm = svm->vcpu.kvm;u64 fault_address;u32 error_code; +bool event_injection = false;if (!irqchip_in_kernel (kvm) && -is_external_interrupt (exit_int_info)) +is_external_interrupt (exit_int_info)) { + event_injection = true;push_irq (&svm->vcpu, exit_int_info &SVM_EVTINJ_VEC_MASK ); + } fault_address = svm->vmcb->control.exit_info_2; error_code = svm->vmcb->control.exit_info_1; +if (event_injection) +kvm_mmu_unprotect_page_virt (&svm->vcpu, fault_address);return kvm_mmu_page_fault (&svm->vcpu, fault_address, error_code); }
arch/x86/kvm/vmx.c +2 -0
@@ -2258,6 +2258,8 @@ static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) cr2 =vmcs_readl (EXIT_QUALIFICATION );KVMTRACE_3D (PAGE_FAULT , vcpu, error_code, (u32 )cr2, (u32)((u64 )cr2 >>32 ), handler); +if (vect_info &VECTORING_INFO_VALID_MASK ) +kvm_mmu_unprotect_page_virt (vcpu, cr2);return kvm_mmu_page_fault (vcpu, cr2, error_code); }
arch/x86/kvm/x86.c +43 -66
204 lines not on this page · raw message
arch/x86/pci/k8-bus_64.c +2 -2
@@ -384,7 +384,7 @@ static int __init early_fill_mp_bus_info(void)/* need to take out [0, TOM) for RAM*/ address =MSR_K8_TOP_MEM1 ;rdmsrl (address, val); - end = (val &0xffffff8000000ULL ); + end = (val &0xffffff800000ULL );printk (KERN_INFO "TOM: %016lx aka %ldM\n" , end, end>>20 );if (end < (1ULL <<32 ))update_range (range,0 , end -1 );
@@ -478,7 +478,7 @@ static int __init early_fill_mp_bus_info(void)/* TOP_MEM2 */ address =MSR_K8_TOP_MEM2 ;rdmsrl (address, val); - end = (val &0xffffff8000000ULL ); + end = (val &0xffffff800000ULL );printk (KERN_INFO "TOM2: %016lx aka %ldM\n" , end, end>>20 );update_range (range,1ULL <<32 , end -1 ); }
block/scsi_ioctl.c +1 -1
@@ -629,7 +629,7 @@ int scsi_cmd_ioctl(struct file *file, struct request_queue *q, hdr.sbp = cgc.sense;if (hdr.sbp) hdr.mx_sb_len =sizeof (struct request_sense ); - hdr.timeout = cgc.timeout; + hdr.timeout =jiffies_to_msecs (cgc.timeout); hdr.cmdp = ((struct cdrom_generic_command __user *) arg)->cmd; hdr.cmd_len =sizeof (cgc.cmd);
drivers/char/hw_random/via-rng.c +8 -0
@@ -31,6 +31,7 @@#include <asm/io.h> #include <asm/msr.h> #include <asm/cpufeature.h> +#include <asm/i387.h> #define PFX KBUILD_MODNAME ": "
@@ -67,16 +68,23 @@ enum {* Another possible performance boost may come from simply buffering * until we have 4 bytes, thus returning a u32 at a time, * instead of the current u8-at-a-time. +* +* Padlock instructions can generate a spurious DNA fault, so +* we have to call them in the context of irq_ts_save/restore() */ static inline u32 xstore (u32 *addr,u32 edx_in) {u32 eax_out; +int ts_state; + + ts_state =irq_ts_save (); asm(".byte 0x0F,0xA7,0xC0 /* xstore %%edi (addr=%0) */" :"=m" (*addr),"=a" (eax_out) :"D" (addr),"d" (edx_in)); +irq_ts_restore (ts_state);return eax_out; }
drivers/crypto/padlock-aes.c +27 -1
@@ -16,6 +16,7 @@#include <linux/interrupt.h> #include <linux/kernel.h> #include <asm/byteorder.h> +#include <asm/i387.h> #include "padlock.h" /* Control word. */
@@ -141,6 +142,12 @@ static inline void padlock_reset_key(void) asmvolatile ("pushfl; popfl" ); } +/* +* While the padlock instructions don't use FP/SSE registers, they +* generate a spurious DNA fault when cr0.ts is '1'. These instructions +* should be used only inside the irq_ts_save/restore() context +*/ +static inline void padlock_xcrypt (const u8 *input,u8 *output,void *key,void *control_word) {
@@ -205,15 +212,23 @@ static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,static void aes_encrypt (struct crypto_tfm *tfm,u8 *out,const u8 *in) {struct aes_ctx *ctx =aes_ctx (tfm); +int ts_state;padlock_reset_key (); + + ts_state =irq_ts_save ();aes_crypt (in, out, ctx->E, &ctx->cword.encrypt); +irq_ts_restore (ts_state); }static void aes_decrypt (struct crypto_tfm *tfm,u8 *out,const u8 *in) {struct aes_ctx *ctx =aes_ctx (tfm); +int ts_state;padlock_reset_key (); + + ts_state =irq_ts_save ();aes_crypt (in, out, ctx->D, &ctx->cword.decrypt); +irq_ts_restore (ts_state); }static struct crypto_alg aes_alg = {
@@ -244,12 +259,14 @@ static int ecb_aes_encrypt(struct blkcipher_desc *desc,struct aes_ctx *ctx =blk_aes_ctx (desc->tfm);struct blkcipher_walk walk;int err; +int ts_state;padlock_reset_key ();blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + ts_state =irq_ts_save ();while ((nbytes = walk.nbytes)) { padlock_xcrypt_ecb(walk.src.virt.addr, walk.dst.virt.addr, ctx->E, &ctx->cword.encrypt,
@@ -257,6 +274,7 @@ static int ecb_aes_encrypt(struct blkcipher_desc *desc, nbytes &=AES_BLOCK_SIZE -1 ; err =blkcipher_walk_done (desc, &walk, nbytes); } +irq_ts_restore (ts_state);return err; }
@@ -268,12 +286,14 @@ static int ecb_aes_decrypt(struct blkcipher_desc *desc,struct aes_ctx *ctx =blk_aes_ctx (desc->tfm);struct blkcipher_walk walk;int err; +int ts_state;padlock_reset_key ();blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + ts_state =irq_ts_save ();while ((nbytes = walk.nbytes)) { padlock_xcrypt_ecb(walk.src.virt.addr, walk.dst.virt.addr, ctx->D, &ctx->cword.decrypt,
@@ -281,7 +301,7 @@ static int ecb_aes_decrypt(struct blkcipher_desc *desc, nbytes &=AES_BLOCK_SIZE -1 ; err =blkcipher_walk_done (desc, &walk, nbytes); } - +irq_ts_restore (ts_state);return err; }
@@ -314,12 +334,14 @@ static int cbc_aes_encrypt(struct blkcipher_desc *desc,struct aes_ctx *ctx =blk_aes_ctx (desc->tfm);struct blkcipher_walk walk;int err; +int ts_state;padlock_reset_key ();blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + ts_state =irq_ts_save ();while ((nbytes = walk.nbytes)) { u8 *iv = padlock_xcrypt_cbc(walk.src.virt.addr, walk.dst.virt.addr, ctx->E,
@@ -329,6 +351,7 @@ static int cbc_aes_encrypt(struct blkcipher_desc *desc, nbytes &=AES_BLOCK_SIZE -1 ; err =blkcipher_walk_done (desc, &walk, nbytes); } +irq_ts_restore (ts_state);return err; }
@@ -340,12 +363,14 @@ static int cbc_aes_decrypt(struct blkcipher_desc *desc,struct aes_ctx *ctx =blk_aes_ctx (desc->tfm);struct blkcipher_walk walk;int err; +int ts_state;padlock_reset_key ();blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + ts_state =irq_ts_save ();while ((nbytes = walk.nbytes)) { padlock_xcrypt_cbc(walk.src.virt.addr, walk.dst.virt.addr, ctx->D, walk.iv, &ctx->cword.decrypt,
@@ -354,6 +379,7 @@ static int cbc_aes_decrypt(struct blkcipher_desc *desc, err =blkcipher_walk_done (desc, &walk, nbytes); } +irq_ts_restore (ts_state);return err; }
drivers/crypto/padlock-sha.c +9 -0
@@ -22,6 +22,7 @@#include <linux/interrupt.h> #include <linux/kernel.h> #include <linux/scatterlist.h> +#include <asm/i387.h> #include "padlock.h" #define SHA1_DEFAULT_FALLBACK "sha1-generic"
@@ -102,6 +103,7 @@ static void padlock_do_sha1(const char *in, char *out, int count)* PadLock microcode needs it that big. */ char buf[128 +16 ];char *result =NEAREST_ALIGNED (buf); +int ts_state; ((uint32_t *)result)[0 ] =SHA1_H0 ; ((uint32_t *)result)[1 ] =SHA1_H1 ;
@@ -109,9 +111,12 @@ static void padlock_do_sha1(const char *in, char *out, int count) ((uint32_t *)result)[3 ] =SHA1_H3 ; ((uint32_t *)result)[4 ] =SHA1_H4 ; +/* prevent taking the spurious DNA fault with padlock. */ + ts_state =irq_ts_save (); asmvolatile (".byte 0xf3,0x0f,0xa6,0xc8" /* rep xsha1 */ :"+S" (in),"+D" (result) :"c" (count),"a" (0 )); +irq_ts_restore (ts_state);padlock_output_block ((uint32_t *)result, (uint32_t *)out,5 ); }
@@ -123,6 +128,7 @@ static void padlock_do_sha256(const char *in, char *out, int count)* PadLock microcode needs it that big. */ char buf[128 +16 ];char *result =NEAREST_ALIGNED (buf); +int ts_state; ((uint32_t *)result)[0 ] =SHA256_H0 ; ((uint32_t *)result)[1 ] =SHA256_H1 ;
@@ -133,9 +139,12 @@ static void padlock_do_sha256(const char *in, char *out, int count) ((uint32_t *)result)[6 ] =SHA256_H6 ; ((uint32_t *)result)[7 ] =SHA256_H7 ; +/* prevent taking the spurious DNA fault with padlock. */ + ts_state =irq_ts_save (); asmvolatile (".byte 0xf3,0x0f,0xa6,0xd0" /* rep xsha256 */ :"+S" (in),"+D" (result) :"c" (count),"a" (0 )); +irq_ts_restore (ts_state);padlock_output_block ((uint32_t *)result, (uint32_t *)out,8 ); }
drivers/i2c/Kconfig +14 -0
@@ -38,6 +38,20 @@ config I2C_CHARDEV This support is also available as a module. If so, the module will be called i2c-dev. +config I2C_HELPER_AUTO + bool "Autoselect pertinent helper modules" + default y + help + Some I2C bus drivers require so-called "I2C algorithm" modules + to work. These are basically software-only abstractions of generic + I2C interfaces. This option will autoselect them so that you don't + have to care. + + Unselect this only if you need to enable additional helper + modules, for example for use with external I2C bus drivers. + + In doubt, say Y. + source drivers/i2c/algos/Kconfig source drivers/i2c/busses/Kconfig source drivers/i2c/chips/Kconfig
drivers/i2c/algos/Kconfig +8 -3
@@ -2,15 +2,20 @@ # I2C algorithm drivers configuration # +menu "I2C Algorithms" + depends on !I2C_HELPER_AUTO + config I2C_ALGOBIT - tristate + tristate "I2C bit-banging interfaces" config I2C_ALGOPCF - tristate + tristate "I2C PCF 8584 interfaces" config I2C_ALGOPCA - tristate + tristate "I2C PCA 9564 interfaces" config I2C_ALGO_SGI tristate depends on SGI_IP22 || SGI_IP32 || X86_VISWS + +endmenu
drivers/i2c/i2c-core.c +3 -1
@@ -1196,9 +1196,11 @@ i2c_new_probed_device(struct i2c_adapter *adap,if ((addr_list[i] & ~0x07 ) ==0x30 || (addr_list[i] & ~0x0f ) ==0x50 || !i2c_check_functionality (adap,I2C_FUNC_SMBUS_QUICK )) { +union i2c_smbus_data data; +if (i2c_smbus_xfer (adap, addr_list[i],0 ,I2C_SMBUS_READ ,0 , -I2C_SMBUS_BYTE ,NULL ) >=0 ) +I2C_SMBUS_BYTE , &data) >=0 )break ; }else { if (i2c_smbus_xfer(adap, addr_list[i], 0,
drivers/ide/ide-cd.c +10 -8
@@ -1298,6 +1298,7 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,int stat;struct request req; +u32 blocklen;ide_cd_init_rq (drive, &req);
@@ -1314,23 +1315,24 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,/* * Sanity check the given block size */ -switch (capbuf.blocklen) { -case __constant_cpu_to_be32 (512 ): -case __constant_cpu_to_be32 (1024 ): -case __constant_cpu_to_be32 (2048 ): -case __constant_cpu_to_be32 (4096 ): + blocklen =be32_to_cpu (capbuf.blocklen); +switch (blocklen) { +case 512 : +case 1024 : +case 2048 : +case 4096 :break ;default :printk (KERN_ERR "%s: weird block size %u\n" , - drive->name, capbuf.blocklen); + drive->name, blocklen);printk (KERN_ERR "%s: default to 2kb block size\n" , drive->name); - capbuf.blocklen =__constant_cpu_to_be32 (2048 ); + blocklen =2048 ;break ; } *capacity =1 +be32_to_cpu (capbuf.lba); - *sectors_per_frame =be32_to_cpu (capbuf.blocklen) >>SECTOR_BITS ; + *sectors_per_frame = blocklen >>SECTOR_BITS ;return 0 ; }
drivers/ide/pci/cs5520.c +1 -0
@@ -123,6 +123,7 @@ static const struct ide_dma_ops cs5520_dma_ops = {#define DECLARE_CS_DEV (name_str) \ { \ .name = name_str, \ + .enablebits = { {0x60, 0x01, 0x01}, {0x60, 0x02, 0x02} }, \ .port_ops = &cs5520_port_ops, \ .dma_ops = &cs5520_dma_ops, \ .host_flags = IDE_HFLAG_ISA_PORTS | \
drivers/ide/pci/it821x.c +6 -0
@@ -512,8 +512,14 @@ static void __devinit it821x_quirkproc(ide_drive_t *drive) }static struct ide_dma_ops it821x_pass_through_dma_ops = { + .dma_host_set = ide_dma_host_set, + .dma_setup = ide_dma_setup, + .dma_exec_cmd = ide_dma_exec_cmd, .dma_start = it821x_dma_start, .dma_end = it821x_dma_end, + .dma_test_irq = ide_dma_test_irq, + .dma_timeout = ide_dma_timeout, + .dma_lost_irq = ide_dma_lost_irq, };/**
drivers/misc/acer-wmi.c +19 -0
@@ -742,11 +742,30 @@ static acpi_status get_u32(u32 *value, u32 cap)static acpi_status set_u32 (u32 value,u32 cap) { +acpi_status status; +if (interface->capability & cap) {switch (interface->type) {case ACER_AMW0 :return AMW0_set_u32 (value, cap, interface);case ACER_AMW0_V2 : +if (cap ==ACER_CAP_MAILLED ) +return AMW0_set_u32 (value, cap, interface); + +/* +* On some models, some WMID methods don't toggle +* properly. For those cases, we want to run the AMW0 +* method afterwards to be certain we've really toggled +* the device state. +*/ +if (cap ==ACER_CAP_WIRELESS || + cap ==ACER_CAP_BLUETOOTH ) { + status =WMID_set_u32 (value, cap, interface); +if (ACPI_FAILURE (status)) +return status; + +return AMW0_set_u32 (value, cap, interface); + }case ACER_WMID :return WMID_set_u32 (value, cap, interface);default :
drivers/net/r8169.c +4 -2
@@ -1438,8 +1438,10 @@ static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp)rtl_hw_phy_config (dev); -dprintk ("Set MAC Reg C+CR Offset 0x82h = 0x01h\n" ); -RTL_W8 (0x82 ,0x01 ); +if (tp->mac_version <=RTL_GIGA_MAC_VER_06 ) { +dprintk ("Set MAC Reg C+CR Offset 0x82h = 0x01h\n" ); +RTL_W8 (0x82 ,0x01 ); + }pci_write_config_byte (tp->pci_dev,PCI_LATENCY_TIMER ,0x40 );
drivers/net/wireless/rtl8187.h +4 -0
@@ -67,6 +67,10 @@ struct rtl8187_priv {const struct rtl818x_rf_ops *rf;struct ieee80211_vif *vif;int mode; +/* The mutex protects the TX loopback state. +* Any attempt to set channels concurrently locks the device. +*/ +struct mutex conf_mutex;/* rtl8187 specific */ struct ieee80211_channel channels[14 ];
drivers/net/wireless/rtl8187_dev.c +3 -0
@@ -580,6 +580,7 @@ static int rtl8187_config(struct ieee80211_hw *dev, struct ieee80211_conf *conf)struct rtl8187_priv *priv = dev->priv;u32 reg; +mutex_lock (&priv->conf_mutex); reg =rtl818x_ioread32 (priv, &priv->map->TX_CONF);/* Enable TX loopback on MAC level to avoid TX during channel * changes, as this has be seen to causes problems and the
@@ -610,6 +611,7 @@ static int rtl8187_config(struct ieee80211_hw *dev, struct ieee80211_conf *conf)rtl818x_iowrite16 (priv, &priv->map->ATIMTR_INTERVAL,100 );rtl818x_iowrite16 (priv, &priv->map->BEACON_INTERVAL,100 );rtl818x_iowrite16 (priv, &priv->map->BEACON_INTERVAL_TIME,100 ); +mutex_unlock (&priv->conf_mutex);return 0 ; }
@@ -814,6 +816,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,printk (KERN_ERR "rtl8187: Cannot register device\n" ); goto err_free_dev; } +mutex_init (&priv->conf_mutex); printk(KERN_INFO "%s: hwaddr %s, rtl8187 V%d + %s\n", wiphy_name(dev->wiphy), print_mac(mac, dev->wiphy->perm_addr),
drivers/pci/quirks.c +6 -1
@@ -1683,9 +1683,14 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, 0x324e, quirk_via_cx700_pci_parking_c*/ static void __devinit quirk_brcm_570x_limit_vpd (struct pci_dev *dev) { -/* Only disable the VPD capability for 5706, 5708, and 5709 rev. A */ +/* +* Only disable the VPD capability for 5706, 5706S, 5708, +* 5708S and 5709 rev. A +*/ if ((dev->device ==PCI_DEVICE_ID_NX2_5706 ) || + (dev->device ==PCI_DEVICE_ID_NX2_5706S ) || (dev->device ==PCI_DEVICE_ID_NX2_5708 ) || + (dev->device ==PCI_DEVICE_ID_NX2_5708S ) || ((dev->device ==PCI_DEVICE_ID_NX2_5709 ) && (dev->revision &0xf0 ) ==0x0 )) {if (dev->vpd)
drivers/scsi/hptiop.c +7 -0
@@ -1249,6 +1249,13 @@ static struct pci_device_id hptiop_id_table[] = { { PCI_VDEVICE(TTI, 0x3522), (kernel_ulong_t)&hptiop_itl_ops }, { PCI_VDEVICE(TTI, 0x3410), (kernel_ulong_t)&hptiop_itl_ops }, { PCI_VDEVICE(TTI, 0x3540), (kernel_ulong_t)&hptiop_itl_ops }, + { PCI_VDEVICE(TTI, 0x3530), (kernel_ulong_t)&hptiop_itl_ops }, + { PCI_VDEVICE(TTI, 0x3560), (kernel_ulong_t)&hptiop_itl_ops }, + { PCI_VDEVICE(TTI, 0x4322), (kernel_ulong_t)&hptiop_itl_ops }, + { PCI_VDEVICE(TTI, 0x4210), (kernel_ulong_t)&hptiop_itl_ops }, + { PCI_VDEVICE(TTI, 0x4211), (kernel_ulong_t)&hptiop_itl_ops }, + { PCI_VDEVICE(TTI, 0x4310), (kernel_ulong_t)&hptiop_itl_ops }, + { PCI_VDEVICE(TTI, 0x4311), (kernel_ulong_t)&hptiop_itl_ops }, { PCI_VDEVICE(TTI, 0x3120), (kernel_ulong_t)&hptiop_mv_ops }, { PCI_VDEVICE(TTI, 0x3122), (kernel_ulong_t)&hptiop_mv_ops }, { PCI_VDEVICE(TTI, 0x3020), (kernel_ulong_t)&hptiop_mv_ops },
drivers/scsi/qla2xxx/qla_attr.c +29 -14
77 lines not on this page · raw message
drivers/scsi/qla2xxx/qla_def.h +0 -1
@@ -1544,7 +1544,6 @@ typedef struct fc_port {int login_retry;atomic_t port_down_timer; -spinlock_t rport_lock;struct fc_rport *rport, *drport;u32 supported_classes;
drivers/scsi/qla2xxx/qla_gbl.h +2 -0
@@ -71,6 +71,8 @@ extern int qla2x00_post_aen_work(struct scsi_qla_host *, enumextern int qla2x00_post_hwe_work (struct scsi_qla_host *,uint16_t ,uint16_t ,uint16_t ,uint16_t ); +extern void qla2x00_abort_fcport_cmds (fc_port_t *); +/* * Global Functions in qla_mid.c source file. */
drivers/scsi/qla2xxx/qla_init.c +5 -11
@@ -1864,12 +1864,11 @@ qla2x00_rport_del(void *data) {fc_port_t *fcport = data;struct fc_rport *rport; -unsigned long flags; -spin_lock_irqsave (&fcport->rport_lock, flags); +spin_lock_irq (fcport->ha->host->host_lock); rport = fcport->drport; fcport->drport =NULL ; -spin_unlock_irqrestore (&fcport->rport_lock, flags); +spin_unlock_irq (fcport->ha->host->host_lock);if (rport)fc_remote_port_delete (rport); }
@@ -1898,7 +1897,6 @@ qla2x00_alloc_fcport(scsi_qla_host_t *ha, gfp_t flags)atomic_set (&fcport->state,FCS_UNCONFIGURED ); fcport->flags =FCF_RLC_SUPPORT ; fcport->supported_classes =FC_COS_UNSPECIFIED ; -spin_lock_init (&fcport->rport_lock);return fcport; }
@@ -2243,28 +2241,24 @@ qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport) {struct fc_rport_identifiers rport_ids;struct fc_rport *rport; -unsigned long flags;if (fcport->drport)qla2x00_rport_del (fcport); -if (fcport->rport) -return ; rport_ids.node_name =wwn_to_u64 (fcport->node_name); rport_ids.port_name =wwn_to_u64 (fcport->port_name); rport_ids.port_id = fcport->d_id.b.domain <<16 | fcport->d_id.b.area <<8 | fcport->d_id.b.al_pa; rport_ids.roles =FC_RPORT_ROLE_UNKNOWN ; - rport =fc_remote_port_add (ha->host,0 , &rport_ids); + fcport->rport = rport =fc_remote_port_add (ha->host,0 , &rport_ids);if (!rport) {qla_printk (KERN_WARNING , ha,"Unable to allocate fc remote port!\n" );return ; } -spin_lock_irqsave (&fcport->rport_lock, flags); - fcport->rport = rport; +spin_lock_irq (fcport->ha->host->host_lock); *((fc_port_t **)rport->dd_data) = fcport; -spin_unlock_irqrestore (&fcport->rport_lock, flags); +spin_unlock_irq (fcport->ha->host->host_lock); rport->supported_classes = fcport->supported_classes;
drivers/scsi/qla2xxx/qla_os.c +41 -14
94 lines not on this page · raw message
drivers/scsi/scsi_transport_spi.c +5 -3
@@ -366,12 +366,14 @@ spi_transport_rd_attr(rti, "%d\n");spi_transport_rd_attr (pcomp_en,"%d\n" );spi_transport_rd_attr (hold_mcs,"%d\n" ); -/* we only care about the first child device so we return 1 */ +/* we only care about the first child device that's a real SCSI device +* so we return 1 to terminate the iteration when we find it */ static int child_iter (struct device *dev,void *data) { -struct scsi_device *sdev =to_scsi_device (dev); +if (!scsi_is_sdev_device (dev)) +return 0 ; -spi_dv_device (sdev); +spi_dv_device (to_scsi_device (dev));return 1 ; }
drivers/scsi/ses.c +14 -4
@@ -345,14 +345,14 @@ static int ses_enclosure_find_by_addr(struct enclosure_device *edev,return 0 ; } -#define VPD_INQUIRY_SIZE 512 +#define VPD_INQUIRY_SIZE 36static void ses_match_to_enclosure (struct enclosure_device *edev,struct scsi_device *sdev) {unsigned char *buf =kmalloc (VPD_INQUIRY_SIZE ,GFP_KERNEL );unsigned char *desc; -int len; +u16 vpd_len;struct efd efd = { .addr =0 , };
@@ -372,9 +372,19 @@ static void ses_match_to_enclosure(struct enclosure_device *edev, VPD_INQUIRY_SIZE, NULL, SES_TIMEOUT, SES_RETRIES)) goto free; - len = (buf[2 ] <<8 ) + buf[3 ]; + vpd_len = (buf[2 ] <<8 ) + buf[3 ]; +kfree (buf); + buf =kmalloc (vpd_len,GFP_KERNEL ); +if (!buf) +return ; + cmd[3 ] = vpd_len >>8 ; + cmd[4 ] = vpd_len &0xff ; +if (scsi_execute_req (sdev, cmd,DMA_FROM_DEVICE , buf, + vpd_len,NULL ,SES_TIMEOUT ,SES_RETRIES )) + goto free; + desc = buf +4 ; -while (desc < buf + len) { +while (desc < buf + vpd_len) {enum scsi_protocol proto = desc[0 ] >>4 ;u8 code_set = desc[0 ] &0x0f ;u8 piv = desc[1 ] &0x80 ;
drivers/usb/core/message.c +1 -1
@@ -1091,8 +1091,8 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0)continue ;dev_dbg (&dev->dev,"unregistering interface %s\n" , interface->dev.bus_id); -device_del (&interface->dev);usb_remove_sysfs_intf_files (interface); +device_del (&interface->dev); }/* Now that the interfaces are unbound, nobody should
drivers/usb/serial/ftdi_sio.c +5 -0
@@ -553,6 +553,7 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, FTDI_ELV_FHZ1300PC_PID) }, { USB_DEVICE(FTDI_VID, FTDI_ELV_EM1010PC_PID) }, { USB_DEVICE(FTDI_VID, FTDI_ELV_WS500_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_ELV_HS485_PID) }, { USB_DEVICE(FTDI_VID, LINX_SDMUSBQSS_PID) }, { USB_DEVICE(FTDI_VID, LINX_MASTERDEVEL2_PID) }, { USB_DEVICE(FTDI_VID, LINX_FUTURE_0_PID) },
@@ -636,6 +637,10 @@ static struct usb_device_id id_table_combined [] = { .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { USB_DEVICE(FTDI_VID, FTDI_OOCDLINK_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(FTDI_VID, LMI_LM3S_DEVEL_BOARD_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(FTDI_VID, LMI_LM3S_EVAL_BOARD_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) }, { }, /* Optional parameter entry */
drivers/usb/serial/ftdi_sio.h +6 -0
@@ -524,6 +524,7 @@#define FTDI_ELV_WS300PC_PID 0xE0F6/* PC-Wetterstation (WS 300 PC) */ #define FTDI_ELV_FHZ1300PC_PID 0xE0E8/* FHZ 1300 PC */ #define FTDI_ELV_WS500_PID 0xE0E9/* PC-Wetterstation (WS 500) */ +#define FTDI_ELV_HS485_PID 0xE0EA/* USB to RS-485 adapter */ #define FTDI_ELV_EM1010PC_PID 0xE0EF/* Engery monitor EM 1010 PC */ /*
@@ -815,6 +816,11 @@#define OLIMEX_VID 0x15BA#define OLIMEX_ARM_USB_OCD_PID 0x0003 +/* Luminary Micro Stellaris Boards, VID = FTDI_VID */ +/* FTDI 2332C Dual channel device, side A=245 FIFO (JTAG), Side B=RS232 UART */ +#define LMI_LM3S_DEVEL_BOARD_PID 0xbcd8 +#define LMI_LM3S_EVAL_BOARD_PID 0xbcd9 +/* www.elsterelectricity.com Elster Unicom III Optical Probe */ #define FTDI_ELSTER_UNICOM_PID 0xE700/* Product Id */
drivers/usb/serial/pl2303.c +0 -1
@@ -89,7 +89,6 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(ALCOR_VENDOR_ID, ALCOR_PRODUCT_ID) }, { USB_DEVICE(WS002IN_VENDOR_ID, WS002IN_PRODUCT_ID) }, { USB_DEVICE(COREGA_VENDOR_ID, COREGA_PRODUCT_ID) }, - { USB_DEVICE(HL340_VENDOR_ID, HL340_PRODUCT_ID) }, { USB_DEVICE(YCCABLE_VENDOR_ID, YCCABLE_PRODUCT_ID) }, { } /* Terminating entry */ };
drivers/usb/serial/pl2303.h +0 -4
@@ -107,10 +107,6 @@#define COREGA_VENDOR_ID 0x07aa#define COREGA_PRODUCT_ID 0x002a -/* HL HL-340 (ID: 4348:5523) */ -#define HL340_VENDOR_ID 0x4348 -#define HL340_PRODUCT_ID 0x5523 -/* Y.C. Cable U.S.A., Inc - USB to RS-232 */ #define YCCABLE_VENDOR_ID 0x05ad#define YCCABLE_PRODUCT_ID 0x0fba
drivers/usb/serial/usb-serial.c +3 -4
@@ -119,9 +119,6 @@ static void return_serial(struct usb_serial *serial)dbg ("%s" , __func__); -if (serial ==NULL ) -return ; -for (i =0 ; i < serial->num_ports; ++i) { serial_table[serial->minor + i] =NULL ; }
@@ -140,7 +137,8 @@ static void destroy_serial(struct kref *kref) serial->type->shutdown (serial);/* return the minor range that this device had */ -return_serial (serial); +if (serial->minor !=SERIAL_TTY_NO_MINOR ) +return_serial (serial);for (i =0 ; i < serial->num_ports; ++i) serial->port[i]->open_count =0 ;
@@ -562,6 +560,7 @@ static struct usb_serial * create_serial (struct usb_device *dev, serial->interface = interface;kref_init (&serial->kref);mutex_init (&serial->disc_mutex); + serial->minor =SERIAL_TTY_NO_MINOR ;return serial; }
drivers/usb/storage/scsiglue.c +15 -10
@@ -73,7 +73,6 @@ static const char* host_info(struct Scsi_Host *host)static int slave_alloc (struct scsi_device *sdev) {struct us_data *us =host_to_us (sdev->host); -struct usb_host_endpoint *bulk_in_ep;/* * Set the INQUIRY transfer length to 36. We don't use any of
@@ -82,16 +81,22 @@ static int slave_alloc (struct scsi_device *sdev)*/ sdev->inquiry_len =36 ; -/* Scatter-gather buffers (all but the last) must have a length -* divisible by the bulk maxpacket size. Otherwise a data packet -* would end up being short, causing a premature end to the data -* transfer. We'll use the maxpacket value of the bulk-IN pipe -* to set the SCSI device queue's DMA alignment mask. +/* USB has unusual DMA-alignment requirements: Although the +* starting address of each scatter-gather element doesn't matter, +* the length of each element except the last must be divisible +* by the Bulk maxpacket value. There's currently no way to +* express this by block-layer constraints, so we'll cop out +* and simply require addresses to be aligned at 512-byte +* boundaries. This is okay since most block I/O involves +* hardware sectors that are multiples of 512 bytes in length, +* and since host controllers up through USB 2.0 have maxpacket +* values no larger than 512. +* +* But it doesn't suffice for Wireless USB, where Bulk maxpacket +* values can be as large as 2048. To make that work properly +* will require changes to the block layer. */ - bulk_in_ep = us->pusb_dev->ep_in[usb_pipeendpoint (us->recv_bulk_pipe)]; -blk_queue_update_dma_alignment (sdev->request_queue, -le16_to_cpu (bulk_in_ep->desc.wMaxPacketSize) -1 ); -/* wMaxPacketSize must be a power of 2 */ +blk_queue_update_dma_alignment (sdev->request_queue, (512 -1 ));/* * The UFI spec treates the Peripheral Qualifier bits in an
drivers/usb/storage/transport.c +15 -2
@@ -1034,8 +1034,21 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us)/* try to compute the actual residue, based on how much data * was really transferred and what the device tells us */ -if (residue) { -if (!(us->flags &US_FL_IGNORE_RESIDUE )) { +if (residue && !(us->flags &US_FL_IGNORE_RESIDUE )) { + +/* Heuristically detect devices that generate bogus residues +* by seeing what happens with INQUIRY and READ CAPACITY +* commands. +*/ +if (bcs->Status ==US_BULK_STAT_OK && +scsi_get_resid (srb) ==0 && + ((srb->cmnd[0 ] ==INQUIRY && + transfer_length ==36 ) || + (srb->cmnd[0 ] ==READ_CAPACITY && + transfer_length ==8 ))) { + us->flags |=US_FL_IGNORE_RESIDUE ; + + }else { residue =min (residue, transfer_length);scsi_set_resid (srb,max (scsi_get_resid (srb), (int ) residue));
drivers/usb/storage/unusual_devs.h +16 -2
@@ -358,14 +358,14 @@ UNUSUAL_DEV( 0x04b0, 0x040f, 0x0100, 0x0200, US_FL_FIX_CAPACITY),/* Reported by Emil Larsson <[email protected]> */ -UNUSUAL_DEV (0x04b0 ,0x0411 ,0x0100 ,0x0110 , +UNUSUAL_DEV (0x04b0 ,0x0411 ,0x0100 ,0x0111 ,"NIKON" ,"NIKON DSC D80" ,US_SC_DEVICE ,US_PR_DEVICE ,NULL ,US_FL_FIX_CAPACITY ),/* Reported by Ortwin Glueck <[email protected]> */ -UNUSUAL_DEV( 0x04b0, 0x0413, 0x0110, 0x0110, +UNUSUAL_DEV( 0x04b0, 0x0413, 0x0110, 0x0111, "NIKON", "NIKON DSC D40", US_SC_DEVICE, US_PR_DEVICE, NULL,
@@ -1187,6 +1187,13 @@ UNUSUAL_DEV( 0x07c4, 0xa400, 0x0000, 0xffff, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), +/* Reported by Rauch Wolke <[email protected]> */ +UNUSUAL_DEV (0x07c4 ,0xa4a5 ,0x0000 ,0xffff , +"Simple Tech/Datafab" , +"CF+SM Reader" , +US_SC_DEVICE ,US_PR_DEVICE ,NULL , + US_FL_IGNORE_RESIDUE ), +/* Casio QV 2x00/3x00/4000/8000 digital still cameras are not conformant * to the USB storage specification in two ways: * - They tell us they are using transport protocol CBI. In reality they
@@ -1758,6 +1765,13 @@ UNUSUAL_DEV( 0x2770, 0x915d, 0x0010, 0x0010, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), +/* Reported by Andrey Rahmatullin <[email protected]> */ +UNUSUAL_DEV (0x4102 ,0x1020 ,0x0100 ,0x0100 , +"iRiver" , +"MP3 T10" , +US_SC_DEVICE ,US_PR_DEVICE ,NULL , + US_FL_IGNORE_RESIDUE ), +/* * David Härdeman <[email protected]> * The key makes the SCSI stack print confusing (but harmless) messages
drivers/video/arkfb.c +9 -9
@@ -958,20 +958,20 @@ static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_device_/* Prepare PCI device */ rc =pci_enable_device (dev);if (rc <0 ) { -dev_err (info->dev,"cannot enable PCI device\n" ); +dev_err (info->device,"cannot enable PCI device\n" ); goto err_enable_device; } rc =pci_request_regions (dev,"arkfb" );if (rc <0 ) { -dev_err (info->dev,"cannot reserve framebuffer region\n" ); +dev_err (info->device,"cannot reserve framebuffer region\n" ); goto err_request_regions; } par->dac =ics5342_init (ark_dac_read_regs, ark_dac_write_regs, info);if (! par->dac) { rc = -ENOMEM ; -dev_err (info->dev,"RAMDAC initialization failed\n" ); +dev_err (info->device,"RAMDAC initialization failed\n" ); goto err_dac; }
@@ -982,7 +982,7 @@ static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_device_ info->screen_base =pci_iomap (dev,0 ,0 );if (! info->screen_base) { rc = -ENOMEM ; -dev_err (info->dev,"iomap for framebuffer failed\n" ); +dev_err (info->device,"iomap for framebuffer failed\n" ); goto err_iomap; }
@@ -1004,19 +1004,19 @@ static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_device_ rc =fb_find_mode (&(info->var), info, mode_option,NULL ,0 ,NULL ,8 );if (! ((rc ==1 ) || (rc ==2 ))) { rc = -EINVAL ; -dev_err (info->dev,"mode %s not found\n" , mode_option); +dev_err (info->device,"mode %s not found\n" , mode_option); goto err_find_mode; } rc =fb_alloc_cmap (&info->cmap,256 ,0 );if (rc <0 ) { -dev_err (info->dev,"cannot allocate colormap\n" ); +dev_err (info->device,"cannot allocate colormap\n" ); goto err_alloc_cmap; } rc =register_framebuffer (info);if (rc <0 ) { -dev_err (info->dev,"cannot register framebugger\n" ); +dev_err (info->device,"cannot register framebugger\n" ); goto err_reg_fb; }
@@ -1090,7 +1090,7 @@ static int ark_pci_suspend (struct pci_dev* dev, pm_message_t state)struct fb_info *info =pci_get_drvdata (dev);struct arkfb_info *par = info->par; -dev_info (info->dev,"suspend\n" ); +dev_info (info->device,"suspend\n" );acquire_console_sem ();mutex_lock (&(par->open_lock));
@@ -1121,7 +1121,7 @@ static int ark_pci_resume (struct pci_dev* dev)struct fb_info *info =pci_get_drvdata (dev);struct arkfb_info *par = info->par; -dev_info (info->dev,"resume\n" ); +dev_info (info->device,"resume\n" );acquire_console_sem ();mutex_lock (&(par->open_lock));
drivers/video/aty/radeon_accel.c +10 -2
@@ -55,6 +55,10 @@ static void radeonfb_prim_fillrect(struct radeonfb_info *rinfo,OUTREG (DP_WRITE_MSK ,0xffffffff );OUTREG (DP_CNTL , (DST_X_LEFT_TO_RIGHT |DST_Y_TOP_TO_BOTTOM )); +radeon_fifo_wait (2 ); +OUTREG (DSTCACHE_CTLSTAT ,RB2D_DC_FLUSH_ALL ); +OUTREG (WAIT_UNTIL , (WAIT_2D_IDLECLEAN |WAIT_DMA_GUI_IDLE )); +radeon_fifo_wait (2 );OUTREG (DST_Y_X , (region->dy <<16 ) | region->dx);OUTREG (DST_WIDTH_HEIGHT , (region->width <<16 ) | region->height);
@@ -116,6 +120,10 @@ static void radeonfb_prim_copyarea(struct radeonfb_info *rinfo,OUTREG (DP_CNTL , (xdir>=0 ?DST_X_LEFT_TO_RIGHT :0 ) | (ydir>=0 ?DST_Y_TOP_TO_BOTTOM :0 )); +radeon_fifo_wait (2 ); +OUTREG (DSTCACHE_CTLSTAT ,RB2D_DC_FLUSH_ALL ); +OUTREG (WAIT_UNTIL , (WAIT_2D_IDLECLEAN |WAIT_DMA_GUI_IDLE )); +radeon_fifo_wait (3 );OUTREG (SRC_Y_X , (sy <<16 ) | sx);OUTREG (DST_Y_X , (dy <<16 ) | dx);
@@ -241,8 +249,8 @@ void radeonfb_engine_reset(struct radeonfb_info *rinfo)INREG (HOST_PATH_CNTL );OUTREG (HOST_PATH_CNTL , host_path_cntl); -if (rinfo->family !=CHIP_FAMILY_R300 || - rinfo->family !=CHIP_FAMILY_R350 || +if (rinfo->family !=CHIP_FAMILY_R300 && + rinfo->family !=CHIP_FAMILY_R350 && rinfo->family !=CHIP_FAMILY_RV350 )OUTREG (RBBM_SOFT_RESET , rbbm_soft_reset);
drivers/video/matrox/matroxfb_maven.c +1 -1
@@ -1266,7 +1266,7 @@ static int maven_detect_client(struct i2c_adapter* adapter, int address, int kin ERROR4:;i2c_detach_client (new_client); ERROR3:; -kfree (new_client); +kfree (data); ERROR0:;return err; }
drivers/video/s3fb.c +9 -9
@@ -903,13 +903,13 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i/* Prepare PCI device */ rc =pci_enable_device (dev);if (rc <0 ) { -dev_err (info->dev,"cannot enable PCI device\n" ); +dev_err (info->device,"cannot enable PCI device\n" ); goto err_enable_device; } rc =pci_request_regions (dev,"s3fb" );if (rc <0 ) { -dev_err (info->dev,"cannot reserve framebuffer region\n" ); +dev_err (info->device,"cannot reserve framebuffer region\n" ); goto err_request_regions; }
@@ -921,7 +921,7 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i info->screen_base =pci_iomap (dev,0 ,0 );if (! info->screen_base) { rc = -ENOMEM ; -dev_err (info->dev,"iomap for framebuffer failed\n" ); +dev_err (info->device,"iomap for framebuffer failed\n" ); goto err_iomap; }
@@ -965,19 +965,19 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i rc =fb_find_mode (&(info->var), info, mode_option,NULL ,0 ,NULL ,8 );if (! ((rc ==1 ) || (rc ==2 ))) { rc = -EINVAL ; -dev_err (info->dev,"mode %s not found\n" , mode_option); +dev_err (info->device,"mode %s not found\n" , mode_option); goto err_find_mode; } rc =fb_alloc_cmap (&info->cmap,256 ,0 );if (rc <0 ) { -dev_err (info->dev,"cannot allocate colormap\n" ); +dev_err (info->device,"cannot allocate colormap\n" ); goto err_alloc_cmap; } rc =register_framebuffer (info);if (rc <0 ) { -dev_err (info->dev,"cannot register framebuffer\n" ); +dev_err (info->device,"cannot register framebuffer\n" ); goto err_reg_fb; }
@@ -1053,7 +1053,7 @@ static int s3_pci_suspend(struct pci_dev* dev, pm_message_t state)struct fb_info *info =pci_get_drvdata (dev);struct s3fb_info *par = info->par; -dev_info (info->dev,"suspend\n" ); +dev_info (info->device,"suspend\n" );acquire_console_sem ();mutex_lock (&(par->open_lock));
@@ -1085,7 +1085,7 @@ static int s3_pci_resume(struct pci_dev* dev)struct s3fb_info *par = info->par;int err; -dev_info (info->dev,"resume\n" ); +dev_info (info->device,"resume\n" );acquire_console_sem ();mutex_lock (&(par->open_lock));
@@ -1102,7 +1102,7 @@ static int s3_pci_resume(struct pci_dev* dev)if (err) {mutex_unlock (&(par->open_lock));release_console_sem (); -dev_err (info->dev,"error %d enabling device for resume\n" , err); +dev_err (info->device,"error %d enabling device for resume\n" , err);return err; }pci_set_master (dev);
drivers/video/vt8623fb.c +10 -10
@@ -677,13 +677,13 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_devi rc =pci_enable_device (dev);if (rc <0 ) { -dev_err (info->dev,"cannot enable PCI device\n" ); +dev_err (info->device,"cannot enable PCI device\n" ); goto err_enable_device; } rc =pci_request_regions (dev,"vt8623fb" );if (rc <0 ) { -dev_err (info->dev,"cannot reserve framebuffer region\n" ); +dev_err (info->device,"cannot reserve framebuffer region\n" ); goto err_request_regions; }
@@ -696,14 +696,14 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_devi info->screen_base =pci_iomap (dev,0 ,0 );if (! info->screen_base) { rc = -ENOMEM ; -dev_err (info->dev,"iomap for framebuffer failed\n" ); +dev_err (info->device,"iomap for framebuffer failed\n" ); goto err_iomap_1; } par->mmio_base =pci_iomap (dev,1 ,0 );if (! par->mmio_base) { rc = -ENOMEM ; -dev_err (info->dev,"iomap for MMIO failed\n" ); +dev_err (info->device,"iomap for MMIO failed\n" ); goto err_iomap_2; }
@@ -714,7 +714,7 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_deviif ((16 <= memsize1) && (memsize1 <=64 ) && (memsize1 == memsize2)) info->screen_size = memsize1 <<20 ;else { -dev_err (info->dev,"memory size detection failed (%x %x), suppose 16 MB\n" , memsize1, memsize2); +dev_err (info->device,"memory size detection failed (%x %x), suppose 16 MB\n" , memsize1, memsize2); info->screen_size =16 <<20 ; }
@@ -731,19 +731,19 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_devi rc =fb_find_mode (&(info->var), info, mode_option,NULL ,0 ,NULL ,8 );if (! ((rc ==1 ) || (rc ==2 ))) { rc = -EINVAL ; -dev_err (info->dev,"mode %s not found\n" , mode_option); +dev_err (info->device,"mode %s not found\n" , mode_option); goto err_find_mode; } rc =fb_alloc_cmap (&info->cmap,256 ,0 );if (rc <0 ) { -dev_err (info->dev,"cannot allocate colormap\n" ); +dev_err (info->device,"cannot allocate colormap\n" ); goto err_alloc_cmap; } rc =register_framebuffer (info);if (rc <0 ) { -dev_err (info->dev,"cannot register framebugger\n" ); +dev_err (info->device,"cannot register framebugger\n" ); goto err_reg_fb; }
@@ -817,7 +817,7 @@ static int vt8623_pci_suspend(struct pci_dev* dev, pm_message_t state)struct fb_info *info =pci_get_drvdata (dev);struct vt8623fb_info *par = info->par; -dev_info (info->dev,"suspend\n" ); +dev_info (info->device,"suspend\n" );acquire_console_sem ();mutex_lock (&(par->open_lock));
@@ -848,7 +848,7 @@ static int vt8623_pci_resume(struct pci_dev* dev)struct fb_info *info =pci_get_drvdata (dev);struct vt8623fb_info *par = info->par; -dev_info (info->dev,"resume\n" ); +dev_info (info->device,"resume\n" );acquire_console_sem ();mutex_lock (&(par->open_lock));
fs/cifs/asn1.c +1 -1
@@ -400,7 +400,7 @@ asn1_oid_decode(struct asn1_ctx *ctx, size = eoc - ctx->pointer +1 ;/* first subid actually encodes first two subids */ -if (size <2 || size >ULONG_MAX /sizeof (unsigned long )) +if (size <2 || size >UINT_MAX /sizeof (unsigned long ))return 0 ; *oid =kmalloc (size *sizeof (unsigned long ),GFP_ATOMIC );
fs/cifs/cifs_spnego.c +11 -7
@@ -66,8 +66,8 @@ struct key_type cifs_spnego_key_type = { .describe = user_describe, }; -#define MAX_VER_STR_LEN 9/* length of longest version string e.g. -strlen(";ver=0xFF") */ +#define MAX_VER_STR_LEN 8/* length of longest version string e.g. +strlen("ver=0xFF") */ #define MAX_MECH_STR_LEN 13/* length of longest security mechanism name, eg in future could have strlen(";sec=ntlmsspi") */ #define MAX_IPV6_ADDR_LEN 42/* eg FEDC:BA98:7654:3210:FEDC:BA98:7654:3210/60 */
@@ -81,11 +81,15 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)struct key *spnego_key;const char *hostname = server->hostname; -/* BB: come up with better scheme for determining length */ -/* length of fields (with semicolons): ver=0xyz ipv4= ipaddress host= -hostname sec=mechanism uid=0x uid */ - desc_len =MAX_VER_STR_LEN +5 +MAX_IPV6_ADDR_LEN +1 +6 + -strlen (hostname) +MAX_MECH_STR_LEN +8 + (sizeof (uid_t) *2 ); +/* length of fields (with semicolons): ver=0xyz ip4=ipaddress +host=hostname sec=mechanism uid=0xFF user=username */ + desc_len =MAX_VER_STR_LEN + +6 /* len of "host=" */ +strlen (hostname) + +5 /* len of ";ipv4=" */ +MAX_IPV6_ADDR_LEN + +MAX_MECH_STR_LEN + +7 /* len of ";uid=0x" */ + (sizeof (uid_t) *2 ) + +6 /* len of ";user=" */ +strlen (sesInfo->userName) +1 ; + spnego_key =ERR_PTR (-ENOMEM ); description =kzalloc (desc_len,GFP_KERNEL );if (description ==NULL )
fs/cifs/cifsfs.c +2 -0
@@ -175,6 +175,8 @@ out_no_root:if (inode)iput (inode); +cifs_umount (sb, cifs_sb); + out_mount_failed:if (cifs_sb) {#ifdef CONFIG_CIFS_DFS_UPCALL
fs/cifs/inode.c +1 -0
@@ -649,6 +649,7 @@ struct inode *cifs_iget(struct super_block *sb, unsigned long ino) inode->i_fop = &simple_dir_operations; inode->i_uid = cifs_sb->mnt_uid; inode->i_gid = cifs_sb->mnt_gid; + }else if (rc) {_FreeXid (xid);iget_failed (inode);return ERR_PTR (rc);
include/asm-sparc64/futex.h +1 -1
@@ -59,7 +59,7 @@ static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr)__futex_cas_op ("or\t%2, %4, %1" , ret, oldval, uaddr, oparg);break ;case FUTEX_OP_ANDN : -__futex_cas_op ("and\t%2, %4, %1" , ret, oldval, uaddr, oparg); +__futex_cas_op ("andn\t%2, %4, %1" , ret, oldval, uaddr, oparg);break ;case FUTEX_OP_XOR :__futex_cas_op ("xor\t%2, %4, %1" , ret, oldval, uaddr, oparg);
include/asm-sparc64/irq.h +4 -0
@@ -90,4 +90,8 @@ static inline unsigned long get_softint(void) return retval; } +extern void *hardirq_stack[NR_CPUS ]; +extern void *softirq_stack[NR_CPUS ]; +#define __ARCH_HAS_DO_SOFTIRQ +#endif
include/asm-sparc64/ptrace.h +4 -4
@@ -134,9 +134,9 @@ struct global_reg_snapshot {unsigned long tnpc;unsigned long o7;unsigned long i7; +unsigned long rpc;struct thread_info *thread;unsigned long pad1; -unsigned long pad2; };#define __ARCH_WANT_COMPAT_SYS_PTRACE
@@ -314,9 +314,9 @@ extern void __show_regs(struct pt_regs *);#define GR_SNAP_TNPC 0x10#define GR_SNAP_O7 0x18#define GR_SNAP_I7 0x20 -#define GR_SNAP_THREAD 0x28 -#define GR_SNAP_PAD1 0x30 -#define GR_SNAP_PAD2 0x38 +#define GR_SNAP_RPC 0x28 +#define GR_SNAP_THREAD 0x30 +#define GR_SNAP_PAD1 0x38#endif /* __KERNEL__ */
include/asm-x86/i387.h +32 -0
@@ -13,6 +13,7 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/regset.h> +#include <linux/hardirq.h> #include <asm/asm.h> #include <asm/processor.h> #include <asm/sigcontext.h>
@@ -290,6 +291,37 @@ static inline void kernel_fpu_end(void)preempt_enable (); } +/* +* Some instructions like VIA's padlock instructions generate a spurious +* DNA fault but don't modify SSE registers. And these instructions +* get used from interrupt context aswell. To prevent these kernel instructions +* in interrupt context interact wrongly with other user/kernel fpu usage, we +* should use them only in the context of irq_ts_save/restore() +*/ +static inline int irq_ts_save (void ) +{ +/* +* If we are in process context, we are ok to take a spurious DNA fault. +* Otherwise, doing clts() in process context require pre-emption to +* be disabled or some heavy lifting like kernel_fpu_begin() +*/ +if (!in_interrupt ()) +return 0 ; + +if (read_cr0 () &X86_CR0_TS ) { +clts (); +return 1 ; + } + +return 0 ; +} + +static inline void irq_ts_restore (int TS_state) +{ +if (TS_state) +stts (); +} +#ifdef CONFIG_X86_64 static inline void save_init_fpu (struct task_struct *tsk)
include/asm-x86/spinlock.h +2 -2
@@ -65,7 +65,7 @@ static inline int __raw_spin_is_contended(raw_spinlock_t *lock) {int tmp =ACCESS_ONCE (lock->slock); -return (((tmp >>8 ) &0xff ) - (tmp &0xff )) >1 ; +return (((tmp >>8 ) - tmp) &0xff ) >1 ; } static __always_inline void __raw_spin_lock(raw_spinlock_t *lock)
@@ -129,7 +129,7 @@ static inline int __raw_spin_is_contended(raw_spinlock_t *lock) {int tmp =ACCESS_ONCE (lock->slock); -return (((tmp >>16 ) &0xffff ) - (tmp &0xffff )) >1 ; +return (((tmp >>16 ) - tmp) &0xffff ) >1 ; } static __always_inline void __raw_spin_lock(raw_spinlock_t *lock)
include/linux/usb/serial.h +2 -1
@@ -17,7 +17,8 @@#include <linux/mutex.h> #define SERIAL_TTY_MAJOR 188/* Nice legal number now */ -#define SERIAL_TTY_MINORS 255/* loads of devices :) */ +#define SERIAL_TTY_MINORS 254/* loads of devices :) */ +#define SERIAL_TTY_NO_MINOR 255/* No minor was assigned */ /* The maximum number of ports one device can grab at once */ #define MAX_NUM_PORTS 8
include/video/radeon.h +7 -2
@@ -527,8 +527,9 @@/* DSTCACHE_CTLSTAT bit constants */ -#define RB2D_DC_FLUSH (3 << 0) -#define RB2D_DC_FLUSH_ALL 0xf +#define RB2D_DC_FLUSH_2D (1 << 0) +#define RB2D_DC_FREE_2D (1 << 2) +#define RB2D_DC_FLUSH_ALL (RB2D_DC_FLUSH_2D | RB2D_DC_FREE_2D)#define RB2D_DC_BUSY (1 << 31)
@@ -741,6 +742,10 @@#define SOFT_RESET_RB (1 << 6)#define SOFT_RESET_HDP (1 << 7) +/* WAIT_UNTIL bit constants */ +#define WAIT_DMA_GUI_IDLE (1 << 9) +#define WAIT_2D_IDLECLEAN (1 << 16) +/* SURFACE_CNTL bit consants */ #define SURF_TRANSLATION_DIS (1 << 8)#define NONSURF_AP0_SWP_16BPP (1 << 20)
kernel/posix-timers.c +14 -5
@@ -289,21 +289,29 @@ void do_schedule_next_timer(struct siginfo *info)else schedule_next_timer (timr); - info->si_overrun = timr->it_overrun_last; + info->si_overrun += timr->it_overrun_last; }if (timr)unlock_timer (timr, flags); } -int posix_timer_event (struct k_itimer *timr,int si_private) +int posix_timer_event (struct k_itimer *timr,int si_private) { -memset (&timr->sigq->info,0 ,sizeof (siginfo_t)); +/* +* FIXME: if ->sigq is queued we can race with +* dequeue_signal()->do_schedule_next_timer(). +* +* If dequeue_signal() sees the "right" value of +* si_sys_private it calls do_schedule_next_timer(). +* We re-queue ->sigq and drop ->it_lock(). +* do_schedule_next_timer() locks the timer +* and re-schedules it while ->sigq is pending. +* Not really bad, but not that we want. +*/ timr->sigq->info.si_sys_private = si_private; -/* Send signal to the process that owns this timer.*/ timr->sigq->info.si_signo = timr->it_sigev_signo; - timr->sigq->info.si_errno =0 ; timr->sigq->info.si_code =SI_TIMER ; timr->sigq->info.si_tid = timr->it_id; timr->sigq->info.si_value = timr->it_sigev_value;
@@ -435,6 +443,7 @@ static struct k_itimer * alloc_posix_timer(void)kmem_cache_free (posix_timers_cache, tmr); tmr =NULL ; } +memset (&tmr->sigq->info,0 ,sizeof (siginfo_t));return tmr; }
kernel/relay.c +11 -1
@@ -832,6 +832,10 @@ static void relay_file_read_consume(struct rchan_buf *buf,size_t n_subbufs = buf->chan->n_subbufs;size_t read_subbuf; +if (buf->subbufs_produced == buf->subbufs_consumed && + buf->offset == buf->bytes_consumed) +return ; +if (buf->bytes_consumed + bytes_consumed > subbuf_size) {relay_subbufs_consumed (buf->chan, buf->cpu,1 ); buf->bytes_consumed =0 ;
@@ -863,6 +867,8 @@ static int relay_file_read_avail(struct rchan_buf *buf, size_t read_pos)relay_file_read_consume (buf, read_pos,0 ); + consumed = buf->subbufs_consumed; +if (unlikely (buf->offset > subbuf_size)) {if (produced == consumed)return 0 ;
@@ -881,8 +887,12 @@ static int relay_file_read_avail(struct rchan_buf *buf, size_t read_pos)if (consumed > produced) produced += n_subbufs * subbuf_size; -if (consumed == produced) +if (consumed == produced) { +if (buf->offset == subbuf_size && + buf->subbufs_produced > buf->subbufs_consumed) +return 1 ;return 0 ; + }return 1 ; }
kernel/signal.c +1 -0
@@ -1319,6 +1319,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group) q->info.si_overrun++; goto out; } + q->info.si_overrun =0 ;signalfd_notify (t, sig); pending = group ? &t->signal->shared_pending : &t->pending;
lib/random32.c +27 -21
77 lines not on this page · raw message
mm/memory.c +13 -3
@@ -2748,16 +2748,26 @@ int make_pages_present(unsigned long addr, unsigned long end) vma =find_vma (current->mm, addr);if (!vma) -return -1 ; +return -ENOMEM ; write = (vma->vm_flags &VM_WRITE ) !=0 ;BUG_ON (addr >= end);BUG_ON (end > vma->vm_end); len =DIV_ROUND_UP (end,PAGE_SIZE ) - addr/PAGE_SIZE ; ret =get_user_pages (current, current->mm, addr, len, write,0 ,NULL ,NULL ); -if (ret <0 ) +if (ret <0 ) { +/* +SUS require strange return value to mlock +- invalid addr generate to ENOMEM. +- out of memory should generate EAGAIN. +*/ +if (ret == -EFAULT ) + ret = -ENOMEM ; +else if (ret == -ENOMEM ) + ret = -EAGAIN ;return ret; -return ret == len ?0 :-1 ; + } +return ret == len ?0 : -ENOMEM ; }#if !defined(__HAVE_ARCH_GATE_AREA)
mm/mlock.c +0 -2
@@ -78,8 +78,6 @@ success: mm->locked_vm -= pages; out: -if (ret == -ENOMEM ) - ret = -EAGAIN ;return ret; }
net/dccp/proto.c +5 -0
@@ -476,6 +476,11 @@ static int dccp_setsockopt_change(struct sock *sk, int type,if (copy_from_user (&opt, optval,sizeof (opt)))return -EFAULT ; +/* +* rfc4340: 6.1. Change Options +*/ +if (opt.dccpsf_len <1 ) +return -EINVAL ; val =kmalloc (opt.dccpsf_len,GFP_KERNEL );if (!val)
net/ipv4/ipvs/ip_vs_est.c +5 -2
@@ -172,8 +172,11 @@ void ip_vs_kill_estimator(struct ip_vs_stats *stats)kfree (est); killed++; } -if (killed && est_list ==NULL ) -del_timer_sync (&est_timer); +while (killed && !est_list &&try_to_del_timer_sync (&est_timer) <0 ) { +write_unlock_bh (&est_lock); +cpu_relax (); +write_lock_bh (&est_lock); + }write_unlock_bh (&est_lock); }
net/ipv4/syncookies.c +1 -0
@@ -301,6 +301,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, ireq->rmt_port = th->source; ireq->loc_addr =ip_hdr (skb)->daddr; ireq->rmt_addr =ip_hdr (skb)->saddr; + ireq->ecn_ok =0 ; ireq->snd_wscale = tcp_opt.snd_wscale; ireq->rcv_wscale = tcp_opt.rcv_wscale; ireq->sack_ok = tcp_opt.sack_ok;
net/ipv6/ip6_output.c +4 -0
@@ -231,6 +231,10 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,skb_reset_network_header (skb); hdr =ipv6_hdr (skb); +/* Allow local fragmentation. */ +if (ipfragok) + skb->local_df =1 ; +/* * Fill in the IPv6 header */
net/ipv6/syncookies.c +1 -0
@@ -223,6 +223,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) req->expires =0UL ; req->retrans =0 ; + ireq->ecn_ok =0 ; ireq->snd_wscale = tcp_opt.snd_wscale; ireq->rcv_wscale = tcp_opt.rcv_wscale; ireq->sack_ok = tcp_opt.sack_ok;
sound/soc/fsl/fsl_dma.c +130 -112
310 lines not on this page · raw message
sound/soc/fsl/fsl_ssi.c +64 -10
115 lines not on this page · raw message