Linux 2.6.32.22
Subsystems (54)
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 32 -EXTRAVERSION = .21 +EXTRAVERSION = .22 NAME = Man-Eating Seals of Antiquity # *DOCUMENTATION*
arch/arm/kernel/entry-common.S +2 -0
@@ -382,11 +382,13 @@ ENDPROC(sys_clone_wrapper) sys_sigreturn_wrapper: add r0, sp, #S_OFF + mov why, #0 @ prevent syscall restart handling b sys_sigreturn ENDPROC(sys_sigreturn_wrapper) sys_rt_sigreturn_wrapper: add r0, sp, #S_OFF + mov why, #0 @ prevent syscall restart handling b sys_rt_sigreturn ENDPROC(sys_rt_sigreturn_wrapper)
arch/ia64/include/asm/compat.h +1 -1
@@ -198,7 +198,7 @@ ptr_to_compat(void __user *uptr) }static __inline__void __user * -compat_alloc_user_space (long len) +arch_compat_alloc_user_space (long len) {struct pt_regs *regs =task_pt_regs (current);return (void __user *) (((regs->r12 &0xffffffff ) &-16 ) - len);
arch/ia64/kernel/msi_ia64.c +1 -1
@@ -25,7 +25,7 @@ static int ia64_set_msi_irq_affinity(unsigned int irq,if (irq_prepare_move (irq, cpu))return -1 ; -read_msi_msg (irq, &msg); +get_cached_msi_msg (irq, &msg); addr = msg.address_lo; addr &=MSI_ADDR_DEST_ID_MASK ;
arch/ia64/sn/kernel/msi_sn.c +1 -1
@@ -174,7 +174,7 @@ static int sn_set_msi_irq_affinity(unsigned int irq,* Release XIO resources for the old MSI PCI address */ -read_msi_msg (irq, &msg); +get_cached_msi_msg (irq, &msg); sn_pdev = (struct pcidev_info *)sn_irq_info->irq_pciioinfo; pdev = sn_pdev->pdi_linux_pcidev; provider =SN_PCIDEV_BUSPROVIDER (pdev);
arch/mips/include/asm/compat.h +1 -1
@@ -144,7 +144,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr)return (u32 )(unsigned long )uptr; } -static inline void __user *compat_alloc_user_space (long len) +static inline void __user *arch_compat_alloc_user_space (long len) {struct pt_regs *regs = (struct pt_regs *) ((unsigned long )current_thread_info () +THREAD_SIZE -32 ) -1 ;
arch/parisc/include/asm/compat.h +1 -1
@@ -146,7 +146,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr)return (u32 )(unsigned long )uptr; } -static __inline__void __user *compat_alloc_user_space (long len) +static __inline__void __user *arch_compat_alloc_user_space (long len) {struct pt_regs *regs = ¤t->thread.regs;return (void __user *)regs->gr[30 ];
arch/powerpc/include/asm/compat.h +1 -1
@@ -133,7 +133,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr)return (u32 )(unsigned long )uptr; } -static inline void __user *compat_alloc_user_space (long len) +static inline void __user *arch_compat_alloc_user_space (long len) {struct pt_regs *regs = current->thread.regs;unsigned long usp = regs->gpr[1 ];
arch/s390/include/asm/compat.h +1 -1
@@ -180,7 +180,7 @@ static inline int is_compat_task(void)#endif -static inline void __user *compat_alloc_user_space (long len) +static inline void __user *arch_compat_alloc_user_space (long len) {unsigned long stack;
arch/sparc/include/asm/compat.h +1 -1
@@ -166,7 +166,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr)return (u32 )(unsigned long )uptr; } -static inline void __user *compat_alloc_user_space (long len) +static inline void __user *arch_compat_alloc_user_space (long len) {struct pt_regs *regs =current_thread_info ()->kregs;unsigned long usp = regs->u_regs[UREG_I6 ];
arch/x86/ia32/ia32entry.S +14 -8
@@ -50,7 +50,12 @@ /* * Reload arg registers from stack in case ptrace changed them. * We don't reload %eax because syscall_trace_enter() returned - * the value it wants us to use in the table lookup. + * the %rax value we should see. Instead, we just truncate that + * value to 32 bits again as we did on entry from user mode. + * If it's a new value set by user_regset during entry tracing, + * this matches the normal truncation of the user-mode value. + * If it's -1 to make us punt the syscall, then (u32)-1 is still + * an appropriately invalid value. */ .macro LOAD_ARGS32 offset, _r9=0 .if \_r9
@@ -60,6 +65,7 @@ movl \offset+48(%rsp),%edx movl \offset+56(%rsp),%esi movl \offset+64(%rsp),%edi + movl %eax,%eax /* zero extension */ .endm .macro CFI_STARTPROC32 simple
@@ -153,7 +159,7 @@ ENTRY(ia32_sysenter_target) testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10) CFI_REMEMBER_STATE jnz sysenter_tracesys - cmpl $(IA32_NR_syscalls-1),%eax + cmpq $(IA32_NR_syscalls-1),%rax ja ia32_badsys sysenter_do_call: IA32_ARG_FIXUP
@@ -195,7 +201,7 @@ sysexit_from_sys_call: movl $AUDIT_ARCH_I386,%edi /* 1st arg: audit arch */ call audit_syscall_entry movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall number */ - cmpl $(IA32_NR_syscalls-1),%eax + cmpq $(IA32_NR_syscalls-1),%rax ja ia32_badsys movl %ebx,%edi /* reload 1st syscall arg */ movl RCX-ARGOFFSET(%rsp),%esi /* reload 2nd syscall arg */
@@ -248,7 +254,7 @@ sysenter_tracesys: call syscall_trace_enter LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */ RESTORE_REST - cmpl $(IA32_NR_syscalls-1),%eax + cmpq $(IA32_NR_syscalls-1),%rax ja int_ret_from_sys_call /* sysenter_tracesys has set RAX(%rsp) */ jmp sysenter_do_call CFI_ENDPROC
@@ -314,7 +320,7 @@ ENTRY(ia32_cstar_target) testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10) CFI_REMEMBER_STATE jnz cstar_tracesys - cmpl $IA32_NR_syscalls-1,%eax + cmpq $IA32_NR_syscalls-1,%rax ja ia32_badsys cstar_do_call: IA32_ARG_FIXUP 1
@@ -367,7 +373,7 @@ cstar_tracesys: LOAD_ARGS32 ARGOFFSET, 1 /* reload args from stack in case ptrace changed it */ RESTORE_REST xchgl %ebp,%r9d - cmpl $(IA32_NR_syscalls-1),%eax + cmpq $(IA32_NR_syscalls-1),%rax ja int_ret_from_sys_call /* cstar_tracesys has set RAX(%rsp) */ jmp cstar_do_call END(ia32_cstar_target)
@@ -425,7 +431,7 @@ ENTRY(ia32_syscall) orl $TS_COMPAT,TI_status(%r10) testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10) jnz ia32_tracesys - cmpl $(IA32_NR_syscalls-1),%eax + cmpq $(IA32_NR_syscalls-1),%rax ja ia32_badsys ia32_do_call: IA32_ARG_FIXUP
@@ -444,7 +450,7 @@ ia32_tracesys: call syscall_trace_enter LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */ RESTORE_REST - cmpl $(IA32_NR_syscalls-1),%eax + cmpq $(IA32_NR_syscalls-1),%rax ja int_ret_from_sys_call /* ia32_tracesys has set RAX(%rsp) */ jmp ia32_do_call END(ia32_syscall)
arch/x86/include/asm/compat.h +1 -1
@@ -204,7 +204,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr)return (u32 )(unsigned long )uptr; } -static inline void __user *compat_alloc_user_space (long len) +static inline void __user *arch_compat_alloc_user_space (long len) {struct pt_regs *regs =task_pt_regs (current);return (void __user *)regs->sp - len;
arch/x86/include/asm/tsc.h +2 -0
@@ -59,5 +59,7 @@ extern void check_tsc_sync_source(int cpu);extern void check_tsc_sync_target (void );extern int notsc_setup (char *); +extern void save_sched_clock_state (void ); +extern void restore_sched_clock_state (void );#endif /* _ASM_X86_TSC_H */
arch/x86/kernel/apic/io_apic.c +1 -1
@@ -3338,7 +3338,7 @@ static int set_msi_irq_affinity(unsigned int irq, const struct cpumask *mask) cfg = desc->chip_data; -read_msi_msg_desc (desc, &msg); +get_cached_msi_msg_desc (desc, &msg); msg.data &= ~MSI_DATA_VECTOR_MASK ; msg.data |=MSI_DATA_VECTOR (cfg->vector);
arch/x86/kernel/tsc.c +38 -0
@@ -626,6 +626,44 @@ static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)local_irq_restore (flags); } +static unsigned long long cyc2ns_suspend; + +void save_sched_clock_state (void ) +{ +if (!sched_clock_stable) +return ; + + cyc2ns_suspend =sched_clock (); +} + +/* +* Even on processors with invariant TSC, TSC gets reset in some the +* ACPI system sleep states. And in some systems BIOS seem to reinit TSC to +* arbitrary value (still sync'd across cpu's) during resume from such sleep +* states. To cope up with this, recompute the cyc2ns_offset for each cpu so +* that sched_clock() continues from the point where it was left off during +* suspend. +*/ +void restore_sched_clock_state (void ) +{ +unsigned long long offset; +unsigned long flags; +int cpu; + +if (!sched_clock_stable) +return ; + +local_irq_save (flags); + +__get_cpu_var (cyc2ns_offset) =0 ; + offset = cyc2ns_suspend -sched_clock (); + +for_each_possible_cpu (cpu) +per_cpu (cyc2ns_offset, cpu) = offset; + +local_irq_restore (flags); +} +#ifdef CONFIG_CPU_FREQ /* Frequency scaling support. Adjust the TSC based timer when the cpu frequency
arch/x86/oprofile/nmi_int.c +17 -5
@@ -518,8 +518,13 @@ static int __init init_sysfs(void)int error; error =sysdev_class_register (&oprofile_sysclass); -if (!error) - error =sysdev_register (&device_oprofile); +if (error) +return error; + + error =sysdev_register (&device_oprofile); +if (error) +sysdev_class_unregister (&oprofile_sysclass); +return error; }
@@ -530,8 +535,10 @@ static void exit_sysfs(void) }#else -#define init_sysfs () do { } while (0) -#define exit_sysfs () do { } while (0) + +static inline int init_sysfs (void ) {return 0 ; } +static inline void exit_sysfs (void ) { } +#endif /* CONFIG_PM */ static int __init p4_init (char **cpu_type)
@@ -645,6 +652,8 @@ int __init op_nmi_init(struct oprofile_operations *ops)char *cpu_type =NULL ;int ret =0 ; + using_nmi =0 ; +if (!cpu_has_apic)return -ENODEV ;
@@ -727,7 +736,10 @@ int __init op_nmi_init(struct oprofile_operations *ops)mux_init (ops); -init_sysfs (); + ret =init_sysfs (); +if (ret) +return ret; + using_nmi =1 ;printk (KERN_INFO "oprofile: using NMI interrupt.\n" );return 0 ;
arch/x86/power/cpu.c +2 -0
@@ -112,6 +112,7 @@ static void __save_processor_state(struct saved_context *ctxt)void save_processor_state (void ) {__save_processor_state (&saved_context); +save_sched_clock_state (); }#ifdef CONFIG_X86_32 EXPORT_SYMBOL (save_processor_state);
@@ -253,6 +254,7 @@ static void __restore_processor_state(struct saved_context *ctxt)void restore_processor_state (void ) {__restore_processor_state (&saved_context); +restore_sched_clock_state (); }#ifdef CONFIG_X86_32 EXPORT_SYMBOL (restore_processor_state);
drivers/ata/libata-core.c +13 -1
@@ -5504,6 +5504,7 @@ static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg,*/ int ata_host_suspend (struct ata_host *host,pm_message_t mesg) { +unsigned int ehi_flags =ATA_EHI_QUIET ;int rc;/*
@@ -5512,7 +5513,18 @@ int ata_host_suspend(struct ata_host *host, pm_message_t mesg)*/ ata_lpm_enable (host); - rc =ata_host_request_pm (host, mesg,0 ,ATA_EHI_QUIET ,1 ); +/* +* On some hardware, device fails to respond after spun down +* for suspend. As the device won't be used before being +* resumed, we don't need to touch the device. Ask EH to skip +* the usual stuff and proceed directly to suspend. +* +* http://thread.gmane.org/gmane.linux.ide/46764 +*/ +if (mesg.event ==PM_EVENT_SUSPEND ) + ehi_flags |=ATA_EHI_NO_AUTOPSY |ATA_EHI_NO_RECOVERY ; + + rc =ata_host_request_pm (host, mesg,0 , ehi_flags,1 );if (rc ==0 ) host->dev->power.power_state = mesg;return rc;
drivers/ata/libata-eh.c +4 -0
@@ -3149,6 +3149,10 @@ static int ata_eh_skip_recovery(struct ata_link *link)if (link->flags &ATA_LFLAG_DISABLED )return 1 ; +/* skip if explicitly requested */ +if (ehc->i.flags &ATA_EHI_NO_RECOVERY ) +return 1 ; +/* thaw frozen port and recover failed devices */ if ((ap->pflags &ATA_PFLAG_FROZEN ) ||ata_link_nr_enabled (link))return 0 ;
drivers/ata/sata_mv.c +37 -7
82 lines not on this page · raw message
drivers/gpu/drm/drm_crtc_helper.c +2 -2
@@ -925,13 +925,13 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) mode_changed = true;if (mode_changed) { - old_fb = set->crtc->fb; - set->crtc->fb = set->fb; set->crtc->enabled = (set->mode !=NULL );if (set->mode !=NULL ) {DRM_DEBUG_KMS ("attempting to set mode from" " userspace\n" );drm_mode_debug_printmodeline (set->mode); + old_fb = set->crtc->fb; + set->crtc->fb = set->fb;if (!drm_crtc_helper_set_mode (set->crtc, set->mode, set->x, set->y, old_fb)) {
drivers/gpu/drm/i915/i915_dma.c +9 -3
@@ -683,8 +683,10 @@ static int i915_batchbuffer(struct drm_device *dev, void *data, ret =copy_from_user (cliprects, batch->cliprects, batch->num_cliprects *sizeof (struct drm_clip_rect )); -if (ret !=0 ) +if (ret !=0 ) { + ret = -EFAULT ; goto fail_free; + } }mutex_lock (&dev->struct_mutex);
@@ -725,8 +727,10 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data,return -ENOMEM ; ret =copy_from_user (batch_data, cmdbuf->buf, cmdbuf->sz); -if (ret !=0 ) +if (ret !=0 ) { + ret = -EFAULT ; goto fail_batch_free; + }if (cmdbuf->num_cliprects) { cliprects = kcalloc(cmdbuf->num_cliprects,
@@ -737,8 +741,10 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data, ret =copy_from_user (cliprects, cmdbuf->cliprects, cmdbuf->num_cliprects *sizeof (struct drm_clip_rect )); -if (ret !=0 ) +if (ret !=0 ) { + ret = -EFAULT ; goto fail_clip_free; + } }mutex_lock (&dev->struct_mutex);
drivers/gpu/drm/i915/i915_gem.c +1 -0
@@ -3667,6 +3667,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,if (ret !=0 ) {DRM_ERROR ("copy %d cliprects failed: %d\n" , args->num_cliprects, ret); + ret = -EFAULT ; goto pre_mutex_err; } }
drivers/gpu/drm/i915/intel_display.c +4 -1
@@ -1954,6 +1954,9 @@ static void intel_crtc_dpms(struct drm_crtc *crtc, int mode)int pipe = intel_crtc->pipe;bool enabled; +if (intel_crtc->dpms_mode == mode) +return ; + dev_priv->display.dpms (crtc, mode); intel_crtc->dpms_mode = mode;
@@ -4000,7 +4003,7 @@ static void intel_crtc_init(struct drm_device *dev, int pipe) } intel_crtc->cursor_addr =0 ; - intel_crtc->dpms_mode =DRM_MODE_DPMS_OFF ; + intel_crtc->dpms_mode =-1 ;drm_crtc_helper_add (&intel_crtc->base, &intel_helper_funcs); intel_crtc->busy = false;
drivers/hid/usbhid/hid-core.c +8 -10
@@ -1000,16 +1000,6 @@ static int usbhid_start(struct hid_device *hid) } } -init_waitqueue_head (&usbhid->wait); -INIT_WORK (&usbhid->reset_work, hid_reset); -INIT_WORK (&usbhid->restart_work, __usbhid_restart_queues); -setup_timer (&usbhid->io_retry, hid_retry_timeout, (unsigned long ) hid); - -spin_lock_init (&usbhid->lock); - - usbhid->intf = intf; - usbhid->ifnum = interface->desc.bInterfaceNumber; - usbhid->urbctrl =usb_alloc_urb (0 ,GFP_KERNEL );if (!usbhid->urbctrl) { ret = -ENOMEM ;
@@ -1180,6 +1170,14 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id * hid->driver_data = usbhid; usbhid->hid = hid; + usbhid->intf = intf; + usbhid->ifnum = interface->desc.bInterfaceNumber; + +init_waitqueue_head (&usbhid->wait); +INIT_WORK (&usbhid->reset_work, hid_reset); +INIT_WORK (&usbhid->restart_work, __usbhid_restart_queues); +setup_timer (&usbhid->io_retry, hid_retry_timeout, (unsigned long ) hid); +spin_lock_init (&usbhid->lock); ret =hid_add_device (hid);if (ret) {
drivers/hwmon/f75375s.c +3 -3
@@ -79,7 +79,7 @@ I2C_CLIENT_INSMOD_2(f75373, f75375);#define F75375_REG_PWM2_DROP_DUTY 0x6C#define FAN_CTRL_LINEAR (nr) (4 + nr) -#define FAN_CTRL_MODE (nr) (5 + ((nr) * 2)) +#define FAN_CTRL_MODE (nr) (4 + ((nr) * 2))/* * Data structures and manipulation thereof
@@ -298,7 +298,7 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val)return -EINVAL ; fanmode =f75375_read8 (client,F75375_REG_FAN_TIMER ); - fanmode = ~(3 <<FAN_CTRL_MODE (nr)); + fanmode &= ~(3 <<FAN_CTRL_MODE (nr));switch (val) {case 0 :/* Full speed */
@@ -350,7 +350,7 @@ static ssize_t set_pwm_mode(struct device *dev, struct device_attribute *attr,mutex_lock (&data->update_lock); conf =f75375_read8 (client,F75375_REG_CONFIG1 ); - conf = ~(1 <<FAN_CTRL_LINEAR (nr)); + conf &= ~(1 <<FAN_CTRL_LINEAR (nr));if (val ==0 ) conf |= (1 <<FAN_CTRL_LINEAR (nr)) ;
drivers/hwmon/k8temp.c +32 -3
@@ -143,6 +143,37 @@ static struct pci_device_id k8temp_ids[] = {MODULE_DEVICE_TABLE (pci, k8temp_ids); +static int __devinit is_rev_g_desktop (u8 model) +{ +u32 brandidx; + +if (model <0x69 ) +return 0 ; + +if (model ==0xc1 || model ==0x6c || model ==0x7c ) +return 0 ; + +/* +* Differentiate between AM2 and ASB1. +* See "Constructing the processor Name String" in "Revision +* Guide for AMD NPT Family 0Fh Processors" (33610). +*/ + brandidx =cpuid_ebx (0x80000001 ); + brandidx = (brandidx >>9 ) &0x1f ; + +/* Single core */ +if ((model ==0x6f || model ==0x7f ) && + (brandidx ==0x7 || brandidx ==0x9 || brandidx ==0xc )) +return 0 ; + +/* Dual core */ +if (model ==0x6b && + (brandidx ==0xb || brandidx ==0xc )) +return 0 ; + +return 1 ; +} +static int __devinit k8temp_probe (struct pci_dev *pdev,const struct pci_device_id *id) {
@@ -179,9 +210,7 @@ static int __devinit k8temp_probe(struct pci_dev *pdev, "wrong - check erratum #141\n"); } -if ((model >=0x69 ) && - !(model ==0xc1 || model ==0x6c || model ==0x7c || - model ==0x6b || model ==0x6f || model ==0x7f )) { +if (is_rev_g_desktop (model)) {/* * RevG desktop CPUs (i.e. no socket S1G1 or * ASB1 parts) need additional offset,
drivers/input/serio/i8042.c +1 -1
@@ -1412,8 +1412,8 @@ static int __init i8042_init(void) static void __exit i8042_exit(void) { -platform_driver_unregister (&i8042_driver);platform_device_unregister (i8042_platform_device); +platform_driver_unregister (&i8042_driver);i8042_platform_exit (); panic_blink =NULL ;
drivers/mmc/host/tmio_mmc.c +4 -3
@@ -161,6 +161,7 @@ tmio_mmc_start_command(struct tmio_mmc_host *host, struct mmc_command *cmd)static inline void tmio_mmc_pio_irq (struct tmio_mmc_host *host) {struct mmc_data *data = host->data; +void *sg_virt;unsigned short *buf;unsigned int count;unsigned long flags;
@@ -170,8 +171,8 @@ static inline void tmio_mmc_pio_irq(struct tmio_mmc_host *host)return ; } - buf = (unsigned short *)(tmio_mmc_kmap_atomic (host, &flags) + - host->sg_off); + sg_virt =tmio_mmc_kmap_atomic (host->sg_ptr, &flags); + buf = (unsigned short *)(sg_virt + host->sg_off); count = host->sg_ptr->length - host->sg_off;if (count > data->blksz)
@@ -188,7 +189,7 @@ static inline void tmio_mmc_pio_irq(struct tmio_mmc_host *host) host->sg_off += count; -tmio_mmc_kunmap_atomic (host, &flags); +tmio_mmc_kunmap_atomic (sg_virt, &flags);if (host->sg_off == host->sg_ptr->length)tmio_mmc_next_sg (host);
drivers/mmc/host/tmio_mmc.h +4 -9
@@ -102,10 +102,7 @@#define ack_mmc_irqs (host, i) \ do { \ - u32 mask;\ - mask = sd_ctrl_read32((host), CTL_STATUS); \ - mask &= ~((i) & TMIO_MASK_IRQ); \ - sd_ctrl_write32((host), CTL_STATUS, mask); \ + sd_ctrl_write32((host), CTL_STATUS, ~(i)); \ } while (0)
@@ -200,19 +197,17 @@ static inline int tmio_mmc_next_sg(struct tmio_mmc_host *host)return --host->sg_len; } -static inline char *tmio_mmc_kmap_atomic (struct tmio_mmc_host *host, +static inline char *tmio_mmc_kmap_atomic (struct scatterlist *sg,unsigned long *flags) { -struct scatterlist *sg = host->sg_ptr; -local_irq_save (*flags);return kmap_atomic (sg_page (sg),KM_BIO_SRC_IRQ ) + sg->offset; } -static inline void tmio_mmc_kunmap_atomic (struct tmio_mmc_host *host, +static inline void tmio_mmc_kunmap_atomic (void *virt,unsigned long *flags) { -kunmap_atomic (sg_page (host->sg_ptr),KM_BIO_SRC_IRQ ); +kunmap_atomic (virt,KM_BIO_SRC_IRQ );local_irq_restore (*flags); }
drivers/net/tun.c +2 -1
@@ -1006,7 +1006,8 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)if (err <0 ) goto err_free_sk; -if (device_create_file (&tun->dev->dev, &dev_attr_tun_flags) || +if (!net_eq (dev_net (tun->dev), &init_net) || +device_create_file (&tun->dev->dev, &dev_attr_tun_flags) ||device_create_file (&tun->dev->dev, &dev_attr_owner) ||device_create_file (&tun->dev->dev, &dev_attr_group))printk (KERN_ERR "Failed to create tun sysfs files\n" );
drivers/net/wireless/ath/ath5k/base.c +4 -0
@@ -1288,6 +1288,10 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf, PCI_DMA_TODEVICE); rate =ieee80211_get_tx_rate (sc->hw, info); +if (!rate) { + ret = -EINVAL ; + goto err_unmap; + }if (info->flags &IEEE80211_TX_CTL_NO_ACK ) flags |=AR5K_TXDESC_NOACK ;
drivers/net/wireless/ath/ath9k/eeprom.h +1 -1
@@ -60,7 +60,7 @@#define SD_NO_CTL 0xE0#define NO_CTL 0xff -#define CTL_MODE_M 7 +#define CTL_MODE_M 0xf#define CTL_11A 0#define CTL_11B 1#define CTL_11G 2
drivers/net/wireless/ath/regd.h +0 -1
@@ -31,7 +31,6 @@ enum ctl_group {#define NO_CTL 0xff#define SD_NO_CTL 0xE0#define NO_CTL 0xff -#define CTL_MODE_M 7#define CTL_11A 0#define CTL_11B 1#define CTL_11G 2
drivers/net/wireless/p54/txrx.c +1 -1
@@ -445,7 +445,7 @@ static void p54_rx_frame_sent(struct p54_common *priv, struct sk_buff *skb) }if (!(info->flags &IEEE80211_TX_CTL_NO_ACK ) && - (!payload->status)) + !(payload->status &P54_TX_FAILED )) info->flags |=IEEE80211_TX_STAT_ACK ;if (payload->status &P54_TX_PSM_CANCELLED ) info->flags |=IEEE80211_TX_STAT_TX_FILTERED ;
drivers/oprofile/buffer_sync.c +14 -13
@@ -140,16 +140,6 @@ static struct notifier_block module_load_nb = { .notifier_call = module_load_notify, }; - -static void end_sync (void ) -{ -end_cpu_work (); -/* make sure we don't leak task structs */ -process_task_mortuary (); -process_task_mortuary (); -} - -int sync_start (void ) {int err;
@@ -157,7 +147,7 @@ int sync_start(void)if (!zalloc_cpumask_var (&marked_cpus,GFP_KERNEL ))return -ENOMEM ; -start_cpu_work (); +mutex_lock (&buffer_mutex); err =task_handoff_register (&task_free_nb);if (err)
@@ -172,7 +162,10 @@ int sync_start(void)if (err) goto out4; +start_cpu_work (); + out: +mutex_unlock (&buffer_mutex);return err; out4:profile_event_unregister (PROFILE_MUNMAP , &munmap_nb);
@@ -181,7 +174,6 @@ out3: out2:task_handoff_unregister (&task_free_nb); out1: -end_sync ();free_cpumask_var (marked_cpus); goto out; }
@@ -189,11 +181,20 @@ out1:void sync_stop (void ) { +/* flush buffers */ +mutex_lock (&buffer_mutex); +end_cpu_work ();unregister_module_notifier (&module_load_nb);profile_event_unregister (PROFILE_MUNMAP , &munmap_nb);profile_event_unregister (PROFILE_TASK_EXIT , &task_exit_nb);task_handoff_unregister (&task_free_nb); -end_sync (); +mutex_unlock (&buffer_mutex); +flush_scheduled_work (); + +/* make sure we don't leak task structs */ +process_task_mortuary (); +process_task_mortuary (); +free_cpumask_var (marked_cpus); }
drivers/oprofile/cpu_buffer.c +0 -2
@@ -121,8 +121,6 @@ void end_cpu_work(void)cancel_delayed_work (&b->work); } - -flush_scheduled_work (); }/*
drivers/pci/msi.c +26 -1
@@ -195,6 +195,9 @@ void unmask_msi_irq(unsigned int irq)void read_msi_msg_desc (struct irq_desc *desc,struct msi_msg *msg) {struct msi_desc *entry =get_irq_desc_msi (desc); + +BUG_ON (entry->dev->current_state !=PCI_D0 ); +if (entry->msi_attrib.is_msix) {void __iomem *base = entry->mask_base + entry->msi_attrib.entry_nr *PCI_MSIX_ENTRY_SIZE ;
@@ -228,10 +231,32 @@ void read_msi_msg(unsigned int irq, struct msi_msg *msg)read_msi_msg_desc (desc, msg); } +void get_cached_msi_msg_desc (struct irq_desc *desc,struct msi_msg *msg) +{ +struct msi_desc *entry =get_irq_desc_msi (desc); + +/* Assert that the cache is valid, assuming that +* valid messages are not all-zeroes. */ +BUG_ON (!(entry->msg.address_hi | entry->msg.address_lo | + entry->msg.data)); + + *msg = entry->msg; +} + +void get_cached_msi_msg (unsigned int irq,struct msi_msg *msg) +{ +struct irq_desc *desc =irq_to_desc (irq); + +get_cached_msi_msg_desc (desc, msg); +} +void write_msi_msg_desc (struct irq_desc *desc,struct msi_msg *msg) {struct msi_desc *entry =get_irq_desc_msi (desc); -if (entry->msi_attrib.is_msix) { + +if (entry->dev->current_state !=PCI_D0 ) { +/* Don't touch the hardware now */ + }else if (entry->msi_attrib.is_msix) {void __iomem *base; base = entry->mask_base + entry->msi_attrib.entry_nr *PCI_MSIX_ENTRY_SIZE ;
drivers/power/apm_power.c +1 -0
@@ -233,6 +233,7 @@ static int calculate_capacity(enum apm_source source) empty_design_prop =POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN ; now_prop =POWER_SUPPLY_PROP_ENERGY_NOW ; avg_prop =POWER_SUPPLY_PROP_ENERGY_AVG ; +break ;case SOURCE_VOLTAGE : full_prop =POWER_SUPPLY_PROP_VOLTAGE_MAX ; empty_prop =POWER_SUPPLY_PROP_VOLTAGE_MIN ;
drivers/staging/hv/RingBuffer.c +1 -1
@@ -192,7 +192,7 @@ Description:static inline u64 GetRingBufferIndices (RING_BUFFER_INFO * RingInfo) { -return ((u64 )RingInfo->RingBuffer->WriteIndex <<32 ) || RingInfo->RingBuffer->ReadIndex; +return (u64 )RingInfo->RingBuffer->WriteIndex <<32 ; }
drivers/staging/hv/StorVscApi.h +2 -2
@@ -28,10 +28,10 @@#include "VmbusApi.h" /* Defines */ -#define STORVSC_RING_BUFFER_SIZE (10*PAGE_SIZE) +#define STORVSC_RING_BUFFER_SIZE (20*PAGE_SIZE)#define BLKVSC_RING_BUFFER_SIZE (20*PAGE_SIZE) -#define STORVSC_MAX_IO_REQUESTS 64 +#define STORVSC_MAX_IO_REQUESTS 128/* * In Hyper-V, each port/path/target maps to 1 scsi host adapter. In
drivers/staging/hv/netvsc_drv.c +3 -0
@@ -392,6 +392,9 @@ static const struct net_device_ops device_ops = { .ndo_start_xmit = netvsc_start_xmit, .ndo_get_stats = netvsc_get_stats, .ndo_set_multicast_list = netvsc_set_multicast_list, + .ndo_change_mtu = eth_change_mtu, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_mac_address = eth_mac_addr, };static int netvsc_probe (struct device *device)
drivers/staging/hv/storvsc_drv.c +6 -3
@@ -532,7 +532,7 @@ static unsigned int copy_to_bounce_buffer(struct scatterlist *orig_sgl,ASSERT (orig_sgl[i].offset + orig_sgl[i].length <=PAGE_SIZE ); -if (j ==0 ) +if (bounce_addr ==0 ) bounce_addr = (unsigned long )kmap_atomic (sg_page ((&bounce_sgl[j])),KM_IRQ0 );while (srclen) {
@@ -593,7 +593,7 @@ static unsigned int copy_from_bounce_buffer(struct scatterlist *orig_sgl, destlen = orig_sgl[i].length;ASSERT (orig_sgl[i].offset + orig_sgl[i].length <=PAGE_SIZE ); -if (j ==0 ) +if (bounce_addr ==0 ) bounce_addr = (unsigned long )kmap_atomic (sg_page ((&bounce_sgl[j])),KM_IRQ0 );while (destlen) {
@@ -652,6 +652,7 @@ static int storvsc_queuecommand(struct scsi_cmnd *scmnd,unsigned int request_size =0 ;int i;struct scatterlist *sgl; +unsigned int sg_count =0 ;DPRINT_ENTER (STORVSC_DRV );
@@ -736,6 +737,7 @@ static int storvsc_queuecommand(struct scsi_cmnd *scmnd, request->DataBuffer.Length =scsi_bufflen (scmnd);if (scsi_sg_count (scmnd)) { sgl = (struct scatterlist *)scsi_sglist (scmnd); + sg_count =scsi_sg_count (scmnd);/* check if we need to bounce the sgl */ if (do_bounce_buffer (sgl,scsi_sg_count (scmnd)) !=-1 ) {
@@ -770,11 +772,12 @@ static int storvsc_queuecommand(struct scsi_cmnd *scmnd, scsi_sg_count(scmnd)); sgl = cmd_request->bounce_sgl; + sg_count = cmd_request->bounce_sgl_count; } request->DataBuffer.Offset = sgl[0 ].offset; -for (i =0 ; i <scsi_sg_count (scmnd); i++) { +for (i =0 ; i < sg_count; i++) {DPRINT_DBG (STORVSC_DRV ,"sgl[%d] len %d offset %d \n" , i, sgl[i].length, sgl[i].offset); request->DataBuffer.PfnArray[i] =
drivers/usb/class/cdc-acm.c +83 -2
109 lines not on this page · raw message
drivers/usb/gadget/rndis.c +7 -3
@@ -291,9 +291,13 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,/* mandatory */ case OID_GEN_VENDOR_DESCRIPTION :pr_debug ("%s: OID_GEN_VENDOR_DESCRIPTION\n" , __func__); - length =strlen (rndis_per_dev_params [configNr].vendorDescr); -memcpy (outbuf, - rndis_per_dev_params [configNr].vendorDescr, length); +if ( rndis_per_dev_params [configNr].vendorDescr ) { + length =strlen (rndis_per_dev_params [configNr].vendorDescr); +memcpy (outbuf, + rndis_per_dev_params [configNr].vendorDescr, length); + }else { + outbuf[0 ] =0 ; + } retval =0 ;break ;
drivers/usb/host/ehci-ppc-of.c +7 -5
@@ -192,17 +192,19 @@ ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) } rv =usb_add_hcd (hcd, irq,0 ); -if (rv ==0 ) -return 0 ; +if (rv) + goto err_ehci; + +return 0 ; +err_ehci: +if (ehci->has_amcc_usb23) +iounmap (ehci->ohci_hcctrl_reg);iounmap (hcd->regs); err_ioremap:irq_dispose_mapping (irq); err_irq:release_mem_region (hcd->rsrc_start, hcd->rsrc_len); - -if (ehci->has_amcc_usb23) -iounmap (ehci->ohci_hcctrl_reg); err_rmr:usb_put_hcd (hcd);
drivers/usb/serial/cp210x.c +6 -4
@@ -90,6 +90,7 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x10C4, 0x8149) }, /* West Mountain Radio Computerized Battery Analyzer */ { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ + { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */ { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ { USB_DEVICE(0x10C4, 0x818B) }, /* AVIT Research USB to TTL */ { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */
@@ -111,6 +112,7 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */ { USB_DEVICE(0x10C4, 0x8411) }, /* Kyocera GPS Module */ { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */ + { USB_DEVICE(0x10C4, 0x8477) }, /* Balluff RFID */ { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xEA71) }, /* Infinity GPS-MIC-1 Radio Monophone */
@@ -124,14 +126,14 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x1555, 0x0004) }, /* Owen AC4 USB-RS485 Converter */ { USB_DEVICE(0x166A, 0x0303) }, /* Clipsal 5500PCU C-Bus USB interface */ { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */ - { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ - { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ - { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ - { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */ { USB_DEVICE(0x16DC, 0x0010) }, /* W-IE-NE-R Plein & Baus GmbH PL512 Power Supply */ { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */ { USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */ { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ + { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ + { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ + { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ + { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */ { } /* Terminating Entry */ };
drivers/usb/serial/ftdi_sio.c +8 -0
@@ -759,6 +759,14 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, SEGWAY_RMP200_PID) }, { USB_DEVICE(IONICS_VID, IONICS_PLUGCOMPUTER_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_24_MASTER_WING_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_PC_WING_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_USB_DMX_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MIDI_TIMECODE_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MINI_WING_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MAXI_WING_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MEDIA_WING_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_WING_PID) }, { }, /* Optional parameter entry */ { } /* Terminating entry */ };
drivers/usb/serial/ftdi_sio_ids.h +12 -0
@@ -135,6 +135,18 @@#define FTDI_NDI_AURORA_SCU_PID 0xDA74/* NDI Aurora SCU */ /* +* ChamSys Limited (www.chamsys.co.uk) USB wing/interface product IDs +*/ +#define FTDI_CHAMSYS_24_MASTER_WING_PID 0xDAF8 +#define FTDI_CHAMSYS_PC_WING_PID 0xDAF9 +#define FTDI_CHAMSYS_USB_DMX_PID 0xDAFA +#define FTDI_CHAMSYS_MIDI_TIMECODE_PID 0xDAFB +#define FTDI_CHAMSYS_MINI_WING_PID 0xDAFC +#define FTDI_CHAMSYS_MAXI_WING_PID 0xDAFD +#define FTDI_CHAMSYS_MEDIA_WING_PID 0xDAFE +#define FTDI_CHAMSYS_WING_PID 0xDAFF + +/* * Westrex International devices submitted by Cory Lee */ #define FTDI_WESTREX_MODEL_777_PID 0xDC00/* Model 777 */
drivers/usb/serial/mos7840.c +42 -13
110 lines not on this page · raw message
drivers/xen/events.c +16 -5
@@ -106,6 +106,7 @@ static inline unsigned long *cpu_evtchn_mask(int cpu)#define VALID_EVTCHN (chn) ((chn) != 0)static struct irq_chip xen_dynamic_chip; +static struct irq_chip xen_percpu_chip;/* Constructor for packed IRQ information. */ static struct irq_info mk_unbound_info (void )
@@ -362,7 +363,7 @@ int bind_evtchn_to_irq(unsigned int evtchn) irq =find_unbound_irq ();set_irq_chip_and_handler_name (irq, &xen_dynamic_chip, - handle_level_irq,"event" ); + handle_edge_irq,"event" ); evtchn_to_irq[evtchn] = irq; irq_info[irq] =mk_evtchn_info (evtchn);
@@ -388,8 +389,8 @@ static int bind_ipi_to_irq(unsigned int ipi, unsigned int cpu)if (irq <0 ) goto out; -set_irq_chip_and_handler_name (irq, &xen_dynamic_chip, - handle_level_irq,"ipi" ); +set_irq_chip_and_handler_name (irq, &xen_percpu_chip, + handle_percpu_irq,"ipi" ); bind_ipi.vcpu = cpu; if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_ipi,
@@ -429,8 +430,8 @@ static int bind_virq_to_irq(unsigned int virq, unsigned int cpu) irq =find_unbound_irq (); -set_irq_chip_and_handler_name (irq, &xen_dynamic_chip, - handle_level_irq,"virq" ); +set_irq_chip_and_handler_name (irq, &xen_percpu_chip, + handle_percpu_irq,"virq" ); evtchn_to_irq[evtchn] = irq; irq_info[irq] =mk_virq_info (evtchn, virq);
@@ -929,6 +930,16 @@ static struct irq_chip xen_dynamic_chip __read_mostly = { .retrigger = retrigger_dynirq, }; +static struct irq_chip en_percpu_chip__read_mostly = { + .name ="xen-percpu" , + + .disable = disable_dynirq, + .mask = disable_dynirq, + .unmask = enable_dynirq, + + .ack = ack_dynirq, +}; +void __init xen_init_IRQ (void ) {int i;
fs/binfmt_misc.c +1 -1
@@ -723,7 +723,7 @@ static int __init init_misc_binfmt(void) {int err =register_filesystem (&bm_fs_type);if (!err) { - err =register_binfmt (&misc_format); + err =insert_binfmt (&misc_format);if (err)unregister_filesystem (&bm_fs_type); }
fs/fuse/dev.c +12 -4
@@ -1158,6 +1158,14 @@ __acquires(&fc->lock) } } +static void end_queued_requests (struct fuse_conn *fc) +{ + fc->max_background =UINT_MAX ; +flush_bg_queue (fc); +end_requests (fc, &fc->pending); +end_requests (fc, &fc->processing); +} +/* * Abort all requests. *
@@ -1184,8 +1192,7 @@ void fuse_abort_conn(struct fuse_conn *fc) fc->connected =0 ; fc->blocked =0 ;end_io_requests (fc); -end_requests (fc, &fc->pending); -end_requests (fc, &fc->processing); +end_queued_requests (fc);wake_up_all (&fc->waitq);wake_up_all (&fc->blocked_waitq);kill_fasync (&fc->fasync,SIGIO ,POLL_IN );
@@ -1200,8 +1207,9 @@ int fuse_dev_release(struct inode *inode, struct file *file)if (fc) {spin_lock (&fc->lock); fc->connected =0 ; -end_requests (fc, &fc->pending); -end_requests (fc, &fc->processing); + fc->blocked =0 ; +end_queued_requests (fc); +wake_up_all (&fc->blocked_waitq);spin_unlock (&fc->lock);fuse_conn_put (fc); }
fs/nfs/client.c +1 -1
@@ -273,7 +273,7 @@ static int nfs_sockaddr_match_ipaddr6(const struct sockaddr *sa1, sin1->sin6_scope_id != sin2->sin6_scope_id)return 0 ; -return ipv6_addr_equal (&sin1->sin6_addr, &sin1->sin6_addr); +return ipv6_addr_equal (&sin1->sin6_addr, &sin2->sin6_addr); }#else /* !defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE) */ static int nfs_sockaddr_match_ipaddr6(const struct sockaddr *sa1,
fs/ocfs2/inode.c +5 -1
@@ -485,7 +485,11 @@ static int ocfs2_read_locked_inode(struct inode *inode, OCFS2_BH_IGNORE_CACHE); }else { status =ocfs2_read_blocks_sync (osb, args->fi_blkno,1 , &bh); -if (!status) +/* +* If buffer is in jbd, then its checksum may not have been +* computed as yet. +*/ +if (!status && !buffer_jbd (bh)) status =ocfs2_validate_inode_block (osb->sb, bh); }if (status <0 ) {
fs/sysfs/file.c +1 -1
@@ -340,7 +340,7 @@ static int sysfs_open_file(struct inode *inode, struct file *file)char *p; p =d_path (&file->f_path, last_sysfs_file,sizeof (last_sysfs_file)); -if (p) +if (!IS_ERR (p))memmove (last_sysfs_file, p,strlen (p) +1 );/* need attr_sd for attr and ops, its parent for kobj */
include/linux/compat.h +2 -0
@@ -309,5 +309,7 @@ asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename,asmlinkage long compat_sys_openat (unsigned int dfd,const char __user *filename,int flags,int mode); +extern void __user *compat_alloc_user_space (unsigned long len); +#endif /* CONFIG_COMPAT */ #endif /* _LINUX_COMPAT_H */
include/linux/cpuset.h +5 -11
@@ -21,8 +21,7 @@ extern int number_of_cpusets; /* How many cpusets are defined in system? */extern int cpuset_init (void );extern void cpuset_init_smp (void );extern void cpuset_cpus_allowed (struct task_struct *p,struct cpumask *mask); -extern void cpuset_cpus_allowed_locked (struct task_struct *p, -struct cpumask *mask); +extern int cpuset_cpus_allowed_fallback (struct task_struct *p);extern nodemask_t cpuset_mems_allowed (struct task_struct *p);#define cpuset_current_mems_allowed (current->mems_allowed)void cpuset_init_current_mems_allowed (void );
@@ -69,9 +68,6 @@ struct seq_file;extern void cpuset_task_status_allowed (struct seq_file *m,struct task_struct *task); -extern void cpuset_lock (void ); -extern void cpuset_unlock (void ); -extern int cpuset_mem_spread_node (void );static inline int cpuset_do_page_mem_spread (void )
@@ -105,10 +101,11 @@ static inline void cpuset_cpus_allowed(struct task_struct *p, {cpumask_copy (mask, cpu_possible_mask); } -static inline void cpuset_cpus_allowed_locked (struct task_struct *p, -struct cpumask *mask) + +static inline int cpuset_cpus_allowed_fallback (struct task_struct *p) { -cpumask_copy (mask, cpu_possible_mask); +cpumask_copy (&p->cpus_allowed, cpu_possible_mask); +return cpumask_any (cpu_active_mask); }static inline nodemask_t cpuset_mems_allowed (struct task_struct *p)
@@ -157,9 +154,6 @@ static inline void cpuset_task_status_allowed(struct seq_file *m, { } -static inline void cpuset_lock (void ) {} -static inline void cpuset_unlock (void ) {} -static inline int cpuset_mem_spread_node (void ) {return 0 ;
include/linux/libata.h +1 -0
@@ -339,6 +339,7 @@ enum {ATA_EHI_HOTPLUGGED = (1 <<0 ),/* could have been hotplugged */ ATA_EHI_NO_AUTOPSY = (1 <<2 ),/* no autopsy */ ATA_EHI_QUIET = (1 <<3 ),/* be quiet */ +ATA_EHI_NO_RECOVERY = (1 <<4 ),/* no recovery */ ATA_EHI_DID_SOFTRESET = (1 <<16 ),/* already soft-reset this port */ ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */
include/linux/msi.h +2 -0
@@ -14,8 +14,10 @@ struct irq_desc;extern void mask_msi_irq (unsigned int irq);extern void unmask_msi_irq (unsigned int irq);extern void read_msi_msg_desc (struct irq_desc *desc,struct msi_msg *msg); +extern void get_cached_msi_msg_desc (struct irq_desc *desc,struct msi_msg *msg);extern void write_msi_msg_desc (struct irq_desc *desc,struct msi_msg *msg);extern void read_msi_msg (unsigned int irq,struct msi_msg *msg); +extern void get_cached_msi_msg (unsigned int irq,struct msi_msg *msg);extern void write_msi_msg (unsigned int irq,struct msi_msg *msg);struct msi_desc {
include/linux/sched.h +12 -8
@@ -145,7 +145,6 @@ extern unsigned long this_cpu_load(void);extern void calc_global_load (void ); -extern u64 cpu_nr_migrations (int cpu);extern unsigned long get_parent_ip (unsigned long addr);
@@ -1001,6 +1000,7 @@ struct sched_domain {char *name;#endif +unsigned int span_weight;/* * Span of all CPUs in this domain. *
@@ -1072,7 +1072,8 @@ struct sched_domain;struct sched_class {const struct sched_class *next; -void (*enqueue_task) (struct rq *rq,struct task_struct *p,int wakeup); +void (*enqueue_task) (struct rq *rq,struct task_struct *p,int wakeup, +bool head);void (*dequeue_task) (struct rq *rq,struct task_struct *p,int sleep);void (*yield_task) (struct rq *rq);
@@ -1082,7 +1083,8 @@ struct sched_class {void (*put_prev_task) (struct rq *rq,struct task_struct *p);#ifdef CONFIG_SMP -int (*select_task_rq)(struct task_struct *p,int sd_flag,int flags); +int (*select_task_rq)(struct rq *rq,struct task_struct *p, +int sd_flag,int flags); unsigned long (*load_balance) (struct rq *this_rq, int this_cpu, struct rq *busiest, unsigned long max_load_move,
@@ -1094,7 +1096,8 @@ struct sched_class { enum cpu_idle_type idle);void (*pre_schedule) (struct rq *this_rq,struct task_struct *task);void (*post_schedule) (struct rq *this_rq); -void (*task_wake_up) (struct rq *this_rq,struct task_struct *task); +void (*task_waking) (struct rq *this_rq,struct task_struct *task); +void (*task_woken) (struct rq *this_rq,struct task_struct *task);void (*set_cpus_allowed)(struct task_struct *p,const struct cpumask *newmask);
@@ -1105,7 +1108,7 @@ struct sched_class {void (*set_curr_task) (struct rq *rq);void (*task_tick) (struct rq *rq,struct task_struct *p,int queued); -void (*task_new) (struct rq *rq,struct task_struct *p); +void (*task_fork) (struct task_struct *p);void (*switched_from) (struct rq *this_rq,struct task_struct *task,int running);
@@ -1114,10 +1117,11 @@ struct sched_class {void (*prio_changed) (struct rq *this_rq,struct task_struct *task,int oldprio,int running); -unsigned int (*get_rr_interval) (struct task_struct *task); +unsigned int (*get_rr_interval) (struct rq *rq, +struct task_struct *task);#ifdef CONFIG_FAIR_GROUP_SCHED -void (*moved_group) (struct task_struct *p); +void (*moved_group) (struct task_struct *p,int on_rq);#endif };
@@ -1178,7 +1182,6 @@ struct sched_entity {u64 nr_failed_migrations_running;u64 nr_failed_migrations_hot;u64 nr_forced_migrations; -u64 nr_forced2_migrations;u64 nr_wakeups;u64 nr_wakeups_sync;
@@ -1886,6 +1889,7 @@ extern void sched_clock_idle_sleep_event(void);extern void sched_clock_idle_wakeup_event (u64 delta_ns);#ifdef CONFIG_HOTPLUG_CPU +extern void move_task_off_dead_cpu (int dead_cpu,struct task_struct *p);extern void idle_task_exit (void );#else static inline void idle_task_exit (void ) {}
include/linux/topology.h +1 -1
@@ -99,7 +99,7 @@ int arch_update_cpu_topology(void); | 1*SD_WAKE_AFFINE \ |1 *SD_SHARE_CPUPOWER \ |0 *SD_POWERSAVINGS_BALANCE \ - |0 *SD_SHARE_PKG_RESOURCES \ + |1 *SD_SHARE_PKG_RESOURCES \ |0 *SD_SERIALIZE \ |0 *SD_PREFER_SIBLING \ , \
kernel/compat.c +22 -0
@@ -25,6 +25,7 @@#include <linux/posix-timers.h> #include <linux/times.h> #include <linux/ptrace.h> +#include <linux/module.h> #include <asm/uaccess.h>
@@ -1136,3 +1137,24 @@ compat_sys_sysinfo(struct compat_sysinfo __user *info)return 0 ; } + +/* +* Allocate user-space memory for the duration of a single system call, +* in order to marshall parameters inside a compat thunk. +*/ +void __user *compat_alloc_user_space (unsigned long len) +{ +void __user *ptr; + +/* If len would occupy more than half of the entire compat space... */ +if (unlikely (len > (((compat_uptr_t )~0 ) >>1 ))) +return NULL ; + + ptr =arch_compat_alloc_user_space (len); + +if (unlikely (!access_ok (VERIFY_WRITE , ptr, len))) +return NULL ; + +return ptr; +} +EXPORT_SYMBOL_GPL (compat_alloc_user_space);
kernel/cpu.c +10 -34
124 lines not on this page · raw message
kernel/cpuset.c +42 -25
83 lines not on this page · raw message
kernel/fork.c +0 -15
@@ -1233,21 +1233,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,/* Need tasklist lock for parent etc handling! */ write_lock_irq (&tasklist_lock); -/* -* The task hasn't been attached yet, so its cpus_allowed mask will -* not be changed, nor will its assigned CPU. -* -* The cpus_allowed mask of the parent may have changed after it was -* copied first time - so re-copy it here, then check the child's CPU -* to ensure it is on a valid CPU (and if not, just force it back to -* parent's CPU). This avoids alot of nasty races. -*/ - p->cpus_allowed = current->cpus_allowed; - p->rt.nr_cpus_allowed = current->rt.nr_cpus_allowed; -if (unlikely (!cpu_isset (task_cpu (p), p->cpus_allowed) || - !cpu_online (task_cpu (p)))) -set_task_cpu (p,smp_processor_id ()); -/* CLONE_PARENT re-uses the old parent */ if (clone_flags & (CLONE_PARENT |CLONE_THREAD )) { p->real_parent = current->real_parent;
kernel/gcov/fs.c +180 -64
359 lines not on this page · raw message
kernel/groups.c +2 -3
@@ -143,10 +143,9 @@ int groups_search(const struct group_info *group_info, gid_t grp) right = group_info->ngroups;while (left < right) {unsigned int mid = (left+right)/2 ; -int cmp = grp -GROUP_AT (group_info, mid); -if (cmp >0 ) +if (grp >GROUP_AT (group_info, mid)) left = mid +1 ; -else if (cmp <0 ) +else if (grp <GROUP_AT (group_info, mid)) right = mid;else return 1 ;
kernel/sched.c +280 -205
887 lines not on this page · raw message
kernel/sched_debug.c +0 -2
@@ -423,7 +423,6 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)P (se.nr_failed_migrations_running);P (se.nr_failed_migrations_hot);P (se.nr_forced_migrations); -P (se.nr_forced2_migrations);P (se.nr_wakeups);P (se.nr_wakeups_sync);P (se.nr_wakeups_migrate);
@@ -499,7 +498,6 @@ void proc_sched_set_task(struct task_struct *p) p->se.nr_failed_migrations_running =0 ; p->se.nr_failed_migrations_hot =0 ; p->se.nr_forced_migrations =0 ; - p->se.nr_forced2_migrations =0 ;
Lines of this file are not shown. View the raw message.
kernel/sched_fair.c +140 -70
210 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.
I'm announcing the release of the 2.6.32.22 kernel.
All users of the 2.6.32 kernel series must upgrade.
The updated 2.6.32.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.32.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.32.y.git;a=summarythanks,
greg k-h
------------
Makefile | 2 arch/arm/kernel/entry-common.S | 2 arch/ia64/include/asm/compat.h | 2 arch/ia64/kernel/msi_ia64.c | 2 arch/ia64/sn/kernel/msi_sn.c | 2 arch/mips/include/asm/compat.h | 2 arch/parisc/include/asm/compat.h | 2 arch/powerpc/include/asm/compat.h | 2 arch/s390/include/asm/compat.h | 2 arch/sparc/include/asm/compat.h | 2 arch/x86/ia32/ia32entry.S | 22 - arch/x86/include/asm/compat.h | 2 arch/x86/include/asm/tsc.h | 2 arch/x86/kernel/apic/io_apic.c | 2 arch/x86/kernel/tsc.c | 38 ++ arch/x86/oprofile/nmi_int.c | 22 + arch/x86/power/cpu.c | 2 drivers/ata/libata-core.c | 14 drivers/ata/libata-eh.c | 4 drivers/ata/sata_mv.c | 44 ++ drivers/gpu/drm/drm_crtc_helper.c | 4 drivers/gpu/drm/i915/i915_dma.c | 12 drivers/gpu/drm/i915/i915_gem.c | 1 drivers/gpu/drm/i915/intel_display.c | 5 drivers/hid/usbhid/hid-core.c | 18 - drivers/hwmon/f75375s.c | 6 drivers/hwmon/k8temp.c | 35 ++ drivers/input/serio/i8042.c | 2 drivers/mmc/host/tmio_mmc.c | 7 drivers/mmc/host/tmio_mmc.h | 13 drivers/net/tun.c | 3 drivers/net/wireless/ath/ath5k/base.c | 4 drivers/net/wireless/ath/ath9k/eeprom.h | 2 drivers/net/wireless/ath/regd.h | 1 drivers/net/wireless/p54/txrx.c | 2 drivers/oprofile/buffer_sync.c | 27 - drivers/oprofile/cpu_buffer.c | 2 drivers/pci/msi.c | 27 + drivers/power/apm_power.c | 1 drivers/staging/hv/RingBuffer.c | 2 drivers/staging/hv/StorVscApi.h | 4 drivers/staging/hv/netvsc_drv.c | 3 drivers/staging/hv/storvsc_drv.c | 9 drivers/usb/class/cdc-acm.c | 85 +++++ drivers/usb/gadget/rndis.c | 10 drivers/usb/host/ehci-ppc-of.c | 12 drivers/usb/serial/cp210x.c | 10 drivers/usb/serial/ftdi_sio.c | 8 drivers/usb/serial/ftdi_sio_ids.h | 12 drivers/usb/serial/mos7840.c | 55 ++- drivers/xen/events.c | 21 + fs/binfmt_misc.c | 2 fs/fuse/dev.c | 16 - fs/nfs/client.c | 2 fs/ocfs2/inode.c | 6 fs/sysfs/file.c | 2 include/linux/compat.h | 2 include/linux/cpuset.h | 16 - include/linux/libata.h | 1 include/linux/msi.h | 2 include/linux/sched.h | 20 - include/linux/topology.h | 2 kernel/compat.c | 22 + kernel/cpu.c | 44 -- kernel/cpuset.c | 67 ++-- kernel/fork.c | 15 kernel/gcov/fs.c | 244 +++++++++++----- kernel/groups.c | 5 kernel/sched.c | 485 ++++++++++++++++++-------------- kernel/sched_debug.c | 2 kernel/sched_fair.c | 210 +++++++++---- kernel/sched_idletask.c | 5 kernel/sched_rt.c | 33 +- kernel/trace/ftrace.c | 19 - mm/bounce.c | 2 mm/memory_hotplug.c | 16 - net/irda/irlan/irlan_common.c | 2 net/sunrpc/auth_gss/auth_gss.c | 9 net/sunrpc/rpc_pipe.c | 6 net/wireless/wext-compat.c | 3 net/wireless/wext.c | 16 + sound/core/seq/oss/seq_oss_init.c | 9 sound/pci/hda/patch_realtek.c | 9 tools/perf/util/callchain.h | 1 84 files changed, 1252 insertions(+), 618 deletions(-)
Adrian Taylor (1):
USB: Exposing second ACM channel as tty for Nokia S60 phones.
Al Viro (1):
arm: fix really nasty sigreturn bug
Alan Stern (1):
HID: fix suspend crash by moving initializations earlier
Amit Arora (1):
sched: kill migration thread in CPU_POST_DEAD instead of CPU_DEAD
Andreas Herrmann (1):
hwmon: (k8temp) Differentiate between AM2 and ASB1
Anton Blanchard (1):
sched: cpuacct: Use bigger percpu counter batch values for stats counters
Anton Vorontsov (1):
apm_power: Add missing break statement
Ben Hutchings (3):
PCI: MSI: Remove unsafe and unnecessary hardware access
PCI: MSI: Restore read_msi_msg_desc(); add get_cached_msi_msg_desc()
tun: Don't add sysfs attributes to devices without sysfs directories
Blaise Gassend (1):
USB: serial: Extra device/vendor ID for mos7840 driver
Chris Wilson (2):
drm/i915: Prevent double dpms on
drm: Only decouple the old_fb from the crtc is we call mode_set*
Chris Wright (1):
tracing: t_start: reset FTRACE_ITER_HASH in case of seek/pread
Christian Lamparter (1):
p54: fix tx feedback status flag check
Craig Shelley (1):
USB: CP210x Add new device ID
Dan Carpenter (5):
USB: ehci-ppc-of: problems in unwind
sysfs: checking for NULL instead of ERR_PTR
irda: off by one
i915: return -EFAULT if copy_to_user fails
i915_gem: return -EFAULT if copy_to_user fails
Daniel J Blueman (1):
sched: apply RCU protection to wake_affine()
Dave Ludlow (2):
usb: serial: mos7840: Add USB ID to support the B&B Electronics USOPTL4-2P.
usb: serial: mos7840: Add USB IDs to support more B&B USB/RS485 converters.
David Henningsson (1):
ALSA: hda - Rename iMic to Int Mic on Lenovo NB0763
Dmitry Torokhov (1):
Input: i8042 - fix device removal on unload
Frederic Weisbecker (1):
perf: Initialize callchains roots's childen hits
Gary King (1):
bounce: call flush_dcache_page() after bounce_copy_vec()
Greg Kroah-Hartman (1):
Linux 2.6.32.22
Guennadi Liakhovetski (1):
mmc: fix the use of kunmap_atomic() in tmio_mmc.h
Guillem Jover (2):
hwmon: (f75375s) Shift control mode to the correct bit position
hwmon: (f75375s) Do not overwrite values read from registers
H. Peter Anvin (2):
x86-64, compat: Test %rax for the syscall number, not %eax
compat: Make compat_alloc_user_space() incorporate the access_ok()
Haiyang Zhang (2):
staging: hv: Fix missing functions for net_device_ops
staging: hv: Fixed the value of the 64bit-hole inside ring buffer
Hank Janssen (3):
staging: hv: Fixed bounce kmap problem by using correct index
staging: hv: Increased storvsc ringbuffer and max_io_requests
staging: hv: Fixed lockup problem with bounce_buffer scatter list
Hiroshi Shimamoto (1):
sched: Remove unused cpu_nr_migrations()
Ingo Molnar (2):
sched: Remove forced2_migrations stats
sched: Make warning less noisy
Jan Sembera (1):
binfmt_misc: fix binfmt_misc priority
Jason Detring (1):
USB: cp210x: Add B&G H3000 link cable ID
Jeremy Fitzhardinge (2):
xen: handle events as edge-triggered
xen: use percpu interrupts for IPIs and VIRQs
Jerome Marchand (1):
kernel/groups.c: fix integer overflow in groups_search
Jiri Kosina (1):
HID: usbhid: initialize interface pointers early enough
Johan Hovold (1):
USB: mos7840: fix DMA buffers on stack and endianess bugs
Johannes Berg (1):
wireless extensions: fix kernel heap content leak
John W. Linville (1):
ath5k: check return value of ieee80211_get_tx_rate
KAMEZAWA Hiroyuki (1):
memory hotplug: fix next block calculation in is_removable
Kailang Yang (1):
ALSA: hda - Fix auto-parser of ALC269vb for HP pin NID 0x21
Li Zefan (1):
tracing: Fix a race in function profile
Luis R. Rodriguez (1):
ath9k_hw: fix parsing of HT40 5 GHz CTLs
Luke Lowrey (1):
USB: ftdi_sio: Added custom PIDs for ChamSys products
Mark Lord (1):
sata_mv: fix broken DSM/TRIM support (v2)
Maxim Osipov (1):
USB: Fix kernel oops with g_ether and Windows
Mike Galbraith (3):
sched: revert stable c6fc81a sched: Fix a race between ttwu() and migrate_task()
sched: Fix vmark regression on big machines
sched: Fix select_idle_sibling()
Miklos Szeredi (1):
fuse: flush background queue on connection close
Oleg Nesterov (7):
sched: set_cpus_allowed_ptr(): Don't use rq->migration_thread after unlock
sched: Kill the broken and deadlockable cpuset_lock/cpuset_cpus_allowed_locked code
sched: move_task_off_dead_cpu(): Take rq->lock around select_fallback_rq()
sched: move_task_off_dead_cpu(): Remove retry logic
sched: sched_exec(): Remove the select_fallback_rq() logic
sched: _cpu_down(): Don't play with current->cpus_allowed
sched: Make select_fallback_rq() cpuset friendly
Peter Oberparleiter (1):
gcov: fix null-pointer dereference for certain module types
Peter Zijlstra (24):
x86, tsc: Fix a preemption leak in restore_sched_clock_state()
sched: Consolidate select_task_rq() callers
sched: Remove rq->clock coupling from set_task_cpu()
sched: Clean up ttwu() rq locking
sched: Sanitize fork() handling
sched: Use TASK_WAKING for fork wakups
sched: Ensure set_task_cpu() is never called on blocked tasks
sched: Fix broken assertion
sched: Fix sched_exec() balancing
sched: Fix select_task_rq() vs hotplug issues
sched: Add pre and post wakeup hooks
sched: Remove the cfs_rq dependency from set_task_cpu()
sched: Fix hotplug hang
sched: Fix fork vs hotplug vs cpuset namespaces
sched: Fix incorrect sanity check
sched: Fix race between ttwu() and task_rq_lock()
sched: Fix TASK_WAKING vs fork deadlock
sched: Optimize task_rq_lock()
sched: Fix nr_uninterruptible count
sched: Fix rq->clock synchronization when migrating tasks
sched: Remove unnecessary RCU exclusion
sched: Cleanup select_task_rq_fair()
sched: More generic WAKE_AFFINE vs select_idle_sibling()
sched: Pre-compute cpumask_weight(sched_domain_span(sd))
Philippe Corbes (1):
USB: cdc-acm: Add pseudo modem without AT command capabilities
Przemo Firszt (1):
USB: Expose vendor-specific ACM channel on Nokia 5230
Rafael J.Wysocki (1):
sched: Make wakeup side and atomic variants of completion API irq safe
Robert Richter (3):
oprofile: fix crash when accessing freed task structs oprofile, x86: fix init_sysfs error handling oprofile, x86: fix init_sysfs() function stub
Roland McGrath (1):
x86-64, compat: Retruncate rax after ia32 syscall entry tracing
Russ Nelson (1):
USB: cdc-acm: add another device quirk
Steven Rostedt (1):
tracing: Do not allow llseek to set_ftrace_filter
Sunil Mushran (1):
ocfs2: Fix incorrect checksum validation error
Suresh Siddha (2):
x86, tsc, sched: Recompute cyc2ns_offset's during resume from sleep states
sched: Fix select_idle_sibling() logic in select_task_rq_fair()
Takashi Iwai (3):
ALSA: seq/oss - Fix double-free at error path of snd_seq_oss_open()
ALSA: hda - Handle missing NID 0x1b on ALC259 codec
ALSA: hda - Handle pin NID 0x1a on ALC259/269Tejun Heo (1):
libata: skip EH autopsy and recovery during suspend
Thomas Gleixner (8):
sched: Protect task->cpus_allowed access in sched_getaffinity()
sched: Protect sched_rr_get_param() access to task->sched_class
sched: Use rcu in sys_sched_getscheduler/sys_sched_getparam()
sched: Use rcu in sched_get/set_affinity()
sched: Use rcu in sched_get_rr_param()
sched: Extend enqueue_task to allow head queueing
sched: Implement head queueing for sched_rt
sched: Queue a deboosted task to the head of the RT prio queue
Toby Gray (2):
USB: cdc-acm: Adding second ACM channel support for various Nokia and one Samsung phones
USB: cdc-acm: Fixing crash when ACM probing interfaces with no endpoint descriptors.
Trond Myklebust (2):
NFS: Fix a typo in nfs_sockaddr_match_ipaddr6
SUNRPC: Fix race corrupting rpc upcall
Xiaotian Feng (1):
sched: Fix set_cpu_active() in cpu_down()
Yusuke Goda (1):
tmio_mmc: don't clear unhandled pending interrupts