Linux 3.0.67
Greg KH
maintainerI'm announcing the release of the 3.0.67 kernel.
All users of the 3.0 kernel series must upgrade.
The updated 3.0.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.0.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/mach-pxa/include/mach/smemc.h | 1 arch/arm/mach-pxa/smemc.c | 15 +++ arch/parisc/include/asm/pgtable.h | 13 ++ arch/parisc/kernel/cache.c | 18 ++++ arch/powerpc/kernel/machine_kexec_64.c | 5 + arch/s390/kvm/kvm-s390.c | 8 + arch/x86/include/asm/mmzone_32.h | 6 - arch/x86/power/hibernate_32.c | 2 arch/x86/xen/spinlock.c | 1 drivers/base/bus.c | 4 drivers/block/sunvdc.c | 2 drivers/dca/dca-core.c | 5 + drivers/gpu/drm/drm_usb.c | 2 drivers/gpu/drm/i915/intel_display.c | 8 + drivers/net/wireless/p54/p54usb.c | 2 drivers/net/xen-netback/interface.c | 3 drivers/net/xen-netback/netback.c | 10 +- drivers/pcmcia/vrc4171_card.c | 1 drivers/s390/kvm/kvm_virtio.c | 38 ++++++-- drivers/staging/comedi/comedi_fops.c | 5 + drivers/staging/hv/hv_kvp.c | 10 +- drivers/staging/vt6656/usbpipe.c | 28 ++++-- drivers/tty/tty_ioctl.c | 4 drivers/tty/vt/vt.c | 134 +++++++++++++++++++++--------- drivers/usb/host/ehci-omap.c | 2 drivers/usb/serial/option.c | 16 +++ drivers/usb/storage/initializers.c | 4 drivers/usb/storage/unusual_cypress.h | 2 drivers/video/backlight/adp8860_bl.c | 2 drivers/video/backlight/adp8870_bl.c | 2 drivers/video/console/fbcon.c | 47 ++++++++-- drivers/video/fbmem.c | 9 +- drivers/video/fbsysfs.c | 3 fs/ext4/resize.c | 1 fs/ext4/super.c | 19 ++-- fs/fat/namei_vfat.c | 3 fs/lockd/clntproc.c | 3 fs/nls/nls_base.c | 43 +++++++-- fs/notify/inotify/inotify_user.c | 4 fs/ocfs2/dlmglue.c | 5 - include/linux/console.h | 2 include/linux/mmu_notifier.h | 1 include/linux/nls.h | 5 - include/linux/usb/audio.h | 6 - include/linux/vt_kern.h | 2 include/net/inet6_hashtables.h | 8 - include/net/inet_sock.h | 1 include/net/ipv6.h | 12 ++ kernel/hrtimer.c | 36 ++++---- kernel/irq/spurious.c | 7 - kernel/posix-cpu-timers.c | 23 ++++- kernel/timeconst.pl | 6 - mm/fadvise.c | 18 +++- mm/mmu_notifier.c | 147 +++++++++++++++++++-------------- mm/page_alloc.c | 15 ++- mm/shmem.c | 10 +- net/bridge/br_stp_bpdu.c | 2 net/ipv4/af_inet.c | 9 +- net/ipv4/ping.c | 4 sound/pci/ali5451/ali5451.c | 2 sound/pci/rme32.c | 2 sound/usb/quirks-table.h | 2 63 files changed, 572 insertions(+), 240 deletions(-)
Alan Cox (1):
fb: rework locking to fix lock ordering on takeover
Alan Stern (1):
NLS: improve UTF8 -> UTF16 string conversion routine
Andrea Arcangeli (1):
mm: mmu_notifier: make the mmu_notifier srcu static
Bjorn Helgaas (1):
Driver core: treat unregistered bus_types as having no devices
Bjørn Mork (3):
USB: option: add and update Alcatel modems
USB: option: add Yota / Megafon M100-1 4g modem
USB: option: add Huawei "ACM" devices using protocol = vendor
Christian Borntraeger (1):
s390/kvm: Fix store status for ACRS/FPRS
Clemens Ladisch (1):
ALSA: usb-audio: fix Roland A-PRO support
Cornelia Huck (1):
KVM: s390: Handle hosts not supporting s390-virtio.
Dan Carpenter (1):
ext4: add missing kfree() on error return path in add_new_gdb()
Dave Airlie (2):
drm/usb: bind driver to correct device
fbcon: don't lose the console font across generic->chip driver switch
David S. Miller (1):
sunvdc: Fix off-by-one in generic_request().
David Vrabel (2):
xen-netback: correctly return errors from netbk_count_requests()
xen-netback: cancel the credit timer when taking the vif down
Denis Efremov (2):
ALSA: ali5451: remove irq enabling in pointer callback
ALSA: rme32.c irq enabling after spin_lock_irq
Eric Dumazet (1):
ipv6: use a stronger hash for tcp
Greg Kroah-Hartman (1):
Linux 3.0.67
Greg Thelen (1):
tmpfs: fix use-after-free of mempolicy object
H. Peter Anvin (2):
x86-32, mm: Remove reference to resume_map_numa_kva() timeconst.pl: Eliminate Perl warning
Ian Abbott (1):
staging: comedi: disallow COMEDI_DEVCONFIG on non-board minors
Ian Campbell (1):
xen/netback: check correct frag when looking for head frag
Igor Grinberg (1):
ARM: PXA3xx: program the CSMSADRCFG register
Jean Delvare (1):
pcmcia/vrc4171: Add missing spinlock init
Jim Somerville (1):
inotify: remove broken mask checks causing unmount to be EINVAL
John David Anglin (1):
Purge existing TLB entries in set_pte_at and ptep_set_wrprotect
Josh Boyer (1):
USB: usb-storage: unusual_devs update for Super TOP SATA bridge
Junxiao Bi (1):
ocfs2: unlock super lock if lockres refresh failed
Lars-Peter Clausen (1):
drivers/video/backlight/adp88?0_bl.c: fix resume
Leonid Shatz (1):
hrtimer: Prevent hrtimer_enqueue_reprogram race
Li Wei (1):
ipv4: fix a bug in ping_err().
Linus Torvalds (1):
mm: fix pageblock bitmap allocation
Maciej Sosnowski (1):
dca: check against empty dca_domains list before unregister provider
Malcolm Priestley (1):
staging: vt6656: Fix URB submitted while active warning.
Mel Gorman (1):
mm/fadvise.c: drain all pagevecs if POSIX_FADV_DONTNEED fails to discard all pages
Mika Kuoppala (1):
drm/i915: disable shared panel fitter for pipe
Oleg Nesterov (1):
tty: set_termios/set_termiox should not return -EINTR
Pawel Moll (1):
ALSA: usb: Fix Processing Unit Descriptor parsers
Phileas Fogg (1):
powerpc/kexec: Disable hard IRQ before kexec
Robin Holt (1):
mmu_notifier_unregister NULL Pointer deref and multiple ->release() callouts
Roger Quadros (1):
USB: ehci-omap: Fix autoloading of module
Sagi Grimberg (1):
mm: mmu_notifier: have mmu_notifiers use a global SRCU so they may safely schedule
Stanislaw Gruszka (1):
posix-cpu-timers: Fix nanosleep task_struct leak
Stefan Bader (1):
xen: Send spinlock IPI to all waiters
Stephen Hemminger (1):
bridge: set priority of STP packets
Takashi Iwai (1):
fb: Yet another band-aid for fixing lockdep mess
Tao Ma (1):
ext4: Free resources in some error path in ext4_fill_super
Thomas Gleixner (1):
genirq: Avoid deadlock in spurious handling
Tomasz Guszkowski (1):
p54usb: corrected USB ID for T-Com Sinus 154 data II
Trond Myklebust (1):
NLM: Ensure that we resend all pending blocking locks after a reclaim
fangxiaozhi (1):
USB: storage: properly handle the endian issues of idProduct
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 0 -SUBLEVEL = 66 +SUBLEVEL = 67 EXTRAVERSION = NAME = Sneaky Weasel
arch/arm/mach-pxa/include/mach/smemc.h +1 -0
@@ -37,6 +37,7 @@#define CSADRCFG1 (SMEMC_VIRT + 0x84)/* Address Configuration Register for CS1 */ #define CSADRCFG2 (SMEMC_VIRT + 0x88)/* Address Configuration Register for CS2 */ #define CSADRCFG3 (SMEMC_VIRT + 0x8C)/* Address Configuration Register for CS3 */ +#define CSMSADRCFG (SMEMC_VIRT + 0xA0)/* Chip Select Configuration Register */ /* * More handy macros for PCMCIA
arch/arm/mach-pxa/smemc.c +14 -1
@@ -40,6 +40,8 @@ static void pxa3xx_smemc_resume(void)__raw_writel (csadrcfg[1 ],CSADRCFG1 );__raw_writel (csadrcfg[2 ],CSADRCFG2 );__raw_writel (csadrcfg[3 ],CSADRCFG3 ); +/* CSMSADRCFG wakes up in its default state (0), so we need to set it */ +__raw_writel (0x2 ,CSMSADRCFG ); }static struct syscore_ops smemc_syscore_ops = {
@@ -49,8 +51,19 @@ static struct syscore_ops smemc_syscore_ops = {static int __init smemc_init (void ) { -if (cpu_is_pxa3xx ()) +if (cpu_is_pxa3xx ()) { +/* +* The only documentation we have on the +* Chip Select Configuration Register (CSMSADRCFG) is that +* it must be programmed to 0x2. +* Moreover, in the bit definitions, the second bit +* (CSMSADRCFG[1]) is called "SETALWAYS". +* Other bits are reserved in this register. +*/ +__raw_writel (0x2 ,CSMSADRCFG ); +register_syscore_ops (&smemc_syscore_ops); + }return 0 ; }
arch/parisc/include/asm/pgtable.h +10 -3
@@ -12,11 +12,10 @@#include <linux/bitops.h> #include <linux/spinlock.h> +#include <linux/mm_types.h> #include <asm/processor.h> #include <asm/cache.h> -struct vm_area_struct ; -/* * kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel * memory. For the return value to be meaningful, ADDR must be >=
@@ -40,7 +39,14 @@ struct vm_area_struct;do { \ *(pteptr) = (pteval); \ } while(0) -#define set_pte_at (mm,addr,ptep,pteval) set_pte(ptep,pteval) + +extern void purge_tlb_entries (struct mm_struct *,unsigned long ); + +#define set_pte_at (mm, addr, ptep, pteval) \ + do { \ + set_pte(ptep, pteval); \ + purge_tlb_entries(mm, addr); \ + } while (0)#endif /* !__ASSEMBLY__ */
@@ -464,6 +470,7 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, old =pte_val (*ptep); new = pte_val(pte_wrprotect(__pte (old))); }while (cmpxchg ((unsigned long *) ptep, old, new) != old); +purge_tlb_entries (mm, addr);#else pte_t old_pte = *ptep;set_pte_at (mm, addr, ptep,pte_wrprotect (old_pte));
arch/parisc/kernel/cache.c +18 -0
@@ -421,6 +421,24 @@ void kunmap_parisc(void *addr)EXPORT_SYMBOL (kunmap_parisc);#endif +void purge_tlb_entries (struct mm_struct *mm,unsigned long addr) +{ +unsigned long flags; + +/* Note: purge_tlb_entries can be called at startup with +no context. */ + +/* Disable preemption while we play with %sr1. */ +preempt_disable (); +mtsp (mm->context,1 ); +purge_tlb_start (flags); +pdtlb (addr); +pitlb (addr); +purge_tlb_end (flags); +preempt_enable (); +} +EXPORT_SYMBOL (purge_tlb_entries); +void __flush_tlb_range (unsigned long sid,unsigned long start,unsigned long end) {
arch/powerpc/kernel/machine_kexec_64.c +5 -0
@@ -163,6 +163,8 @@ static int kexec_all_irq_disabled = 0;static void kexec_smp_down (void *arg) {local_irq_disable (); +hard_irq_disable (); +mb ();/* make sure our irqs are disabled before we say they are */ get_paca ()->kexec_state =KEXEC_STATE_IRQS_OFF ;while (kexec_all_irq_disabled ==0 )
@@ -245,6 +247,8 @@ static void kexec_prepare_cpus(void)wake_offline_cpus ();smp_call_function (kexec_smp_down,NULL ,/* wait */ 0 );local_irq_disable (); +hard_irq_disable (); +mb ();/* make sure IRQs are disabled before we say they are */ get_paca ()->kexec_state =KEXEC_STATE_IRQS_OFF ;
@@ -282,6 +286,7 @@ static void kexec_prepare_cpus(void)if (ppc_md.kexec_cpu_down) ppc_md.kexec_cpu_down (0 ,0 );local_irq_disable (); + hard_irq_disable(); }#endif /* SMP */
arch/s390/kvm/kvm-s390.c +8 -0
@@ -584,6 +584,14 @@ int kvm_s390_vcpu_store_status(struct kvm_vcpu *vcpu, unsigned long addr) }else prefix =0 ; +/* +* The guest FPRS and ACRS are in the host FPRS/ACRS due to the lazy +* copying in vcpu load/put. Lets update our copies before we save +* it into the save area +*/ +save_fp_regs (&vcpu->arch.guest_fpregs); +save_access_regs (vcpu->run->s.regs.acrs); +if (__guestcopy (vcpu, addr + offsetof(struct save_area , fp_regs), vcpu->arch.guest_fpregs.fprs,128 , prefix))return -EFAULT ;
arch/x86/include/asm/mmzone_32.h +0 -6
@@ -14,12 +14,6 @@ extern struct pglist_data *node_data[];#include <asm/numaq.h> -extern void resume_map_numa_kva (pgd_t *pgd); - -#else /* !CONFIG_NUMA */ - -static inline void resume_map_numa_kva (pgd_t *pgd) {} -#endif /* CONFIG_NUMA */ #ifdef CONFIG_DISCONTIGMEM
arch/x86/power/hibernate_32.c +0 -2
@@ -130,8 +130,6 @@ static int resume_physical_mapping_init(pgd_t *pgd_base) } } -resume_map_numa_kva (pgd_base); -return 0 ; }
arch/x86/xen/spinlock.c +0 -1
@@ -313,7 +313,6 @@ static noinline void xen_spin_unlock_slow(struct xen_spinlock *xl)if (per_cpu (lock_spinners, cpu) == xl) {ADD_STATS (released_slow_kicked,1 );xen_send_IPI_one (cpu,XEN_SPIN_UNLOCK_VECTOR ); -break ; } } }
drivers/base/bus.c +2 -2
@@ -289,7 +289,7 @@ int bus_for_each_dev(struct bus_type *bus, struct device *start,struct device *dev;int error =0 ; -if (!bus) +if (!bus || !bus->p)return -EINVAL ; klist_iter_init_node(&bus->p->klist_devices, &i,
@@ -323,7 +323,7 @@ struct device *bus_find_device(struct bus_type *bus,struct klist_iter i;struct device *dev; -if (!bus) +if (!bus || !bus->p)return NULL ; klist_iter_init_node(&bus->p->klist_devices, &i,
drivers/block/sunvdc.c +1 -1
@@ -461,7 +461,7 @@ static int generic_request(struct vdc_port *port, u8 op, void *buf, int len)int op_len, err;void *req_buf; -if (!(((u64 )1 << ((u64 )op -1 )) & port->operations)) +if (!(((u64 )1 << (u64 )op) & port->operations))return -EOPNOTSUPP ;switch (op) {
drivers/dca/dca-core.c +5 -0
@@ -409,6 +409,11 @@ void unregister_dca_provider(struct dca_provider *dca, struct device *dev)spin_lock_irqsave (&dca_lock, flags); +if (list_empty (&dca_domains)) { +raw_spin_unlock_irqrestore (&dca_lock, flags); +return ; + } +list_del (&dca->node); pci_rc =dca_pci_rc_from_dev (dev);
drivers/gpu/drm/drm_usb.c +1 -1
@@ -18,7 +18,7 @@ int drm_get_usb_dev(struct usb_interface *interface, usbdev =interface_to_usbdev (interface); dev->usbdev = usbdev; - dev->dev = &usbdev->dev; + dev->dev = &interface->dev;mutex_lock (&drm_global_mutex);
drivers/gpu/drm/i915/intel_display.c +8 -0
@@ -2898,6 +2898,7 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)struct intel_crtc *intel_crtc =to_intel_crtc (crtc);int pipe = intel_crtc->pipe;int plane = intel_crtc->plane; +u32 pctl;if (!intel_crtc->active)return ;
@@ -2914,6 +2915,13 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)intel_disable_plane (dev_priv, plane, pipe);intel_disable_pipe (dev_priv, pipe); + +/* Disable pannel fitter if it is on this pipe. */ + pctl =I915_READ (PFIT_CONTROL ); +if ((pctl &PFIT_ENABLE ) && + ((pctl &PFIT_PIPE_MASK ) >>PFIT_PIPE_SHIFT ) == pipe) +I915_WRITE (PFIT_CONTROL ,0 ); +intel_disable_pll (dev_priv, pipe); intel_crtc->active = false;
drivers/net/wireless/p54/p54usb.c +1 -1
@@ -83,8 +83,8 @@ static struct usb_device_id p54u_table[] = { {USB_DEVICE(0x06b9, 0x0121)}, /* Thomson SpeedTouch 121g */ {USB_DEVICE(0x0707, 0xee13)}, /* SMC 2862W-G version 2 */ {USB_DEVICE(0x0803, 0x4310)}, /* Zoom 4410a */ - {USB_DEVICE(0x083a, 0x4503)}, /* T-Com Sinus 154 data II */ {USB_DEVICE(0x083a, 0x4521)}, /* Siemens Gigaset USB Adapter 54 version 2 */ + {USB_DEVICE(0x083a, 0x4531)}, /* T-Com Sinus 154 data II */ {USB_DEVICE(0x083a, 0xc501)}, /* Zoom Wireless-G 4410 */ {USB_DEVICE(0x083a, 0xf503)}, /* Accton FD7050E ver 1010ec */ {USB_DEVICE(0x0846, 0x4240)}, /* Netgear WG111 (v2) */
drivers/net/xen-netback/interface.c +1 -2
@@ -132,6 +132,7 @@ static void xenvif_up(struct xenvif *vif)static void xenvif_down (struct xenvif *vif) {disable_irq (vif->irq); +del_timer_sync (&vif->credit_timeout);xen_netbk_deschedule_xenvif (vif);xen_netbk_remove_xenvif (vif); }
@@ -362,8 +363,6 @@ void xenvif_disconnect(struct xenvif *vif)atomic_dec (&vif->refcnt);wait_event (vif->waiting_to_free,atomic_read (&vif->refcnt) ==0 ); -del_timer_sync (&vif->credit_timeout); -if (vif->irq)unbind_from_irqhandler (vif->irq, vif);
drivers/net/xen-netback/netback.c +5 -5
@@ -870,13 +870,13 @@ static int netbk_count_requests(struct xenvif *vif,if (frags >= work_to_do) {netdev_err (vif->dev,"Need more frags\n" );netbk_fatal_tx_err (vif); -return -frags; +return -ENODATA ; }if (unlikely (frags >=MAX_SKB_FRAGS )) {netdev_err (vif->dev,"Too many frags\n" );netbk_fatal_tx_err (vif); -return -frags; +return -E2BIG ; } memcpy(txp, RING_GET_REQUEST(&vif->tx, cons + frags),
@@ -884,7 +884,7 @@ static int netbk_count_requests(struct xenvif *vif,if (txp->size > first->size) {netdev_err (vif->dev,"Frag is bigger than frame.\n" );netbk_fatal_tx_err (vif); -return -frags; +return -EIO ; } first->size -= txp->size;
@@ -894,7 +894,7 @@ static int netbk_count_requests(struct xenvif *vif,netdev_err (vif->dev,"txp->offset: %x, size: %u\n" , txp->offset, txp->size);netbk_fatal_tx_err (vif); -return -frags; +return -EINVAL ; } }while ((txp++)->flags & XEN_NETTXF_more_data);return frags;
@@ -990,7 +990,7 @@ static int xen_netbk_tx_check_gop(struct xen_netbk *netbk,xen_netbk_idx_release (netbk, pending_idx,XEN_NETIF_RSP_ERROR );/* Skip first skb fragment if it is on same page as header fragment. */ - start = ((unsigned long )shinfo->frags[i].page == pending_idx); + start = ((unsigned long )shinfo->frags[0 ].page == pending_idx);for (i = start; i < nr_frags; i++) {int j, newerr;
drivers/pcmcia/vrc4171_card.c +1 -0
@@ -246,6 +246,7 @@ static int pccard_init(struct pcmcia_socket *sock) socket = &vrc4171_sockets[slot]; socket->csc_irq =search_nonuse_irq (); socket->io_irq =search_nonuse_irq (); +spin_lock_init (&socket->lock);return 0 ; }
drivers/s390/kvm/kvm_virtio.c +30 -8
@@ -413,6 +413,26 @@ static void kvm_extint_handler(unsigned int ext_int_code, }/* +* For s390-virtio, we expect a page above main storage containing +* the virtio configuration. Try to actually load from this area +* in order to figure out if the host provides this page. +*/ +static int __init test_devices_support (unsigned long addr) +{ +int ret = -EIO ; + + asmvolatile ( +"0: lura 0,%1\n" +"1: xgr %0,%0\n" +"2:\n" + EX_TABLE(0b,2b) +EX_TABLE (1b ,2b ) + : "+d" (ret) + : "a" (addr) + : "0", "cc"); + return ret; +} +/* * Init function for virtio * devices are in a single page above top of "normal" mem */
@@ -423,21 +443,23 @@ static int __init kvm_devices_init(void)if (!MACHINE_IS_KVM )return -ENODEV ; +if (test_devices_support (real_memory_size) <0 ) +return -ENODEV ; + + rc =vmem_add_mapping (real_memory_size,PAGE_SIZE ); +if (rc) +return rc; + + kvm_devices = (void *) real_memory_size; + kvm_root =root_device_register ("kvm_s390" );if (IS_ERR (kvm_root)) { rc =PTR_ERR (kvm_root);printk (KERN_ERR "Could not register kvm_s390 root device" ); +vmem_remove_mapping (real_memory_size,PAGE_SIZE );return rc; } - rc =vmem_add_mapping (real_memory_size,PAGE_SIZE ); -if (rc) { -root_device_unregister (kvm_root); -return rc; - } - - kvm_devices = (void *) real_memory_size; -INIT_WORK (&hotplug_work, hotplug_devices);service_subclass_irq_register ();
drivers/staging/comedi/comedi_fops.c +5 -0
@@ -136,6 +136,11 @@ static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd,/* Device config is special, because it must work on * an unconfigured device. */ if (cmd ==COMEDI_DEVCONFIG ) { +if (minor >=COMEDI_NUM_BOARD_MINORS ) { +/* Device config not appropriate on non-board minors. */ + rc = -ENOTTY ; + goto done; + } rc =do_devconfig_ioctl (dev, (struct comedi_devconfig __user *)arg);if (rc ==0 )
drivers/staging/hv/hv_kvp.c +6 -4
@@ -201,11 +201,13 @@ kvp_respond_to_host(char *key, char *value, int error)* The windows host expects the key/value pair to be encoded * in utf16. */ - keylen =utf8s_to_utf16s (key_name,strlen (key_name), - (wchar_t *)kvp_data->data.key); + keylen =utf8s_to_utf16s (key_name,strlen (key_name),UTF16_HOST_ENDIAN , + (wchar_t *) kvp_data->data.key, +HV_KVP_EXCHANGE_MAX_KEY_SIZE /2 ); kvp_data->data.key_size =2 *(keylen +1 );/* utf16 encoding */ - valuelen =utf8s_to_utf16s (value,strlen (value), - (wchar_t *)kvp_data->data.value); + valuelen =utf8s_to_utf16s (value,strlen (value),UTF16_HOST_ENDIAN , + (wchar_t *) kvp_data->data.value, +HV_KVP_EXCHANGE_MAX_VALUE_SIZE /2 ); kvp_data->data.value_size =2 *(valuelen +1 );/* utf16 encoding */ kvp_data->data.value_type =REG_SZ ;/* all our values are strings */
drivers/staging/vt6656/usbpipe.c +20 -8
@@ -168,6 +168,11 @@ int PIPEnsControlOut(if (pDevice->Flags & fMP_CONTROL_WRITES)return STATUS_FAILURE ; +if (pDevice->Flags & fMP_CONTROL_READS) +return STATUS_FAILURE ; + +MP_SET_FLAG (pDevice, fMP_CONTROL_WRITES); + pDevice->sUsbCtlRequest.bRequestType =0x40 ; pDevice->sUsbCtlRequest.bRequest = byRequest; pDevice->sUsbCtlRequest.wValue =cpu_to_le16p (&wValue);
@@ -182,12 +187,13 @@ int PIPEnsControlOut( ntStatus =usb_submit_urb (pDevice->pControlURB,GFP_ATOMIC );if (ntStatus !=0 ) { -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "control send request submission failed: %d\n" , ntStatus); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO +"control send request submission failed: %d\n" , + ntStatus); +MP_CLEAR_FLAG (pDevice, fMP_CONTROL_WRITES);return STATUS_FAILURE ; } -else { -MP_SET_FLAG (pDevice, fMP_CONTROL_WRITES); - } +spin_unlock_irq (&pDevice->lock);for (ii =0 ; ii <=USB_CTL_WAIT ; ii ++) {
@@ -227,6 +233,11 @@ int PIPEnsControlIn(if (pDevice->Flags & fMP_CONTROL_READS)return STATUS_FAILURE ; +if (pDevice->Flags & fMP_CONTROL_WRITES) +return STATUS_FAILURE ; + +MP_SET_FLAG (pDevice, fMP_CONTROL_READS); + pDevice->sUsbCtlRequest.bRequestType =0xC0 ; pDevice->sUsbCtlRequest.bRequest = byRequest; pDevice->sUsbCtlRequest.wValue =cpu_to_le16p (&wValue);
@@ -240,10 +251,11 @@ int PIPEnsControlIn( ntStatus =usb_submit_urb (pDevice->pControlURB,GFP_ATOMIC );if (ntStatus !=0 ) { -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "control request submission failed: %d\n" , ntStatus); - }else { -MP_SET_FLAG (pDevice, fMP_CONTROL_READS); - } +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO +"control request submission failed: %d\n" , ntStatus); +MP_CLEAR_FLAG (pDevice, fMP_CONTROL_READS); +return STATUS_FAILURE ; + }spin_unlock_irq (&pDevice->lock);for (ii =0 ; ii <=USB_CTL_WAIT ; ii ++) {
drivers/tty/tty_ioctl.c +2 -2
@@ -617,7 +617,7 @@ static int set_termios(struct tty_struct *tty, void __user *arg, int opt)if (opt &TERMIOS_WAIT ) {tty_wait_until_sent (tty,0 );if (signal_pending (current)) -return -EINTR ; +return -ERESTARTSYS ; }tty_set_termios (tty, &tmp_termios);
@@ -684,7 +684,7 @@ static int set_termiox(struct tty_struct *tty, void __user *arg, int opt)if (opt &TERMIOS_WAIT ) {tty_wait_until_sent (tty,0 );if (signal_pending (current)) -return -EINTR ; +return -ERESTARTSYS ; }mutex_lock (&tty->termios_mutex);
drivers/tty/vt/vt.c +97 -37
249 lines not on this page · raw message
drivers/usb/host/ehci-omap.c +1 -1
@@ -321,7 +321,7 @@ static const struct hc_driver ehci_omap_hc_driver = { .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, }; -MODULE_ALIAS ("platform:omap-ehci" ); +MODULE_ALIAS ("platform:ehci-omap" );MODULE_AUTHOR ("Texas Instruments, Inc." );MODULE_AUTHOR ("Felipe Balbi <[email protected]>" );
drivers/usb/serial/option.c +15 -1
@@ -479,6 +479,7 @@ static const struct option_blacklist_info four_g_w14_blacklist = {static const struct option_blacklist_info alcatel_x200_blacklist = { .sendsetup =BIT (0 ) |BIT (1 ), + .reserved =BIT (4 ), };static const struct option_blacklist_info zte_0037_blacklist = {
@@ -575,8 +576,14 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLX) }, { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GKE) }, { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) }, + { USB_DEVICE(QUANTA_VENDOR_ID, 0xea42), + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c05, USB_CLASS_COMM, 0x02, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c23, USB_CLASS_COMM, 0x02, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t) &net_intf1_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1441, USB_CLASS_COMM, 0x02, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1442, USB_CLASS_COMM, 0x02, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff),
@@ -1215,7 +1222,14 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200), .driver_info = (kernel_ulong_t)&alcatel_x200_blacklist }, - { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X220_X500D) }, + { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X220_X500D), + .driver_info = (kernel_ulong_t)&net_intf6_blacklist }, + { USB_DEVICE(ALCATEL_VENDOR_ID, 0x0052), + .driver_info = (kernel_ulong_t)&net_intf6_blacklist }, + { USB_DEVICE(ALCATEL_VENDOR_ID, 0x00b6), + .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, + { USB_DEVICE(ALCATEL_VENDOR_ID, 0x00b7), + .driver_info = (kernel_ulong_t)&net_intf5_blacklist }, { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_L100V), .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) },
drivers/usb/storage/initializers.c +2 -2
@@ -147,7 +147,7 @@ static int usb_stor_huawei_dongles_pid(struct us_data *us)int idProduct; idesc = &us->pusb_intf->cur_altsetting->desc; - idProduct = us->pusb_dev->descriptor.idProduct; + idProduct =le16_to_cpu (us->pusb_dev->descriptor.idProduct);/* The first port is CDROM, * means the dongle in the single port mode, * and a switch command is required to be sent. */
@@ -169,7 +169,7 @@ int usb_stor_huawei_init(struct us_data *us)int result =0 ;if (usb_stor_huawei_dongles_pid (us)) { -if (us->pusb_dev->descriptor.idProduct >=0x1446 ) +if (le16_to_cpu (us->pusb_dev->descriptor.idProduct) >=0x1446 ) result =usb_stor_huawei_scsi_init (us);else result =usb_stor_huawei_feature_init (us);
drivers/usb/storage/unusual_cypress.h +1 -1
@@ -31,7 +31,7 @@ UNUSUAL_DEV( 0x04b4, 0x6831, 0x0000, 0x9999, "Cypress ISD-300LP", USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0), -UNUSUAL_DEV (0x14cd ,0x6116 ,0x0000 ,0x9999 , +UNUSUAL_DEV (0x14cd ,0x6116 ,0x0000 ,0x0219 ,"Super Top" ,"USB 2.0 SATA BRIDGE" , USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),
drivers/video/backlight/adp8860_bl.c +1 -1
@@ -793,7 +793,7 @@ static int adp8860_i2c_suspend(struct i2c_client *client, pm_message_t message)static int adp8860_i2c_resume (struct i2c_client *client) { -adp8860_set_bits (client,ADP8860_MDCR ,NSTBY ); +adp8860_set_bits (client,ADP8860_MDCR ,NSTBY |BLEN );return 0 ; }
drivers/video/backlight/adp8870_bl.c +1 -1
@@ -968,7 +968,7 @@ static int adp8870_i2c_suspend(struct i2c_client *client, pm_message_t message)static int adp8870_i2c_resume (struct i2c_client *client) { -adp8870_set_bits (client,ADP8870_MDCR ,NSTBY ); +adp8870_set_bits (client,ADP8870_MDCR ,NSTBY |BLEN );return 0 ; }
drivers/video/console/fbcon.c +40 -7
109 lines not on this page · raw message
drivers/video/fbmem.c +6 -3
@@ -1628,7 +1628,9 @@ static int do_register_framebuffer(struct fb_info *fb_info) event.info = fb_info;if (!lock_fb_info (fb_info))return -ENODEV ; +console_lock ();fb_notifier_call_chain (FB_EVENT_FB_REGISTERED , &event); +console_unlock ();unlock_fb_info (fb_info);return 0 ; }
@@ -1644,8 +1646,10 @@ static int do_unregister_framebuffer(struct fb_info *fb_info)if (!lock_fb_info (fb_info))return -ENODEV ; +console_lock (); event.info = fb_info; ret =fb_notifier_call_chain (FB_EVENT_FB_UNBIND , &event); +console_unlock ();unlock_fb_info (fb_info);if (ret)
@@ -1660,7 +1664,9 @@ static int do_unregister_framebuffer(struct fb_info *fb_info) num_registered_fb--;fb_cleanup_device (fb_info); event.info = fb_info; +console_lock ();fb_notifier_call_chain (FB_EVENT_FB_UNREGISTERED , &event); +console_unlock ();/* this may free fb info */ put_fb_info (fb_info);
@@ -1831,11 +1837,8 @@ int fb_new_modelist(struct fb_info *info) err =1 ;if (!list_empty (&info->modelist)) { -if (!lock_fb_info (info)) -return -ENODEV ; event.info = info; err =fb_notifier_call_chain (FB_EVENT_NEW_MODELIST , &event); -unlock_fb_info (info); }return err;
drivers/video/fbsysfs.c +3 -0
@@ -175,6 +175,8 @@ static ssize_t store_modes(struct device *device,if (i *sizeof (struct fb_videomode ) != count)return -EINVAL ; +if (!lock_fb_info (fb_info)) +return -ENODEV ;console_lock ();list_splice (&fb_info->modelist, &old_list); fb_videomode_to_modelist((const struct fb_videomode *)buf, i,
@@ -186,6 +188,7 @@ static ssize_t store_modes(struct device *device,fb_destroy_modelist (&old_list);console_unlock (); +unlock_fb_info (fb_info);return 0 ; }
fs/ext4/resize.c +1 -0
@@ -499,6 +499,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,return err; exit_inode: +kfree (n_group_desc);/* ext4_handle_release_buffer(handle, iloc.bh); */ brelse (iloc.bh); exit_dindj:
fs/ext4/super.c +11 -8
@@ -3681,22 +3681,19 @@ no_journal:if (err) {ext4_msg (sb,KERN_ERR ,"failed to initialize mballoc (%d)" , err); - goto failed_mount4; + goto failed_mount5; } err =ext4_register_li_request (sb, first_not_zeroed);if (err) - goto failed_mount4; + goto failed_mount6; sbi->s_kobj.kset = ext4_kset;init_completion (&sbi->s_kobj_unregister); err =kobject_init_and_add (&sbi->s_kobj, &ext4_ktype,NULL ,"%s" , sb->s_id); -if (err) { -ext4_mb_release (sb); -ext4_ext_release (sb); - goto failed_mount4; - }; +if (err) + goto failed_mount7;EXT4_SB (sb)->s_mount_state |=EXT4_ORPHAN_FS ;ext4_orphan_cleanup (sb, es);
@@ -3730,13 +3727,19 @@ cantfind_ext4:ext4_msg (sb,KERN_ERR ,"VFS: Can't find ext4 filesystem" ); goto failed_mount; +failed_mount7: +ext4_unregister_li_request (sb); +failed_mount6: +ext4_ext_release (sb); +failed_mount5: +ext4_mb_release (sb); +ext4_release_system_zone (sb); failed_mount4:iput (root); sb->s_root =NULL ;ext4_msg (sb,KERN_ERR ,"mount failed" );destroy_workqueue (EXT4_SB (sb)->dio_unwritten_wq); failed_mount_wq: -ext4_release_system_zone (sb);if (sbi->s_journal) {jbd2_journal_destroy (sbi->s_journal); sbi->s_journal =NULL ;
fs/fat/namei_vfat.c +2 -1
@@ -514,7 +514,8 @@ xlate_to_uni(const unsigned char *name, int len, unsigned char *outname,int charlen;if (utf8) { - *outlen =utf8s_to_utf16s (name, len, (wchar_t *)outname); + *outlen =utf8s_to_utf16s (name, len,UTF16_HOST_ENDIAN , + (wchar_t *) outname,FAT_LFN_LEN +2 );if (*outlen <0 )return *outlen;else if (*outlen >FAT_LFN_LEN )
fs/lockd/clntproc.c +3 -0
@@ -550,6 +550,9 @@ again: status =nlmclnt_block (block, req,NLMCLNT_POLL_TIMEOUT );if (status <0 )break ; +/* Resend the blocking lock request after a server reboot */ +if (resp->status == nlm_lck_denied_grace_period) +continue ;if (resp->status != nlm_lck_blocked)break ; }
fs/nls/nls_base.c +33 -10
67 lines not on this page · raw message
fs/notify/inotify/inotify_user.c +0 -4
@@ -579,8 +579,6 @@ static int inotify_update_existing_watch(struct fsnotify_group *group,/* don't allow invalid bits: we don't want flags set */ mask =inotify_arg_to_mask (arg); -if (unlikely (!(mask &IN_ALL_EVENTS ))) -return -EINVAL ; fsn_mark =fsnotify_find_inode_mark (group, inode);if (!fsn_mark)
@@ -632,8 +630,6 @@ static int inotify_new_watch(struct fsnotify_group *group,/* don't allow invalid bits: we don't want flags set */ mask =inotify_arg_to_mask (arg); -if (unlikely (!(mask &IN_ALL_EVENTS ))) -return -EINVAL ; tmp_i_mark =kmem_cache_alloc (inotify_inode_mark_cachep,GFP_KERNEL );if (unlikely (!tmp_i_mark))
fs/ocfs2/dlmglue.c +4 -1
@@ -2539,6 +2539,7 @@ int ocfs2_super_lock(struct ocfs2_super *osb,* everything is up to the caller :) */ status =ocfs2_should_refresh_lock_res (lockres);if (status <0 ) { +ocfs2_cluster_unlock (osb, lockres, level);mlog_errno (status); goto bail; }
@@ -2547,8 +2548,10 @@ int ocfs2_super_lock(struct ocfs2_super *osb,ocfs2_complete_lock_res_refresh (lockres, status); -if (status <0 ) +if (status <0 ) { +ocfs2_cluster_unlock (osb, lockres, level);mlog_errno (status); + }ocfs2_track_lock_refresh (lockres); } bail:
include/linux/console.h +2 -0
@@ -77,7 +77,9 @@ extern const struct consw prom_con; /* SPARC PROM console */int con_is_bound (const struct consw *csw);int register_con_driver (const struct consw *csw,int first,int last);int unregister_con_driver (const struct consw *csw); +int do_unregister_con_driver (const struct consw *csw);int take_over_console (const struct consw *sw,int first,int last,int deflt); +int do_take_over_console (const struct consw *sw,int first,int last,int deflt);void give_up_console (const struct consw *sw);#ifdef CONFIG_HW_CONSOLE int con_debug_enter (struct vc_data *vc);
include/linux/mmu_notifier.h +1 -0
@@ -4,6 +4,7 @@#include <linux/list.h> #include <linux/spinlock.h> #include <linux/mm_types.h> +#include <linux/srcu.h> struct mmu_notifier ;struct mmu_notifier_ops ;
include/linux/nls.h +3 -2
@@ -43,7 +43,7 @@ enum utf16_endian { UTF16_BIG_ENDIAN }; -/* nls.c */ +/* nls_base.c */ extern int register_nls (struct nls_table *);extern int unregister_nls (struct nls_table *);extern struct nls_table *load_nls (char *);
@@ -52,7 +52,8 @@ extern struct nls_table *load_nls_default(void);extern int utf8_to_utf32 (const u8 *s,int len,unicode_t *pu);extern int utf32_to_utf8 (unicode_t u,u8 *s,int maxlen); -extern int utf8s_to_utf16s (const u8 *s,int len,wchar_t *pwcs); +extern int utf8s_to_utf16s (const u8 *s,int len, +enum utf16_endian endian,wchar_t *pwcs,int maxlen);extern int utf16s_to_utf8s (const wchar_t *pwcs,int len,enum utf16_endian endian,u8 *s,int maxlen);
include/linux/usb/audio.h +4 -2
@@ -384,14 +384,16 @@ static inline __u8 uac_processing_unit_iProcessing(struct uac_processing_unit_de int protocol) {__u8 control_size =uac_processing_unit_bControlSize (desc, protocol); -return desc->baSourceID[desc->bNrInPins + control_size]; +return *(uac_processing_unit_bmControls (desc, protocol) + + control_size); }static inline __u8 *uac_processing_unit_specific (struct uac_processing_unit_descriptor *desc,int protocol) {__u8 control_size =uac_processing_unit_bControlSize (desc, protocol); -return &desc->baSourceID[desc->bNrInPins + control_size +1 ]; +return uac_processing_unit_bmControls (desc, protocol) + + control_size +1 ; }/* 4.5.2 Class-Specific AS Interface Descriptor */
include/linux/vt_kern.h +2 -0
@@ -131,6 +131,8 @@ void vt_event_post(unsigned int event, unsigned int old, unsigned int new);int vt_waitactive (int n);void change_console (struct vc_data *new_vc);void reset_vc (struct vc_data *vc); +extern int do_unbind_con_driver (const struct consw *csw,int first,int last, +int deflt);extern int unbind_con_driver (const struct consw *csw,int first,int last,int deflt);int vty_init (const struct file_operations *console_fops);
include/net/inet6_hashtables.h +4 -4
@@ -28,16 +28,16 @@struct inet_hashinfo ; -/* I have no idea if this is a good hash for v6 or not. -DaveM */ static inline unsigned int inet6_ehashfn (struct net *net,const struct in6_addr *laddr,const u16 lport,const struct in6_addr *faddr,const __be16 fport) { -u32 ports = (lport ^ (__force u16 )fport); +u32 ports = (((u32 )lport) <<16 ) | (__force u32 )fport;return jhash_3words ((__force u32 )laddr->s6_addr32[3 ], - (__force u32 )faddr->s6_addr32[3 ], - ports, inet_ehash_secret +net_hash_mix (net)); +ipv6_addr_jhash (faddr), + ports, + inet_ehash_secret +net_hash_mix (net)); }static inline int inet6_sk_ehashfn (const struct sock *sk)
include/net/inet_sock.h +1 -0
@@ -199,6 +199,7 @@ static inline void inet_sk_copy_descendant(struct sock *sk_to,extern int inet_sk_rebuild_header (struct sock *sk);extern u32 inet_ehash_secret; +extern u32 ipv6_hash_secret;extern void build_ehash_secret (void ); static inline unsigned int inet_ehashfn(struct net *net,
include/net/ipv6.h +12 -0
@@ -15,6 +15,7 @@#include <linux/ipv6.h> #include <linux/hardirq.h> +#include <linux/jhash.h> #include <net/if_inet6.h> #include <net/ndisc.h> #include <net/flow.h>
@@ -386,6 +387,17 @@ struct ip6_create_arg {void ip6_frag_init (struct inet_frag_queue *q,void *a);int ip6_frag_match (struct inet_frag_queue *q,void *a); +/* more secured version of ipv6_addr_hash() */ +static inline u32 ipv6_addr_jhash (const struct in6_addr *a) +{ +u32 v = (__force u32 )a->s6_addr32[0 ] ^ (__force u32 )a->s6_addr32[1 ]; + +return jhash_3words (v, + (__force u32 )a->s6_addr32[2 ], + (__force u32 )a->s6_addr32[3 ], + ipv6_hash_secret); +} +static inline int ipv6_addr_any (const struct in6_addr *a) { return (a->s6_addr32[0] | a->s6_addr32[1] |
kernel/hrtimer.c +18 -18
@@ -640,21 +640,9 @@ static inline void hrtimer_init_hres(struct hrtimer_cpu_base *base)* and expiry check is done in the hrtimer_interrupt or in the softirq. */ static inline int hrtimer_enqueue_reprogram (struct hrtimer *timer, -struct hrtimer_clock_base *base, -int wakeup) +struct hrtimer_clock_base *base) { -if (base->cpu_base->hres_active &&hrtimer_reprogram (timer, base)) { -if (wakeup) { -raw_spin_unlock (&base->cpu_base->lock); -raise_softirq_irqoff (HRTIMER_SOFTIRQ ); -raw_spin_lock (&base->cpu_base->lock); - }else -__raise_softirq_irqoff (HRTIMER_SOFTIRQ ); - -return 1 ; - } - -return 0 ; +return base->cpu_base->hres_active &&hrtimer_reprogram (timer, base); }static inline ktime_t hrtimer_update_base (struct hrtimer_cpu_base *base)
@@ -735,8 +723,7 @@ static inline int hrtimer_switch_to_hres(void) { return 0; }static inline void hrtimer_force_reprogram (struct hrtimer_cpu_base *base,int skip_equal) { }static inline int hrtimer_enqueue_reprogram (struct hrtimer *timer, -struct hrtimer_clock_base *base, -int wakeup) +struct hrtimer_clock_base *base) {return 0 ; }
@@ -995,8 +982,21 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,* * XXX send_remote_softirq() ? */ -if (leftmost && new_base->cpu_base == &__get_cpu_var (hrtimer_bases)) -hrtimer_enqueue_reprogram (timer, new_base, wakeup); +if (leftmost && new_base->cpu_base == &__get_cpu_var (hrtimer_bases) + &&hrtimer_enqueue_reprogram (timer, new_base)) { +if (wakeup) { +/* +* We need to drop cpu_base->lock to avoid a +* lock ordering issue vs. rq->lock. +*/ +raw_spin_unlock (&new_base->cpu_base->lock); +raise_softirq_irqoff (HRTIMER_SOFTIRQ ); +local_irq_restore (flags); +return ret; + }else { +__raise_softirq_irqoff (HRTIMER_SOFTIRQ ); + } + }unlock_hrtimer_base (timer, &flags);
kernel/irq/spurious.c +3 -4
@@ -80,13 +80,11 @@ static int try_one_irq(int irq, struct irq_desc *desc, bool force)/* * All handlers must agree on IRQF_SHARED, so we test just the -* first. Check for action->next as well. +* first. */ action = desc->action;if (!action || !(action->flags &IRQF_SHARED ) || - (action->flags & __IRQF_TIMER) || - (action->handler (irq, action->dev_id) ==IRQ_HANDLED ) || - !action->next) + (action->flags & __IRQF_TIMER)) goto out;/* Already running on another processor */
@@ -104,6 +102,7 @@ static int try_one_irq(int irq, struct irq_desc *desc, bool force)do {if (handle_irq_event (desc) ==IRQ_HANDLED ) ret =IRQ_HANDLED ; +/* Make sure that there is still a valid action */ action = desc->action; }while ((desc->istate &IRQS_PENDING ) && action); desc->istate &= ~IRQS_POLL_INPROGRESS ;
kernel/posix-cpu-timers.c +21 -2
@@ -1450,8 +1450,10 @@ static int do_cpu_nanosleep(const clockid_t which_clock, int flags,while (!signal_pending (current)) {if (timer.it.cpu.expires.sched ==0 ) {/* -* Our timer fired and was reset. +* Our timer fired and was reset, below +* deletion can not fail. */ +posix_cpu_timer_del (&timer);spin_unlock_irq (&timer.it_lock);return 0 ; }
@@ -1469,9 +1471,26 @@ static int do_cpu_nanosleep(const clockid_t which_clock, int flags,* We were interrupted by a signal. */ sample_to_timespec (which_clock, timer.it.cpu.expires, rqtp); -posix_cpu_timer_set (&timer,0 , &zero_it, it); + error =posix_cpu_timer_set (&timer,0 , &zero_it, it); +if (!error) { +/* +* Timer is now unarmed, deletion can not fail. +*/ +posix_cpu_timer_del (&timer); + }spin_unlock_irq (&timer.it_lock); +while (error ==TIMER_RETRY ) { +/* +* We need to handle case when timer was or is in the +* middle of firing. In other cases we already freed +* resources. +*/ +spin_lock_irq (&timer.it_lock); + error =posix_cpu_timer_del (&timer); +spin_unlock_irq (&timer.it_lock); + } +if ((it->it_value.tv_sec | it->it_value.tv_nsec) ==0 ) {/* * It actually did fire already.
kernel/timeconst.pl +2 -4
@@ -369,10 +369,8 @@ if ($hz eq '--can') { die "Usage: $0 HZ\n"; } - @val = @{$canned_values{$hz}}; - if (!defined(@val)) { - @val = compute_values($hz); - } + $cv = $canned_values{$hz}; + @val = defined($cv) ? @$cv : compute_values($hz); output($hz, @val); } exit 0;
mm/fadvise.c +16 -2
@@ -17,6 +17,7 @@#include <linux/fadvise.h> #include <linux/writeback.h> #include <linux/syscalls.h> +#include <linux/swap.h> #include <asm/unistd.h>
@@ -123,9 +124,22 @@ SYSCALL_DEFINE(fadvise64_64)(int fd, loff_t offset, loff_t len, int advice) start_index = (offset+(PAGE_CACHE_SIZE -1 )) >>PAGE_CACHE_SHIFT ; end_index = (endbyte >>PAGE_CACHE_SHIFT ); -if (end_index >= start_index) -invalidate_mapping_pages (mapping, start_index, +if (end_index >= start_index) { +unsigned long count =invalidate_mapping_pages (mapping, + start_index, end_index); + +/* +* If fewer pages were invalidated than expected then +* it is possible that some of the pages were on +* a per-cpu pagevec for a remote CPU. Drain all +* pagevecs and try again. +*/ +if (count < (end_index - start_index +1 )) { +lru_add_drain_all (); +invalidate_mapping_pages (mapping, start_index, end_index); + } + }break ;default : ret = -EINVAL ;
mm/mmu_notifier.c +86 -61
287 lines not on this page · raw message
mm/page_alloc.c +9 -6
@@ -4264,10 +4264,11 @@ static void __meminit calculate_node_totalpages(struct pglist_data *pgdat,* round what is now in bits to nearest long in bits, then return it in * bytes. */ -static unsigned long __init usemap_size (unsigned long zonesize) +static unsigned long __init usemap_size (unsigned long zone_start_pfn,unsigned long zonesize) {unsigned long usemapsize; + zonesize += zone_start_pfn & (pageblock_nr_pages-1 ); usemapsize =roundup (zonesize, pageblock_nr_pages); usemapsize = usemapsize >> pageblock_order; usemapsize *=NR_PAGEBLOCK_BITS ;
@@ -4277,17 +4278,19 @@ static unsigned long __init usemap_size(unsigned long zonesize) }static void __init setup_usemap (struct pglist_data *pgdat, -struct zone *zone,unsigned long zonesize) +struct zone *zone, +unsigned long zone_start_pfn, +unsigned long zonesize) { -unsigned long usemapsize =usemap_size (zonesize); +unsigned long usemapsize =usemap_size (zone_start_pfn, zonesize); zone->pageblock_flags =NULL ;if (usemapsize) zone->pageblock_flags =alloc_bootmem_node_nopanic (pgdat, usemapsize); }#else -static inline void setup_usemap (struct pglist_data *pgdat, -struct zone *zone,unsigned long zonesize) {} +static inline void setup_usemap (struct pglist_data *pgdat,struct zone *zone, +unsigned long zone_start_pfn,unsigned long zonesize) {}#endif /* CONFIG_SPARSEMEM */ #ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE
@@ -4415,7 +4418,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat,continue ;set_pageblock_order (pageblock_default_order ()); -setup_usemap (pgdat, zone, size); +setup_usemap (pgdat, zone, zone_start_pfn, size); ret =init_currently_empty_zone (zone, zone_start_pfn, size,MEMMAP_EARLY );BUG_ON (ret);
mm/shmem.c +8 -2
@@ -2505,6 +2505,7 @@ static int shmem_remount_fs(struct super_block *sb, int *flags, char *data)unsigned long inodes;int error = -EINVAL ; + config.mpol =NULL ;if (shmem_parse_options (data, &config, true))return error;
@@ -2530,8 +2531,13 @@ static int shmem_remount_fs(struct super_block *sb, int *flags, char *data) sbinfo->max_inodes = config.max_inodes; sbinfo->free_inodes = config.max_inodes - inodes; -mpol_put (sbinfo->mpol); - sbinfo->mpol = config.mpol;/* transfers initial ref */ +/* +* Preserve previous mempolicy unless mpol remount option was specified. +*/ +if (config.mpol) { +mpol_put (sbinfo->mpol); + sbinfo->mpol = config.mpol;/* transfers initial ref */ + } out:spin_unlock (&sbinfo->stat_lock);return error;
net/bridge/br_stp_bpdu.c +2 -0
@@ -16,6 +16,7 @@#include <linux/etherdevice.h> #include <linux/llc.h> #include <linux/slab.h> +#include <linux/pkt_sched.h> #include <net/net_namespace.h> #include <net/llc.h> #include <net/llc_pdu.h>
@@ -40,6 +41,7 @@ static void br_send_bpdu(struct net_bridge_port *p, skb->dev = p->dev; skb->protocol =htons (ETH_P_802_2 ); + skb->priority =TC_PRIO_CONTROL ;skb_reserve (skb,LLC_RESERVE );memcpy (__skb_put (skb, length), data, length);
net/ipv4/af_inet.c +7 -2
@@ -226,8 +226,12 @@ EXPORT_SYMBOL(inet_listen);u32 inet_ehash_secret__read_mostly ;EXPORT_SYMBOL (inet_ehash_secret); +u32 ipv6_hash_secret__read_mostly ; +EXPORT_SYMBOL (ipv6_hash_secret); +/* -* inet_ehash_secret must be set exactly once +* inet_ehash_secret must be set exactly once, and to a non nul value +* ipv6_hash_secret must be set exactly once. */ void build_ehash_secret (void ) {
@@ -237,7 +241,8 @@ void build_ehash_secret(void)get_random_bytes (&rnd,sizeof (rnd)); }while (rnd ==0 ); -cmpxchg (&inet_ehash_secret,0 , rnd); +if (cmpxchg (&inet_ehash_secret,0 , rnd) ==0 ) +get_random_bytes (&ipv6_hash_secret,sizeof (ipv6_hash_secret)); }EXPORT_SYMBOL (build_ehash_secret);
net/ipv4/ping.c +2 -2
@@ -320,8 +320,8 @@ void ping_err(struct sk_buff *skb, u32 info)struct iphdr *iph = (struct iphdr *)skb->data;struct icmphdr *icmph = (struct icmphdr *)(skb->data+(iph->ihl<<2 ));struct inet_sock *inet_sock; -int type = icmph->type; -int code = icmph->code; +int type =icmp_hdr (skb)->type; +int code =icmp_hdr (skb)->code;struct net *net =dev_net (skb->dev);struct sock *sk;int harderr;
sound/pci/ali5451/ali5451.c +1 -1
@@ -1435,7 +1435,7 @@ static snd_pcm_uframes_t snd_ali_pointer(struct snd_pcm_substream *substream)spin_lock (&codec->reg_lock);if (!pvoice->running) { -spin_unlock_irq (&codec->reg_lock); +spin_unlock (&codec->reg_lock);return 0 ; }outb (pvoice->number,ALI_REG (codec,ALI_GC_CIR ));
sound/pci/rme32.c +1 -1
@@ -1017,7 +1017,7 @@ static int snd_rme32_capture_close(struct snd_pcm_substream *substream)spin_lock_irq (&rme32->lock); rme32->capture_substream =NULL ; rme32->capture_periodsize =0 ; -spin_unlock (&rme32->lock); +spin_unlock_irq (&rme32->lock);return 0 ; }
sound/usb/quirks-table.h +1 -1
@@ -1613,7 +1613,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {/* .vendor_name = "Roland", */ /* .product_name = "A-PRO", */ - .ifnum =1 , + .ifnum =0 , .type =QUIRK_MIDI_FIXED_ENDPOINT , .data = & (const struct snd_usb_midi_endpoint_info ) { .out_cables =0x0003 ,