Linux 3.4.25
Greg KH
maintainerI'm announcing the release of the 3.4.25 kernel.
All users of the 3.4 kernel series must upgrade.
The updated 3.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.4.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
------------
Documentation/networking/ip-sysctl.txt | 5 Makefile | 2 arch/arm/kernel/swp_emulate.c | 2 arch/arm/mach-realview/include/mach/board-eb.h | 2 arch/arm/mm/mmu.c | 2 arch/cris/include/asm/io.h | 39 ++ arch/sparc/include/asm/hugetlb.h | 10 arch/x86/kernel/cpu/amd.c | 14 + drivers/acpi/scan.c | 2 drivers/acpi/sleep.c | 348 ++++++++++++------------- drivers/atm/solos-pci.c | 5 drivers/bluetooth/ath3k.c | 1 drivers/bluetooth/btusb.c | 1 drivers/hid/hid-core.c | 1 drivers/input/joystick/walkera0701.c | 7 drivers/input/mouse/sentelic.c | 2 drivers/input/serio/i8042-x86ia64io.h | 9 drivers/misc/sgi-xp/xpc_main.c | 34 ++ drivers/net/bonding/bond_main.c | 7 drivers/net/bonding/bond_sysfs.c | 2 drivers/net/can/dev.c | 3 drivers/net/ethernet/8390/ne.c | 1 drivers/net/irda/sir_dev.c | 2 drivers/net/usb/ipheth.c | 5 drivers/net/wireless/b43/dma.c | 7 drivers/net/wireless/b43/main.c | 12 drivers/net/wireless/b43/pio.c | 4 drivers/net/wireless/b43legacy/b43legacy.h | 5 drivers/net/wireless/b43legacy/main.c | 37 ++ drivers/net/wireless/p54/p54usb.c | 4 drivers/net/wireless/rtlwifi/usb.c | 7 drivers/pci/quirks.c | 7 drivers/pnp/pnpacpi/core.c | 2 drivers/rtc/rtc-vt8500.c | 11 drivers/usb/gadget/f_ecm.c | 4 drivers/usb/gadget/f_eem.c | 5 drivers/usb/gadget/f_midi.c | 1 drivers/usb/gadget/f_ncm.c | 4 drivers/usb/gadget/f_phonet.c | 8 drivers/usb/gadget/f_rndis.c | 4 drivers/usb/gadget/f_subset.c | 4 drivers/usb/gadget/f_uvc.c | 39 +- drivers/usb/host/ehci-pci.c | 3 drivers/usb/host/pci-quirks.c | 4 drivers/usb/host/xhci-mem.c | 9 drivers/usb/host/xhci-ring.c | 32 +- drivers/usb/host/xhci.c | 4 drivers/usb/musb/cppi_dma.c | 1 drivers/virtio/virtio_ring.c | 7 fs/binfmt_misc.c | 5 fs/binfmt_script.c | 4 fs/exec.c | 15 + fs/nfs/client.c | 3 fs/nfs/dir.c | 11 fs/nfs/nfs4proc.c | 21 + fs/nfs/super.c | 2 fs/nfsd/nfs4proc.c | 8 fs/nfsd/nfs4state.c | 2 fs/nfsd/nfs4xdr.c | 11 fs/nfsd/nfssvc.c | 2 fs/nfsd/vfs.c | 10 fs/splice.c | 4 include/asm-generic/tlb.h | 9 include/linux/binfmts.h | 1 include/linux/freezer.h | 50 +++ include/linux/page-flags.h | 8 include/linux/pci_ids.h | 1 include/linux/snmp.h | 3 include/net/inet_connection_sock.h | 1 include/net/tcp.h | 1 kernel/cgroup.c | 2 kernel/irq/manage.c | 23 + lib/atomic64.c | 17 - mm/memory.c | 5 mm/mempolicy.c | 64 +--- mm/page-writeback.c | 25 + net/batman-adv/bat_iv_ogm.c | 2 net/bluetooth/hci_core.c | 2 net/bluetooth/rfcomm/sock.c | 4 net/dccp/ipv4.c | 4 net/dccp/ipv6.c | 3 net/ipv4/inet_connection_sock.c | 16 + net/ipv4/inet_diag.c | 154 ++++++++--- net/ipv4/ip_fragment.c | 19 - net/ipv4/proc.c | 3 net/ipv4/sysctl_net_ipv4.c | 7 net/ipv4/tcp_input.c | 93 ++++-- net/ipv4/tcp_ipv4.c | 6 net/ipv6/tcp_ipv6.c | 3 net/sched/sch_htb.c | 2 net/sctp/chunk.c | 20 + net/sctp/socket.c | 4 sound/pci/hda/patch_realtek.c | 4 sound/pci/hda/patch_sigmatel.c | 2 sound/usb/midi.c | 91 ++++-- 95 files changed, 992 insertions(+), 486 deletions(-)
Akinobu Mita (1):
batman-adv: fix random jitter calculation
Al Viro (1):
ARM: missing ->mmap_sem around find_vma() in swp_emulate.c
Alan Cox (2):
ne2000: add the right platform device
pnpacpi: fix incorrect TEST_ALPHA() test
Alexander Shiyan (1):
irda: sir_dev: Fix copy/paste typo
Alexander Stein (1):
can: Do not call dev_put if restart timer is running upon close
Alexis R. Cortes (1):
usb: host: xhci: Stricter conditional for Z1 system models for Compliance Mode Patch
Andre Przywara (1):
x86, amd: Disable way access filter on Piledriver CPUs
Andy Lutomirski (1):
PCI: Reduce Ricoh 0xe822 SD card reader base clock frequency to 50MHz
Ben Hutchings (1):
HID: Add Apple wireless keyboard 2011 ANSI to special driver list
Bryan Schumaker (1):
NFS: Add sequence_priviliged_ops for nfs4_proc_sequence()
Christian Lamparter (1):
p54usb: add USBIDs for two more p54usb devices
Christoffer Dall (1):
mm: Fix PageHead when !CONFIG_PAGEFLAGS_EXTENDED
Christoph Paasch (1):
inet: Fix kmemleak in tcp_v4/6_syn_recv_sock and dccp_v4/6_request_recv_sock
Christophe TORDEUX (1):
Input: sentelic - only report position of first finger as ST coordinates
Corey Minyard (1):
CRIS: fix I/O macros
Dave Kleikamp (1):
sparc: huge_ptep_set_* functions need to call set_huge_pte_at()
David Woodhouse (1):
solos-pci: fix double-free of TX skb in DMA mode
Eric Dumazet (6):
tcp: fix MSG_SENDPAGE_NOTLAST logic
tcp: implement RFC 5961 3.2
tcp: implement RFC 5961 4.2
tcp: refine SYN handling in tcp_validate_incoming
tcp: tcp_replace_ts_recent() should not be called from tcp_validate_incoming()
tcp: RFC 5961 5.2 Blind Data Injection Attack Mitigation
Felix Fietkau (1):
b43: fix tx path skb leaks
Greg Kroah-Hartman (1):
Linux 3.4.25
Gustavo Padovan (2):
Bluetooth: Add missing lock nesting notation
Bluetooth: cancel power_on work when unregistering the device
Hugh Dickins (1):
tmpfs mempolicy: fix /proc/mounts corrupting memory
J. Bruce Fields (2):
nfsd: fix v4 reply caching
nfsd4: fix oops on unusual readlike compound
Jay Purohit (1):
usb/ipheth: Add iPhone 5 support
Johannes Berg (1):
ipv4: ip_check_defrag must not modify skb before unsharing
Julius Werner (1):
xhci: fix null-pointer dereference when destroying half-built segment rings
Jussi Kivilinna (1):
rtlwifi: fix incorrect use of usb_alloc_coherent with usb_control_msg
Kees Cook (1):
exec: do not leave bprm->interp on stack
Larry Finger (1):
b43legacy: Fix firmware loading when driver is built into the kernel
Marcos Chaparro (1):
Bluetooth: ath3k: Add support for VAIO VPCEH [0489:e027]
Michal Hocko (1):
mm: limit mmu_gather batching to fix soft lockups on !CONFIG_PREEMPT
Neal Cardwell (4):
inet_diag: fix oops for IPv4 AF_INET6 TCP SYN-RECV state
inet_diag: validate byte code to prevent oops in inet_diag_bc_run()
inet_diag: avoid unsafe and nonsensical prefix matches in inet_diag_bc_run()
inet_diag: validate port comparison byte code to prevent unsafe reads
Neil Brown (1):
nfsd: avoid permission checks on EXCLUSIVE_CREATE replay
NeilBrown (1):
NFS: avoid NULL dereference in nfs_destroy_server
Ondrej Zary (1):
x86, 8042: Enable A20 using KBC to fix S3 resume on some MSI laptops
Peter Popovec (1):
Input: walkera0701 - fix crash on startup
Rafael J. Wysocki (1):
ACPI / scan: Do not use dummy HID for system bus ACPI nodes
Robin Holt (1):
SGI-XP: handle non-fatal traps
Russell Webb (1):
xhci: Add Lynx Point LP to list of Intel switchable hosts
Sarah Sharp (2):
xhci: Fix conditional check in bandwidth calculation.
xHCI: Fix TD Size calculation on 1.0 hosts.
Sarveshwar Bandi (1):
bonding: Bonding driver does not consider the gso_max_size/gso_max_segs setting of slave devices.
Sebastian Andrzej Siewior (4):
usb: gadget: midi: free hs descriptors
usb: gadget: phonet: free requests in pn_bind()'s error path
usb: gadget: uvc: fix error path in uvc_function_bind()
usb: gadget: network: fix bind() error path
Sergei Shtylyov (1):
usb: musb: cppi_dma: export cppi_interrupt()
Sonny Rao (1):
mm: fix calculation of dirtyable memory
Stefan Hasko (1):
net: sched: integer overflow fix
Stephen Boyd (1):
lib: atomic64: Initialize locks statically to fix early users
Takashi Iwai (4):
ALSA: usb-audio: Avoid autopm calls after disconnection
ALSA: usb-audio: Fix missing autopm for MIDI input
ALSA: hda - Fix the wrong pincaps set in ALC861VD dallas/hp fixup
ALSA: hda - Fix pin configuration of HP Pavilion dv7
Tejun Heo (2):
cgroup: remove incorrect dget/dput() pair in cgroup_create_dir()
freezer: add missing mb's to freezer_count() and freezer_should_skip()
Thomas Gleixner (1):
genirq: Always force thread affinity
Tomasz Guszkowski (1):
p54usb: add USB ID for T-Com Sinus 154 data II
Tommi Rantala (2):
sctp: fix memory leak in sctp_datamsg_from_user() when copy from user space fails
sctp: fix -ENOMEM result with invalid user space pointer in sendto() syscall
Tony Prisk (2):
drivers/rtc/rtc-vt8500.c: correct handling of CR_24H bitfield drivers/rtc/rtc-vt8500.c: fix handling of data passed in struct rtc_time
Trond Myklebust (1):
NFS: Fix calls to drop_nlink()
Will Deacon (3):
virtio: force vring descriptors to be allocated from lowmem
ARM: mm: use pteval_t to represent page protection values
ARM: 7607/1: realview: fix private peripheral memory base for EB rev. B boards
Xi Wang (1):
nfs: fix null checking in nfs_get_option_str()
Yanchuan Nian (1):
nfs: fix wrong object type in lockowner_slab
Zhang Rui (1):
ACPI: do acpisleep dmi check when CONFIG_ACPI_SLEEP is set
[email protected] (1):
bonding: fix race condition in bonding_store_slaves_active
Greg KH
maintainerDocumentation/networking/ip-sysctl.txt +5 -0
@@ -537,6 +537,11 @@ tcp_thin_dupack - BOOLEAN Documentation/networking/tcp-thin.txt Default: 0 +tcp_challenge_ack_limit - INTEGER + Limits number of Challenge ACK sent per second, as recommended + in RFC 5961 (Improving TCP's Robustness to Blind In-Window Attacks) + Default: 100 + UDP variables: udp_mem - vector of 3 INTEGERs: min, pressure, max
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 4 -SUBLEVEL = 24 +SUBLEVEL = 25 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/arm/kernel/swp_emulate.c +2 -0
@@ -109,10 +109,12 @@ static void set_segfault(struct pt_regs *regs, unsigned long addr) {siginfo_t info; +down_read (¤t->mm->mmap_sem);if (find_vma (current->mm, addr) ==NULL ) info.si_code =SEGV_MAPERR ;else info.si_code =SEGV_ACCERR ; +up_read (¤t->mm->mmap_sem); info.si_signo =SIGSEGV ; info.si_errno =0 ;
arch/arm/mach-realview/include/mach/board-eb.h +1 -1
@@ -47,7 +47,7 @@#define REALVIEW_EB_USB_BASE 0x4F000000/* USB */ #ifdef CONFIG_REALVIEW_EB_ARM11MP_REVB -#define REALVIEW_EB11MP_PRIV_MEM_BASE 0x1F000000 +#define REALVIEW_EB11MP_PRIV_MEM_BASE 0x10100000#define REALVIEW_EB11MP_L220_BASE 0x10102000/* L220 registers */ #define REALVIEW_EB11MP_SYS_PLD_CTRL1 0xD8/* Register offset for MPCore sysctl */ #else
arch/arm/mm/mmu.c +1 -1
@@ -497,7 +497,7 @@ static void __init build_mem_type_table(void)#endif for (i =0 ; i <16 ; i++) { -unsigned long v =pgprot_val (protection_map[i]); +pteval_t v =pgprot_val (protection_map[i]); protection_map[i] =__pgprot (v | user_pgprot); }
arch/cris/include/asm/io.h +33 -6
@@ -133,12 +133,39 @@ static inline void writel(unsigned int b, volatile void __iomem *addr)#define insb (port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,1,count) : 0)#define insw (port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,2,count) : 0)#define insl (port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,4,count) : 0) -#define outb (data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,1,1) -#define outw (data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,2,1) -#define outl (data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,4,1) -#define outsb (port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,1,count) -#define outsw (port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,2,count) -#define outsl (port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,3,count) +static inline void outb (unsigned char data,unsigned int port) +{ +if (cris_iops) + cris_iops->write_io (port, (void *) &data,1 ,1 ); +} +static inline void outw (unsigned short data,unsigned int port) +{ +if (cris_iops) + cris_iops->write_io (port, (void *) &data,2 ,1 ); +} +static inline void outl (unsigned int data,unsigned int port) +{ +if (cris_iops) + cris_iops->write_io (port, (void *) &data,4 ,1 ); +} +static inline void outsb (unsigned int port,const void *addr, +unsigned long count) +{ +if (cris_iops) + cris_iops->write_io (port, (void *)addr,1 , count); +} +static inline void outsw (unsigned int port,const void *addr, +unsigned long count) +{ +if (cris_iops) + cris_iops->write_io (port, (void *)addr,2 , count); +} +static inline void outsl (unsigned int port,const void *addr, +unsigned long count) +{ +if (cris_iops) + cris_iops->write_io (port, (void *)addr,4 , count); +}/* * Convert a physical pointer to a virtual kernel pointer for /dev/mem
arch/sparc/include/asm/hugetlb.h +8 -2
@@ -58,14 +58,20 @@ static inline pte_t huge_pte_wrprotect(pte_t pte)static inline void huge_ptep_set_wrprotect (struct mm_struct *mm,unsigned long addr,pte_t *ptep) { -ptep_set_wrprotect (mm, addr, ptep); +pte_t old_pte = *ptep; +set_huge_pte_at (mm, addr, ptep,pte_wrprotect (old_pte)); }static inline int huge_ptep_set_access_flags (struct vm_area_struct *vma,unsigned long addr,pte_t *ptep,pte_t pte,int dirty) { -return ptep_set_access_flags (vma, addr, ptep, pte, dirty); +int changed = !pte_same (*ptep, pte); +if (changed) { +set_huge_pte_at (vma->vm_mm, addr, ptep, pte); +flush_tlb_page (vma, addr); + } +return changed; }static inline pte_t huge_ptep_get (pte_t *ptep)
arch/x86/kernel/cpu/amd.c +14 -0
@@ -598,6 +598,20 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) } } +/* +* The way access filter has a performance penalty on some workloads. +* Disable it on the affected CPUs. +*/ +if ((c->x86 ==0x15 ) && + (c->x86_model >=0x02 ) && (c->x86_model <0x20 )) { +u64 val; + +if (!rdmsrl_safe (0xc0011021 , &val) && !(val &0x1E )) { + val |=0x1E ; +checking_wrmsrl (0xc0011021 , val); + } + } +cpu_detect_cache_sizes (c);/* Multi core CPU? */
drivers/acpi/scan.c +1 -1
@@ -1157,7 +1157,7 @@ static void acpi_device_set_id(struct acpi_device *device)acpi_add_id (device,ACPI_DOCK_HID ); else if (!acpi_ibm_smbus_match(device)) acpi_add_id(device, ACPI_SMBUS_IBM_HID); - else if (!acpi_device_hid(device) && + else if (list_empty(&device->pnp.ids) && ACPI_IS_ROOT_DEVICE(device->parent)) {acpi_add_id (device,ACPI_BUS_HID );/* \_SB, LNXSYBUS */ strcpy (device->pnp.device_name,ACPI_BUS_DEVICE_NAME );
drivers/acpi/sleep.c +177 -171
377 lines not on this page · raw message
drivers/atm/solos-pci.c +3 -2
@@ -967,10 +967,11 @@ static uint32_t fpga_tx(struct solos_card *card)for (port =0 ; tx_pending; tx_pending >>=1 , port++) {if (tx_pending &1 ) {struct sk_buff *oldskb = card->tx_skb[port]; -if (oldskb) +if (oldskb) {pci_unmap_single (card->dev,SKB_CB (oldskb)->dma_addr, oldskb->len,PCI_DMA_TODEVICE ); - + card->tx_skb[port] =NULL ; + }spin_lock (&card->tx_queue_lock); skb =skb_dequeue (&card->tx_queue[port]);if (!skb)
drivers/bluetooth/ath3k.c +1 -0
@@ -66,6 +66,7 @@ static struct usb_device_id ath3k_table[] = { { USB_DEVICE(0x13d3, 0x3304) }, { USB_DEVICE(0x0930, 0x0215) }, { USB_DEVICE(0x0489, 0xE03D) }, + { USB_DEVICE(0x0489, 0xE027) },/* Atheros AR9285 Malbec with sflash firmware */ { USB_DEVICE(0x03F0, 0x311D) },
drivers/bluetooth/btusb.c +1 -0
@@ -130,6 +130,7 @@ static struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE }, { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE }, + { USB_DEVICE(0x0489, 0xe027), .driver_info = BTUSB_IGNORE }, /* Atheros AR9285 Malbec with sflash firmware */ { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
drivers/hid/hid-core.c +1 -0
@@ -1385,6 +1385,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
drivers/input/joystick/walkera0701.c +4 -3
@@ -196,6 +196,7 @@ static void walkera0701_close(struct input_dev *dev)struct walkera_dev *w =input_get_drvdata (dev);parport_disable_irq (w->parport); +hrtimer_cancel (&w->timer); }static int walkera0701_connect (struct walkera_dev *w,int parport)
@@ -224,6 +225,9 @@ static int walkera0701_connect(struct walkera_dev *w, int parport)if (parport_claim (w->pardevice)) goto init_err1; +hrtimer_init (&w->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); + w->timer.function = timer_handler; + w->input_dev =input_allocate_device ();if (!w->input_dev) goto init_err2;
@@ -254,8 +258,6 @@ static int walkera0701_connect(struct walkera_dev *w, int parport)if (err) goto init_err3; -hrtimer_init (&w->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); - w->timer.function = timer_handler;return 0 ; init_err3:
@@ -271,7 +273,6 @@ static int walkera0701_connect(struct walkera_dev *w, int parport)static void walkera0701_disconnect (struct walkera_dev *w) { -hrtimer_cancel (&w->timer);input_unregister_device (w->input_dev);parport_release (w->pardevice);parport_unregister_device (w->pardevice);
drivers/input/mouse/sentelic.c +1 -1
@@ -759,7 +759,7 @@ static psmouse_ret_t fsp_process_byte(struct psmouse *psmouse)fsp_set_slot (dev,0 , fgrs >0 , abs_x, abs_y);fsp_set_slot (dev,1 , false,0 ,0 ); } -if (fgrs >0 ) { +if (fgrs ==1 || (fgrs ==2 && !(packet[0 ] &FSP_PB0_MFMC_FGR2 ))) {input_report_abs (dev,ABS_X , abs_x);input_report_abs (dev,ABS_Y , abs_y); }
drivers/input/serio/i8042-x86ia64io.h +9 -0
@@ -921,6 +921,7 @@ static int __init i8042_platform_init(void)int retval;#ifdef CONFIG_X86 +u8 a20_on =0xdf ;/* Just return if pre-detection shows no i8042 controller exist */ if (!x86_platform.i8042_detect ())return -ENODEV ;
@@ -960,6 +961,14 @@ static int __init i8042_platform_init(void)if (dmi_check_system (i8042_dmi_dritek_table)) i8042_dritek = true; + +/* +* A20 was already enabled during early kernel init. But some buggy +* BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to +* resume from S3. So we do it here and hope that nothing breaks. +*/ +i8042_command (&a20_on,0x10d1 ); +i8042_command (NULL ,0x00ff );/* Null command for SMM firmware */ #endif /* CONFIG_X86 */ return retval;
drivers/misc/sgi-xp/xpc_main.c +32 -2
@@ -53,6 +53,10 @@#include <linux/kthread.h> #include "xpc.h" +#ifdef CONFIG_X86_64 +#include <asm/traps.h> +#endif +/* define two XPC debug device structures to be used with dev_dbg() et al */ struct device_driver xpc_dbg_name = {
@@ -1079,6 +1083,9 @@ xpc_system_reboot(struct notifier_block *nb, unsigned long event, void *unused)return NOTIFY_DONE ; } +/* Used to only allow one cpu to complete disconnect */ +static unsigned int xpc_die_disconnecting; +/* * Notify other partitions to deactivate from us by first disengaging from all * references to our memory.
@@ -1092,6 +1099,9 @@ xpc_die_deactivate(void)long keep_waiting;long wait_to_print; +if (cmpxchg (&xpc_die_disconnecting,0 ,1 )) +return ; +/* keep xpc_hb_checker thread from doing anything (just in case) */ xpc_exiting =1 ;
@@ -1159,7 +1169,7 @@ xpc_die_deactivate(void)* about the lack of a heartbeat. */ static int -xpc_system_die (struct notifier_block *nb,unsigned long event,void *unused) +xpc_system_die (struct notifier_block *nb,unsigned long event,void *_die_args) {#ifdef CONFIG_IA64 /* !!! temporary kludge */ switch (event) {
@@ -1191,7 +1201,27 @@ xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused) break; }#else -xpc_die_deactivate (); +struct die_args *die_args = _die_args; + +switch (event) { +case DIE_TRAP : +if (die_args->trapnr ==X86_TRAP_DF ) +xpc_die_deactivate (); + +if (((die_args->trapnr ==X86_TRAP_MF ) || + (die_args->trapnr ==X86_TRAP_XF )) && + !user_mode_vm (die_args->regs)) +xpc_die_deactivate (); + +break ; +case DIE_INT3 : +case DIE_DEBUG : +break ; +case DIE_OOPS : +case DIE_GPF : +default : +xpc_die_deactivate (); + }#endif return NOTIFY_DONE ;
drivers/net/bonding/bond_main.c +7 -0
@@ -1383,6 +1383,8 @@ static void bond_compute_features(struct bonding *bond)struct net_device *bond_dev = bond->dev;netdev_features_t vlan_features =BOND_VLAN_FEATURES ;unsigned short max_hard_header_len =ETH_HLEN ; +unsigned int gso_max_size =GSO_MAX_SIZE ; +u16 gso_max_segs =GSO_MAX_SEGS ;int i;read_lock (&bond->lock);
@@ -1396,11 +1398,16 @@ static void bond_compute_features(struct bonding *bond)if (slave->dev->hard_header_len > max_hard_header_len) max_hard_header_len = slave->dev->hard_header_len; + + gso_max_size =min (gso_max_size, slave->dev->gso_max_size); + gso_max_segs =min (gso_max_segs, slave->dev->gso_max_segs); } done: bond_dev->vlan_features = vlan_features; bond_dev->hard_header_len = max_hard_header_len; + bond_dev->gso_max_segs = gso_max_segs; +netif_set_gso_max_size (bond_dev, gso_max_size);read_unlock (&bond->lock);
drivers/net/bonding/bond_sysfs.c +2 -0
@@ -1578,6 +1578,7 @@ static ssize_t bonding_store_slaves_active(struct device *d, goto out; } +read_lock (&bond->lock);bond_for_each_slave (bond, slave, i) {if (!bond_is_active_slave (slave)) {if (new_value)
@@ -1586,6 +1587,7 @@ static ssize_t bonding_store_slaves_active(struct device *d, slave->inactive =1 ; } } +read_unlock (&bond->lock); out:return ret; }
drivers/net/can/dev.c +1 -2
@@ -576,8 +576,7 @@ void close_candev(struct net_device *dev) {struct can_priv *priv =netdev_priv (dev); -if (del_timer_sync (&priv->restart_timer)) -dev_put (dev); +del_timer_sync (&priv->restart_timer);can_flush_echo_skb (dev); }EXPORT_SYMBOL_GPL (close_candev);
drivers/net/ethernet/8390/ne.c +1 -0
@@ -813,6 +813,7 @@ static int __init ne_drv_probe(struct platform_device *pdev) dev->irq = irq[this_dev]; dev->mem_end = bad[this_dev]; } +SET_NETDEV_DEV (dev, &pdev->dev); err =do_ne_probe (dev);if (err) {free_netdev (dev);
drivers/net/irda/sir_dev.c +1 -1
@@ -222,7 +222,7 @@ static void sirdev_config_fsm(struct work_struct *work)break ;case SIRDEV_STATE_DONGLE_SPEED : -if (dev->dongle_drv->reset) { +if (dev->dongle_drv->set_speed) { ret = dev->dongle_drv->set_speed (dev, fsm->param);if (ret <0 ) { fsm->result = ret;
drivers/net/usb/ipheth.c +5 -0
@@ -62,6 +62,7 @@#define USB_PRODUCT_IPAD 0x129a#define USB_PRODUCT_IPHONE_4_VZW 0x129c#define USB_PRODUCT_IPHONE_4S 0x12a0 +#define USB_PRODUCT_IPHONE_5 0x12a8#define IPHETH_USBINTF_CLASS 255#define IPHETH_USBINTF_SUBCLASS 253
@@ -113,6 +114,10 @@ static struct usb_device_id ipheth_table[] = { USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_4S,IPHETH_USBINTF_CLASS ,IPHETH_USBINTF_SUBCLASS , IPHETH_USBINTF_PROTO) }, + { USB_DEVICE_AND_INTERFACE_INFO( +USB_VENDOR_APPLE ,USB_PRODUCT_IPHONE_5 , +IPHETH_USBINTF_CLASS ,IPHETH_USBINTF_SUBCLASS , + IPHETH_USBINTF_PROTO) }, { } };MODULE_DEVICE_TABLE (usb, ipheth_table);
drivers/net/wireless/b43/dma.c +5 -2
@@ -409,7 +409,10 @@ static inline struct b43_dmadesc_meta *meta) {if (meta->skb) { -dev_kfree_skb_any (meta->skb); +if (ring->tx) +ieee80211_free_txskb (ring->dev->wl->hw, meta->skb); +else +dev_kfree_skb_any (meta->skb); meta->skb =NULL ; } }
@@ -1454,7 +1457,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb)if (unlikely (err == -ENOKEY )) {/* Drop this packet, as we don't have the encryption key * anymore and must not transmit it unencrypted. */ -dev_kfree_skb_any (skb); +ieee80211_free_txskb (dev->wl->hw, skb); err =0 ; goto out; }
drivers/net/wireless/b43/main.c +8 -4
@@ -3393,7 +3393,7 @@ static void b43_tx_work(struct work_struct *work)break ; }if (unlikely (err)) -dev_kfree_skb (skb);/* Drop it */ +ieee80211_free_txskb (wl->hw, skb); err =0 ; }
@@ -3414,7 +3414,7 @@ static void b43_op_tx(struct ieee80211_hw *hw,if (unlikely (skb->len <2 +2 +6 )) {/* Too short, this can't be a valid frame. */ -dev_kfree_skb_any (skb); +ieee80211_free_txskb (hw, skb);return ; }B43_WARN_ON (skb_shinfo (skb)->nr_frags);
@@ -4210,8 +4210,12 @@ redo:/* Drain all TX queues. */ for (queue_num =0 ; queue_num <B43_QOS_QUEUE_NUM ; queue_num++) { -while (skb_queue_len (&wl->tx_queue[queue_num])) -dev_kfree_skb (skb_dequeue (&wl->tx_queue[queue_num])); +while (skb_queue_len (&wl->tx_queue[queue_num])) { +struct sk_buff *skb; + + skb =skb_dequeue (&wl->tx_queue[queue_num]); +ieee80211_free_txskb (wl->hw, skb); + } }b43_mac_suspend (dev);
drivers/net/wireless/b43/pio.c +2 -2
@@ -196,7 +196,7 @@ static void b43_pio_cancel_tx_packets(struct b43_pio_txqueue *q)for (i =0 ; i <ARRAY_SIZE (q->packets); i++) { pack = &(q->packets[i]);if (pack->skb) { -dev_kfree_skb_any (pack->skb); +ieee80211_free_txskb (q->dev->wl->hw, pack->skb); pack->skb =NULL ; } }
@@ -552,7 +552,7 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb)if (unlikely (err == -ENOKEY )) {/* Drop this packet, as we don't have the encryption key * anymore and must not transmit it unencrypted. */ -dev_kfree_skb_any (skb); +ieee80211_free_txskb (dev->wl->hw, skb); err =0 ; goto out; }
drivers/net/wireless/b43legacy/b43legacy.h +5 -0
@@ -13,6 +13,7 @@#include <linux/ssb/ssb.h> #include <linux/ssb/ssb_driver_chipcommon.h> +#include <linux/completion.h> #include <net/mac80211.h>
@@ -733,6 +734,10 @@ struct b43legacy_wldev {/* Firmware data */ struct b43legacy_firmware fw; +const struct firmware *fwp;/* needed to pass fw pointer */ + +/* completion struct for firmware loading */ +struct completion fw_load_complete;/* Devicelist in struct b43legacy_wl (all 802.11 cores) */ struct list_head list;
drivers/net/wireless/b43legacy/main.c +31 -6
@@ -1511,9 +1511,17 @@ static void b43legacy_print_fw_helptext(struct b43legacy_wl *wl) "and download the correct firmware (version 3).\n"); } +static void b43legacy_fw_cb (const struct firmware *firmware,void *context) +{ +struct b43legacy_wldev *dev = context; + + dev->fwp = firmware; +complete (&dev->fw_load_complete); +} +static int do_request_fw (struct b43legacy_wldev *dev,const char *name, -const struct firmware **fw) +const struct firmware **fw,bool async) {char path[sizeof (modparam_fwpostfix) +32 ];struct b43legacy_fw_header *hdr;
@@ -1526,7 +1534,24 @@ static int do_request_fw(struct b43legacy_wldev *dev,snprintf (path,ARRAY_SIZE (path),"b43legacy%s/%s.fw" , modparam_fwpostfix, name); - err =request_firmware (fw, path, dev->dev->dev); +b43legacyinfo (dev->wl,"Loading firmware %s\n" , path); +if (async) { +init_completion (&dev->fw_load_complete); + err =request_firmware_nowait (THIS_MODULE ,1 , path, + dev->dev->dev,GFP_KERNEL , + dev, b43legacy_fw_cb); +if (err) { +b43legacyerr (dev->wl,"Unable to load firmware\n" ); +return err; + } +/* stall here until fw ready */ +wait_for_completion (&dev->fw_load_complete); +if (!dev->fwp) + err = -EINVAL ; + *fw = dev->fwp; + }else { + err =request_firmware (fw, path, dev->dev->dev); + }if (err) {b43legacyerr (dev->wl,"Firmware file \"%s\" not found " "or load failed.\n" , path);
@@ -1578,7 +1603,7 @@ static void b43legacy_request_firmware(struct work_struct *work) filename ="ucode4" ; else filename ="ucode5" ; - err =do_request_fw (dev, filename, &fw->ucode); + err =do_request_fw (dev, filename, &fw->ucode, true);if (err) goto err_load; }
@@ -1587,7 +1612,7 @@ static void b43legacy_request_firmware(struct work_struct *work) filename ="pcm4" ; else filename ="pcm5" ; - err =do_request_fw (dev, filename, &fw->pcm); + err =do_request_fw (dev, filename, &fw->pcm, false);if (err) goto err_load; }
@@ -1605,7 +1630,7 @@ static void b43legacy_request_firmware(struct work_struct *work)default : goto err_no_initvals; } - err =do_request_fw (dev, filename, &fw->initvals); + err =do_request_fw (dev, filename, &fw->initvals, false);if (err) goto err_load; }
@@ -1625,7 +1650,7 @@ static void b43legacy_request_firmware(struct work_struct *work)default : goto err_no_initvals; } - err =do_request_fw (dev, filename, &fw->initvals_band); + err =do_request_fw (dev, filename, &fw->initvals_band, false);if (err) goto err_load; }
drivers/net/wireless/p54/p54usb.c +4 -0
@@ -47,6 +47,7 @@ static struct usb_device_id p54u_table[] = { {USB_DEVICE(0x0411, 0x0050)}, /* Buffalo WLI2-USB2-G54 */ {USB_DEVICE(0x045e, 0x00c2)}, /* Microsoft MN-710 */ {USB_DEVICE(0x0506, 0x0a11)}, /* 3COM 3CRWE254G72 */ + {USB_DEVICE(0x0675, 0x0530)}, /* DrayTek Vigor 530 */ {USB_DEVICE(0x06b9, 0x0120)}, /* Thomson SpeedTouch 120g */ {USB_DEVICE(0x0707, 0xee06)}, /* SMC 2862W-G */ {USB_DEVICE(0x07aa, 0x001c)}, /* Corega CG-WLUSB2GT */
@@ -82,6 +83,8 @@ static struct usb_device_id p54u_table[] = { {USB_DEVICE(0x06a9, 0x000e)}, /* Westell 802.11g USB (A90-211WG-01) */ {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, 0xc501)}, /* Zoom Wireless-G 4410 */ {USB_DEVICE(0x083a, 0xf503)}, /* Accton FD7050E ver 1010ec */
@@ -101,6 +104,7 @@ static struct usb_device_id p54u_table[] = { {USB_DEVICE(0x13B1, 0x000C)}, /* Linksys WUSB54AG */ {USB_DEVICE(0x1413, 0x5400)}, /* Telsey 802.11g USB2.0 Adapter */ {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */ +/* {USB_DEVICE(0x15a9, 0x0002)}, * Also SparkLAN WL-682 with 3887 */ {USB_DEVICE(0x1668, 0x1050)}, /* Actiontec 802UIG-1 */ {USB_DEVICE(0x1740, 0x1000)}, /* Senao NUB-350 */ {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */
drivers/net/wireless/rtlwifi/usb.c +3 -4
@@ -210,17 +210,16 @@ static void _usb_writeN_sync(struct rtl_priv *rtlpriv, u32 addr, void *data,u16 index =REALTEK_USB_VENQT_CMD_IDX ;int pipe =usb_sndctrlpipe (udev,0 );/* write_out */ u8 *buffer; -dma_addr_t dma_addr; - wvalue = (u16)(addr&0x0000ffff ); - buffer =usb_alloc_coherent (udev, (size_t )len,GFP_ATOMIC , &dma_addr); + wvalue = (u16)(addr &0x0000ffff ); + buffer =kmalloc (len,GFP_ATOMIC );if (!buffer)return ;memcpy (buffer, data, len);usb_control_msg (udev, pipe, request, reqtype, wvalue, index, buffer, len,50 ); -usb_free_coherent (udev, (size_t )len, buffer, dma_addr); +kfree (buffer); } static void _rtl_usb_io_handler_init(struct device *dev,
drivers/pci/quirks.c +5 -2
@@ -2708,7 +2708,7 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)if (PCI_FUNC (dev->devfn))return ;/* -* RICOH 0xe823 SD/MMC card reader fails to recognize +* RICOH 0xe822 and 0xe823 SD/MMC card readers fail to recognize * certain types of SD/MMC cards. Lowering the SD base * clock frequency from 200Mhz to 50Mhz fixes this issue. *
@@ -2719,7 +2719,8 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)* 0xf9 - Key register for 0x150 * 0xfc - key register for 0xe1 */ -if (dev->device ==PCI_DEVICE_ID_RICOH_R5CE823 ) { +if (dev->device ==PCI_DEVICE_ID_RICOH_R5CE822 || + dev->device ==PCI_DEVICE_ID_RICOH_R5CE823 ) {pci_write_config_byte (dev,0xf9 ,0xfc );pci_write_config_byte (dev,0x150 ,0x10 );pci_write_config_byte (dev,0xf9 ,0x00 );
@@ -2746,6 +2747,8 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev) }DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_RICOH ,PCI_DEVICE_ID_RICOH_R5C832 , ricoh_mmc_fixup_r5c832);DECLARE_PCI_FIXUP_RESUME_EARLY (PCI_VENDOR_ID_RICOH ,PCI_DEVICE_ID_RICOH_R5C832 , ricoh_mmc_fixup_r5c832); +DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_RICOH ,PCI_DEVICE_ID_RICOH_R5CE822 , ricoh_mmc_fixup_r5c832); +DECLARE_PCI_FIXUP_RESUME_EARLY (PCI_VENDOR_ID_RICOH ,PCI_DEVICE_ID_RICOH_R5CE822 , ricoh_mmc_fixup_r5c832);DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_RICOH ,PCI_DEVICE_ID_RICOH_R5CE823 , ricoh_mmc_fixup_r5c832);DECLARE_PCI_FIXUP_RESUME_EARLY (PCI_VENDOR_ID_RICOH ,PCI_DEVICE_ID_RICOH_R5CE823 , ricoh_mmc_fixup_r5c832);#endif /*CONFIG_MMC_RICOH_MMC*/
drivers/pnp/pnpacpi/core.c +1 -1
@@ -58,7 +58,7 @@ static inline int __init is_exclusive_device(struct acpi_device *dev)if (!(('0' <= (c ) && (c) <='9' ) || ('A' <= (c ) && (c) <='F' ))) \ return 0#define TEST_ALPHA (c) \ - if (!('@' <= (c) || (c) <= 'Z')) \ + if (!('A' <= (c) && (c) <= 'Z')) \ return 0static int __init ispnpidacpi (const char *id) {
drivers/rtc/rtc-vt8500.c +6 -5
@@ -69,7 +69,7 @@ | ALARM_SEC_BIT)#define VT8500_RTC_CR_ENABLE (1 << 0)/* Enable RTC */ -#define VT8500_RTC_CR_24H (1 << 1)/* 24h time format */ +#define VT8500_RTC_CR_12H (1 << 1)/* 12h time format */ #define VT8500_RTC_CR_SM_ENABLE (1 << 2)/* Enable periodic irqs */ #define VT8500_RTC_CR_SM_SEC (1 << 3)/* 0: 1Hz/60, 1: 1Hz */ #define VT8500_RTC_CR_CALIB (1 << 4)/* Enable calibration */
@@ -118,7 +118,7 @@ static int vt8500_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_min =bcd2bin ((time &TIME_MIN_MASK ) >>TIME_MIN_S ); tm->tm_hour =bcd2bin ((time &TIME_HOUR_MASK ) >>TIME_HOUR_S ); tm->tm_mday =bcd2bin (date &DATE_DAY_MASK ); - tm->tm_mon =bcd2bin ((date &DATE_MONTH_MASK ) >>DATE_MONTH_S ); + tm->tm_mon =bcd2bin ((date &DATE_MONTH_MASK ) >>DATE_MONTH_S ) -1 ; tm->tm_year =bcd2bin ((date &DATE_YEAR_MASK ) >>DATE_YEAR_S ) + ((date >>DATE_CENTURY_S ) &1 ?200 :100 ); tm->tm_wday = (time &TIME_DOW_MASK ) >>TIME_DOW_S ;
@@ -137,8 +137,9 @@ static int vt8500_rtc_set_time(struct device *dev, struct rtc_time *tm) }writel ((bin2bcd (tm->tm_year -100 ) <<DATE_YEAR_S ) - | (bin2bcd (tm->tm_mon) <<DATE_MONTH_S ) - | (bin2bcd (tm->tm_mday)), + | (bin2bcd (tm->tm_mon +1 ) <<DATE_MONTH_S ) + | (bin2bcd (tm->tm_mday)) + | ((tm->tm_year >=200 ) <<DATE_CENTURY_S ), vt8500_rtc->regbase +VT8500_RTC_DS );writel ((bin2bcd (tm->tm_wday) <<TIME_DOW_S ) | (bin2bcd(tm->tm_hour) << TIME_HOUR_S)
@@ -248,7 +249,7 @@ static int __devinit vt8500_rtc_probe(struct platform_device *pdev) }/* Enable RTC and set it to 24-hour mode */ -writel (VT8500_RTC_CR_ENABLE |VT8500_RTC_CR_24H , +writel (VT8500_RTC_CR_ENABLE , vt8500_rtc->regbase +VT8500_RTC_CR ); vt8500_rtc->rtc = rtc_device_register("vt8500-rtc", &pdev->dev,
drivers/usb/gadget/f_ecm.c +2 -2
@@ -808,9 +808,9 @@ fail:/* we might as well release our claims on endpoints */ if (ecm->notify) ecm->notify->driver_data =NULL ; -if (ecm->port.out_ep->desc) +if (ecm->port.out_ep) ecm->port.out_ep->driver_data =NULL ; -if (ecm->port.in_ep->desc) +if (ecm->port.in_ep) ecm->port.in_ep->driver_data =NULL ;ERROR (cdev,"%s: can't bind, err %d\n" , f->name, status);
drivers/usb/gadget/f_eem.c +2 -3
@@ -319,10 +319,9 @@ fail:if (f->hs_descriptors)usb_free_descriptors (f->hs_descriptors); -/* we might as well release our claims on endpoints */ -if (eem->port.out_ep->desc) +if (eem->port.out_ep) eem->port.out_ep->driver_data =NULL ; -if (eem->port.in_ep->desc) +if (eem->port.in_ep) eem->port.in_ep->driver_data =NULL ;ERROR (cdev,"%s: can't bind, err %d\n" , f->name, status);
drivers/usb/gadget/f_midi.c +1 -0
@@ -416,6 +416,7 @@ static void f_midi_unbind(struct usb_configuration *c, struct usb_function *f) midi->id =NULL ;usb_free_descriptors (f->descriptors); +usb_free_descriptors (f->hs_descriptors);kfree (midi); }
drivers/usb/gadget/f_ncm.c +2 -2
@@ -1259,9 +1259,9 @@ fail:/* we might as well release our claims on endpoints */ if (ncm->notify) ncm->notify->driver_data =NULL ; -if (ncm->port.out_ep->desc) +if (ncm->port.out_ep) ncm->port.out_ep->driver_data =NULL ; -if (ncm->port.in_ep->desc) +if (ncm->port.in_ep) ncm->port.in_ep->driver_data =NULL ;ERROR (cdev,"%s: can't bind, err %d\n" , f->name, status);
drivers/usb/gadget/f_phonet.c +6 -2
@@ -531,7 +531,7 @@ int pn_bind(struct usb_configuration *c, struct usb_function *f) req =usb_ep_alloc_request (fp->out_ep,GFP_KERNEL );if (!req) - goto err; + goto err_req; req->complete = pn_rx_complete; fp->out_reqv[i] = req;
@@ -540,14 +540,18 @@ int pn_bind(struct usb_configuration *c, struct usb_function *f)/* Outgoing USB requests */ fp->in_req =usb_ep_alloc_request (fp->in_ep,GFP_KERNEL );if (!fp->in_req) - goto err; + goto err_req;INFO (cdev,"USB CDC Phonet function\n" );INFO (cdev,"using %s, OUT %s, IN %s\n" , cdev->gadget->name, fp->out_ep->name, fp->in_ep->name);return 0 ; +err_req: +for (i =0 ; i < phonet_rxq_size && fp->out_reqv[i]; i++) +usb_ep_free_request (fp->out_ep, fp->out_reqv[i]); err: +if (fp->out_ep) fp->out_ep->driver_data =NULL ;if (fp->in_ep)
drivers/usb/gadget/f_rndis.c +2 -2
@@ -803,9 +803,9 @@ fail:/* we might as well release our claims on endpoints */ if (rndis->notify) rndis->notify->driver_data =NULL ; -if (rndis->port.out_ep->desc) +if (rndis->port.out_ep) rndis->port.out_ep->driver_data =NULL ; -if (rndis->port.in_ep->desc) +if (rndis->port.in_ep) rndis->port.in_ep->driver_data =NULL ;ERROR (cdev,"%s: can't bind, err %d\n" , f->name, status);
drivers/usb/gadget/f_subset.c +2 -2
@@ -370,9 +370,9 @@ fail:usb_free_descriptors (f->hs_descriptors);/* we might as well release our claims on endpoints */ -if (geth->port.out_ep->desc) +if (geth->port.out_ep) geth->port.out_ep->driver_data =NULL ; -if (geth->port.in_ep->desc) +if (geth->port.in_ep) geth->port.in_ep->driver_data =NULL ;ERROR (cdev,"%s: can't bind, err %d\n" , f->name, status);
drivers/usb/gadget/f_uvc.c +21 -18
@@ -335,7 +335,6 @@ uvc_register_video(struct uvc_device *uvc)return -ENOMEM ; video->parent = &cdev->gadget->dev; - video->minor =-1 ; video->fops = &uvc_v4l2_fops; video->release = video_device_release;strncpy (video->name, cdev->gadget->name,sizeof (video->name));
@@ -462,23 +461,12 @@ uvc_function_unbind(struct usb_configuration *c, struct usb_function *f)INFO (cdev,"uvc_function_unbind\n" ); -if (uvc->vdev) { -if (uvc->vdev->minor ==-1 ) -video_device_release (uvc->vdev); -else -video_unregister_device (uvc->vdev); - uvc->vdev =NULL ; - } - -if (uvc->control_ep) - uvc->control_ep->driver_data =NULL ; -if (uvc->video.ep) - uvc->video.ep->driver_data =NULL ; +video_unregister_device (uvc->vdev); + uvc->control_ep->driver_data =NULL ; + uvc->video.ep->driver_data =NULL ; -if (uvc->control_req) { -usb_ep_free_request (cdev->gadget->ep0, uvc->control_req); -kfree (uvc->control_buf); - } +usb_ep_free_request (cdev->gadget->ep0, uvc->control_req); +kfree (uvc->control_buf);kfree (f->descriptors);kfree (f->hs_descriptors);
@@ -563,7 +551,22 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f)return 0 ; error: -uvc_function_unbind (c, f); +if (uvc->vdev) +video_device_release (uvc->vdev); + +if (uvc->control_ep) + uvc->control_ep->driver_data =NULL ; +if (uvc->video.ep) + uvc->video.ep->driver_data =NULL ; + +if (uvc->control_req) { +usb_ep_free_request (cdev->gadget->ep0, uvc->control_req); +kfree (uvc->control_buf); + } + +kfree (f->descriptors); +kfree (f->hs_descriptors); +kfree (f->ss_descriptors);return ret; }
drivers/usb/host/ehci-pci.c +2 -1
@@ -362,7 +362,8 @@ static bool usb_is_intel_switchable_ehci(struct pci_dev *pdev) pdev->vendor ==PCI_VENDOR_ID_INTEL && (pdev->device ==0x1E26 || pdev->device ==0x8C2D || - pdev->device ==0x8C26 ); + pdev->device ==0x8C26 || + pdev->device ==0x9C26 ); }static void ehci_enable_xhci_companion (void )
drivers/usb/host/pci-quirks.c +3 -1
@@ -723,6 +723,7 @@ static int handshake(void __iomem *ptr, u32 mask, u32 done, }#define PCI_DEVICE_ID_INTEL_LYNX_POINT_XHCI 0x8C31 +#define PCI_DEVICE_ID_INTEL_LYNX_POINT_LP_XHCI 0x9C31bool usb_is_intel_ppt_switchable_xhci (struct pci_dev *pdev) {
@@ -736,7 +737,8 @@ bool usb_is_intel_lpt_switchable_xhci(struct pci_dev *pdev) {return pdev->class ==PCI_CLASS_SERIAL_USB_XHCI && pdev->vendor ==PCI_VENDOR_ID_INTEL && - pdev->device ==PCI_DEVICE_ID_INTEL_LYNX_POINT_XHCI ; + (pdev->device ==PCI_DEVICE_ID_INTEL_LYNX_POINT_XHCI || + pdev->device ==PCI_DEVICE_ID_INTEL_LYNX_POINT_LP_XHCI ); }bool usb_is_intel_switchable_xhci (struct pci_dev *pdev)
drivers/usb/host/xhci-mem.c +7 -2
@@ -205,7 +205,12 @@ static int xhci_alloc_segments_for_ring(struct xhci_hcd *xhci, next =xhci_segment_alloc (xhci, cycle_state, flags);if (!next) { -xhci_free_segments_for_ring (xhci, *first); + prev = *first; +while (prev) { + next = prev->next; +xhci_segment_free (xhci, prev); + prev = next; + }return -ENOMEM ; }xhci_link_segments (xhci, prev, next, type);
@@ -258,7 +263,7 @@ static struct xhci_ring *xhci_ring_alloc(struct xhci_hcd *xhci,return ring; fail: -xhci_ring_free (xhci, ring); +kfree (ring);return NULL ; }
drivers/usb/host/xhci-ring.c +19 -13
@@ -3069,11 +3069,11 @@ static u32 xhci_td_remainder(unsigned int remainder) }/* -* For xHCI 1.0 host controllers, TD size is the number of packets remaining in -* the TD (*not* including this TRB). +* For xHCI 1.0 host controllers, TD size is the number of max packet sized +* packets remaining in the TD (*not* including this TRB). * * Total TD packet count = total_packet_count = -* roundup(TD size in bytes / wMaxPacketSize) +* DIV_ROUND_UP(TD size in bytes / wMaxPacketSize) * * Packets transferred up to and including this TRB = packets_transferred = * rounddown(total bytes transferred including this TRB / wMaxPacketSize)
@@ -3081,15 +3081,16 @@ static u32 xhci_td_remainder(unsigned int remainder)* TD size = total_packet_count - packets_transferred * * It must fit in bits 21:17, so it can't be bigger than 31. +* The last TRB in a TD must have the TD size set to zero. */ -static u32 xhci_v1_0_td_remainder (int running_total,int trb_buff_len, -unsigned int total_packet_count,struct urb *urb) +unsigned int total_packet_count,struct urb *urb, +unsigned int num_trbs_left) {int packets_transferred;/* One TRB with a zero-length data packet. */ -if (running_total ==0 && trb_buff_len ==0 ) +if (num_trbs_left ==0 || (running_total ==0 && trb_buff_len ==0 ))return 0 ;/* All the TRB queueing functions don't count the current TRB in
@@ -3098,7 +3099,9 @@ static u32 xhci_v1_0_td_remainder(int running_total, int trb_buff_len, packets_transferred = (running_total + trb_buff_len) /usb_endpoint_maxp (&urb->ep->desc); -return xhci_td_remainder (total_packet_count - packets_transferred); +if ((total_packet_count - packets_transferred) >31 ) +return 31 <<17 ; +return (total_packet_count - packets_transferred) <<17 ; } static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
@@ -3125,7 +3128,7 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags, num_trbs =count_sg_trbs_needed (xhci, urb); num_sgs = urb->num_mapped_sgs; - total_packet_count =roundup (urb->transfer_buffer_length, + total_packet_count =DIV_ROUND_UP (urb->transfer_buffer_length,usb_endpoint_maxp (&urb->ep->desc)); trb_buff_len = prepare_transfer(xhci, xhci->devs[slot_id],
@@ -3208,7 +3211,8 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags, running_total); }else { remainder =xhci_v1_0_td_remainder (running_total, - trb_buff_len, total_packet_count, urb); + trb_buff_len, total_packet_count, urb, + num_trbs -1 ); } length_field =TRB_LEN (trb_buff_len) | remainder |
@@ -3316,7 +3320,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, start_cycle = ep_ring->cycle_state; running_total =0 ; - total_packet_count =roundup (urb->transfer_buffer_length, + total_packet_count =DIV_ROUND_UP (urb->transfer_buffer_length,usb_endpoint_maxp (&urb->ep->desc));/* How much data is in the first TRB? */ addr = (u64 ) urb->transfer_dma;
@@ -3362,7 +3366,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, running_total); }else { remainder =xhci_v1_0_td_remainder (running_total, - trb_buff_len, total_packet_count, urb); + trb_buff_len, total_packet_count, urb, + num_trbs -1 ); } length_field =TRB_LEN (trb_buff_len) | remainder |
@@ -3625,7 +3630,7 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, addr = start_addr + urb->iso_frame_desc[i].offset; td_len = urb->iso_frame_desc[i].length; td_remain_len = td_len; - total_packet_count =roundup (td_len, + total_packet_count =DIV_ROUND_UP (td_len,usb_endpoint_maxp (&urb->ep->desc));/* A zero-length transfer still involves at least one packet. */ if (total_packet_count ==0 )
@@ -3704,7 +3709,8 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, }else { remainder =xhci_v1_0_td_remainder ( running_total, trb_buff_len, - total_packet_count, urb); + total_packet_count, urb, + (trbs_per_td - j -1 )); } length_field =TRB_LEN (trb_buff_len) | remainder |
drivers/usb/host/xhci.c +2 -2
@@ -480,7 +480,7 @@ static bool compliance_mode_recovery_timer_quirk_check(void)if (strstr (dmi_product_name,"Z420" ) ||strstr (dmi_product_name,"Z620" ) ||strstr (dmi_product_name,"Z820" ) || -strstr (dmi_product_name,"Z1" )) +strstr (dmi_product_name,"Z1 Workstation" ))return true;return false;
@@ -2253,7 +2253,7 @@ static bool xhci_is_async_ep(unsigned int ep_type)static bool xhci_is_sync_in_ep (unsigned int ep_type) { -return (ep_type ==ISOC_IN_EP || ep_type !=INT_IN_EP ); +return (ep_type ==ISOC_IN_EP || ep_type ==INT_IN_EP ); }static unsigned int xhci_get_ss_bw_consumed (struct xhci_bw_info *ep_bw)
drivers/usb/musb/cppi_dma.c +1 -0
@@ -1313,6 +1313,7 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id)return IRQ_HANDLED ; } +EXPORT_SYMBOL_GPL (cppi_interrupt);/* Instantiate a software object representing a DMA controller. */ struct dma_controller *__init
drivers/virtio/virtio_ring.c +7 -0
@@ -132,6 +132,13 @@ static int vring_add_indirect(struct vring_virtqueue *vq,unsigned head;int i; +/* +* We require lowmem mappings for the descriptors because +* otherwise virt_to_phys will give us bogus addresses in the +* virtqueue. +*/ + gfp &= ~(__GFP_HIGHMEM | __GFP_HIGH); + desc =kmalloc ((out + in) *sizeof (struct vring_desc ), gfp);if (!desc)return -ENOMEM ;
fs/binfmt_misc.c +4 -1
@@ -176,7 +176,10 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs) goto _error; bprm->argc ++; - bprm->interp = iname;/* for binfmt_script */ +/* Update interp in case binfmt_script needs it. */ + retval =bprm_change_interp (iname, bprm); +if (retval <0 ) + goto _error; interp_file =open_exec (iname); retval =PTR_ERR (interp_file);
fs/binfmt_script.c +3 -1
@@ -82,7 +82,9 @@ static int load_script(struct linux_binprm *bprm,struct pt_regs *regs) retval =copy_strings_kernel (1 , &i_name, bprm);if (retval)return retval; bprm->argc++; - bprm->interp = interp; + retval =bprm_change_interp (interp, bprm); +if (retval <0 ) +return retval;/* * OK, now restart the process with the interpreter's dentry.
fs/exec.c +15 -0
@@ -1206,9 +1206,24 @@ void free_bprm(struct linux_binprm *bprm)mutex_unlock (¤t->signal->cred_guard_mutex);abort_creds (bprm->cred); } +/* If a binfmt changed the interp, free it. */ +if (bprm->interp != bprm->filename) +kfree (bprm->interp);kfree (bprm); } +int bprm_change_interp (char *interp,struct linux_binprm *bprm) +{ +/* If a binfmt changed the interp, free it first. */ +if (bprm->interp != bprm->filename) +kfree (bprm->interp); + bprm->interp =kstrdup (interp,GFP_KERNEL ); +if (!bprm->interp) +return -ENOMEM ; +return 0 ; +} +EXPORT_SYMBOL (bprm_change_interp); +/* * install the new credentials for this executable */
fs/nfs/client.c +1 -2
@@ -694,8 +694,7 @@ static int nfs_create_rpc_client(struct nfs_client *clp,*/ static void nfs_destroy_server (struct nfs_server *server) { -if (!(server->flags &NFS_MOUNT_LOCAL_FLOCK ) || - !(server->flags &NFS_MOUNT_LOCAL_FCNTL )) +if (server->nlm_host)nlmclnt_done (server->nlm_host); }
fs/nfs/dir.c +6 -5
@@ -1219,11 +1219,14 @@ static int nfs_dentry_delete(const struct dentry *dentry) } +/* Ensure that we revalidate inode->i_nlink */ static void nfs_drop_nlink (struct inode *inode) {spin_lock (&inode->i_lock); -if (inode->i_nlink >0 ) -drop_nlink (inode); +/* drop the inode if we're reasonably sure this is the last link */ +if (inode->i_nlink ==1 ) +clear_nlink (inode); +NFS_I (inode)->cache_validity |=NFS_INO_INVALID_ATTR ;spin_unlock (&inode->i_lock); }
@@ -1238,8 +1241,8 @@ static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode)NFS_I (inode)->cache_validity |=NFS_INO_INVALID_DATA ;if (dentry->d_flags &DCACHE_NFSFS_RENAMED ) { -drop_nlink (inode);nfs_complete_unlink (dentry, inode); +nfs_drop_nlink (inode); }iput (inode); }
@@ -1800,10 +1803,8 @@ static int nfs_safe_remove(struct dentry *dentry)if (inode !=NULL ) {nfs_inode_return_delegation (inode); error =NFS_PROTO (dir)->remove (dir, &dentry->d_name); -/* The VFS may want to delete this inode */ if (error ==0 )nfs_drop_nlink (inode); -nfs_mark_for_revalidate (inode); }else error =NFS_PROTO (dir)->remove (dir, &dentry->d_name);if (error == -ENOENT )
fs/nfs/nfs4proc.c +17 -4
@@ -5739,13 +5739,26 @@ static void nfs41_sequence_prepare(struct rpc_task *task, void *data)rpc_call_start (task); } +static void nfs41_sequence_prepare_privileged (struct rpc_task *task,void *data) +{ +rpc_task_set_priority (task,RPC_PRIORITY_PRIVILEGED ); +nfs41_sequence_prepare (task, data); +} +static const struct rpc_call_ops nfs41_sequence_ops = { .rpc_call_done = nfs41_sequence_call_done, .rpc_call_prepare = nfs41_sequence_prepare, .rpc_release = nfs41_sequence_release, }; -static struct rpc_task *_nfs41_proc_sequence (struct nfs_client *clp,struct rpc_cred *cred) +static const struct rpc_call_ops nfs41_sequence_privileged_ops = { + .rpc_call_done = nfs41_sequence_call_done, + .rpc_call_prepare = nfs41_sequence_prepare_privileged, + .rpc_release = nfs41_sequence_release, +}; + +static struct rpc_task *_nfs41_proc_sequence (struct nfs_client *clp,struct rpc_cred *cred, +const struct rpc_call_ops *seq_ops) {struct nfs4_sequence_data *calldata;struct rpc_message msg = {
@@ -5755,7 +5768,7 @@ static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp, struct rpc_struct rpc_task_setup task_setup_data = { .rpc_client = clp->cl_rpcclient, .rpc_message = &msg, - .callback_ops = &nfs41_sequence_ops, + .callback_ops = seq_ops, .flags =RPC_TASK_ASYNC |RPC_TASK_SOFT , };
@@ -5782,7 +5795,7 @@ static int nfs41_proc_async_sequence(struct nfs_client *clp, struct rpc_cred *crif ((renew_flags &NFS4_RENEW_TIMEOUT ) ==0 )return 0 ; - task =_nfs41_proc_sequence (clp, cred); + task =_nfs41_proc_sequence (clp, cred, &nfs41_sequence_ops);if (IS_ERR (task)) ret =PTR_ERR (task);else
@@ -5796,7 +5809,7 @@ static int nfs4_proc_sequence(struct nfs_client *clp, struct rpc_cred *cred)struct rpc_task *task;int ret; - task =_nfs41_proc_sequence (clp, cred); + task =_nfs41_proc_sequence (clp, cred, &nfs41_sequence_privileged_ops);if (IS_ERR (task)) { ret =PTR_ERR (task); goto out;
fs/nfs/super.c +1 -1
@@ -1138,7 +1138,7 @@ static int nfs_get_option_str(substring_t args[], char **option) {kfree (*option); *option =match_strdup (args); -return !option; +return !*option; }static int nfs_get_option_ul (substring_t args[],unsigned long *option)
fs/nfsd/nfs4proc.c +5 -3
@@ -194,6 +194,7 @@ static __be32 do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open) { struct svc_fh *resfh; +int accmode;__be32 status; resfh =kmalloc (sizeof (struct svc_fh ),GFP_KERNEL );
@@ -253,9 +254,10 @@ do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o/* set reply cache */ fh_copy_shallow (&open->op_openowner->oo_owner.so_replay.rp_openfh, &resfh->fh_handle); -if (!open->op_created) - status =do_open_permission (rqstp, resfh, open, -NFSD_MAY_NOP ); + accmode =NFSD_MAY_NOP ; +if (open->op_created) + accmode |=NFSD_MAY_OWNER_OVERRIDE ; + status =do_open_permission (rqstp, resfh, open, accmode);set_change_info (&open->op_cinfo, current_fh);fh_dup2 (current_fh, resfh); out:
fs/nfsd/nfs4state.c +1 -1
@@ -2356,7 +2356,7 @@ nfsd4_init_slabs(void)if (openowner_slab ==NULL ) goto out_nomem; lockowner_slab =kmem_cache_create ("nfsd4_lockowners" , -sizeof (struct nfs4_openowner ),0 ,0 ,NULL ); +sizeof (struct nfs4_lockowner ),0 ,0 ,NULL );if (lockowner_slab ==NULL ) goto out_nomem; file_slab = kmem_cache_create("nfsd4_files",
fs/nfsd/nfs4xdr.c +10 -1
@@ -2920,11 +2920,16 @@ nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr, len = maxcount; v =0 ;while (len >0 ) { - pn = resp->rqstp->rq_resused++; + pn = resp->rqstp->rq_resused; +if (!resp->rqstp->rq_respages[pn]) {/* ran out of pages */ + maxcount -= len; +break ; + } resp->rqstp->rq_vec[v].iov_base =page_address (resp->rqstp->rq_respages[pn]); resp->rqstp->rq_vec[v].iov_len = len <PAGE_SIZE ? len :PAGE_SIZE ; + resp->rqstp->rq_resused++; v++; len -=PAGE_SIZE ; }
@@ -2970,6 +2975,8 @@ nfsd4_encode_readlink(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsdreturn nfserr;if (resp->xbuf->page_len)return nfserr_resource; +if (!resp->rqstp->rq_respages[resp->rqstp->rq_resused]) +return nfserr_resource; page =page_address (resp->rqstp->rq_respages[resp->rqstp->rq_resused++]);
@@ -3019,6 +3026,8 @@ nfsd4_encode_readdir(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4return nfserr;if (resp->xbuf->page_len)return nfserr_resource; +if (!resp->rqstp->rq_respages[resp->rqstp->rq_resused]) +return nfserr_resource;RESERVE_SPACE (NFS4_VERIFIER_SIZE ); savep = p;
fs/nfsd/nfssvc.c +1 -1
@@ -650,7 +650,7 @@ nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp) }/* Store reply in cache. */ -nfsd_cache_update (rqstp, proc->pc_cachetype, statp +1 ); +nfsd_cache_update (rqstp, rqstp->rq_cachetype, statp +1 );return 1 ; }
fs/nfsd/vfs.c +8 -2
@@ -1477,13 +1477,19 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,case NFS3_CREATE_EXCLUSIVE :if ( dchild->d_inode->i_mtime.tv_sec == v_mtime && dchild->d_inode->i_atime.tv_sec == v_atime - && dchild->d_inode->i_size ==0 ) + && dchild->d_inode->i_size ==0 ) { +if (created) + *created =1 ;break ; + }case NFS4_CREATE_EXCLUSIVE4_1 :if ( dchild->d_inode->i_mtime.tv_sec == v_mtime && dchild->d_inode->i_atime.tv_sec == v_atime - && dchild->d_inode->i_size ==0 ) + && dchild->d_inode->i_size ==0 ) { +if (created) + *created =1 ; goto set_attr; + }/* fallthru */ case NFS3_CREATE_GUARDED : err = nfserr_exist;
fs/splice.c +3 -1
@@ -696,8 +696,10 @@ static int pipe_to_sendpage(struct pipe_inode_info *pipe,return -EINVAL ; more = (sd->flags &SPLICE_F_MORE ) ?MSG_MORE :0 ; -if (sd->len < sd->total_len) + +if (sd->len < sd->total_len && pipe->nrbufs >1 ) more |=MSG_SENDPAGE_NOTLAST ; +return file->f_op->sendpage (file, buf->page, buf->offset, sd->len, &pos, more); }
include/asm-generic/tlb.h +9 -0
@@ -78,6 +78,14 @@ struct mmu_gather_batch {#define MAX_GATHER_BATCH \ ((PAGE_SIZE - sizeof(struct mmu_gather_batch)) / sizeof(void *)) +/* +* Limit the maximum number of mmu_gather batches to reduce a risk of soft +* lockups for non-preemptible kernels on huge machines when a lot of memory +* is zapped during unmapping. +* 10K pages freed at once should be safe even without a preemption point. +*/ +#define MAX_GATHER_BATCH_COUNT (10000UL/MAX_GATHER_BATCH) +/* struct mmu_gather is an opaque type used by the mm code for passing around * any data needed by arch specific code for tlb_remove_page. */
@@ -94,6 +102,7 @@ struct mmu_gather {struct mmu_gather_batch *active;struct mmu_gather_batch local;struct page *__pages[MMU_GATHER_BUNDLE ]; +unsigned int batch_count; };#define HAVE_GENERIC_MMU_GATHER
include/linux/binfmts.h +1 -0
@@ -128,6 +128,7 @@ extern int setup_arg_pages(struct linux_binprm * bprm,unsigned long stack_top, int executable_stack);extern int bprm_mm_init (struct linux_binprm *bprm); +extern int bprm_change_interp (char *interp,struct linux_binprm *bprm);extern int copy_strings_kernel (int argc,const char *const *argv,struct linux_binprm *bprm);extern int prepare_bprm_creds (struct linux_binprm *bprm);
include/linux/freezer.h +42 -8
70 lines not on this page · raw message
include/linux/page-flags.h +7 -1
@@ -361,7 +361,7 @@ static inline void ClearPageCompound(struct page *page)* pages on the LRU and/or pagecache. */ TESTPAGEFLAG(Compound, compound) -__PAGEFLAG (Head, compound) +__SETPAGEFLAG(Head, compound) __CLEARPAGEFLAG(Head, compound)/* * PG_reclaim is used in combination with PG_compound to mark the
@@ -373,8 +373,14 @@ __PAGEFLAG(Head, compound)* PG_compound & PG_reclaim => Tail page * PG_compound & ~PG_reclaim => Head page */ +#define PG_head_mask ((1L << PG_compound))#define PG_head_tail_mask ((1L << PG_compound) | (1L << PG_reclaim)) +static inline int PageHead (struct page *page) +{ +return ((page->flags & PG_head_tail_mask) == PG_head_mask); +} +static inline int PageTail (struct page *page) {return ((page->flags & PG_head_tail_mask) == PG_head_tail_mask);
include/linux/pci_ids.h +1 -0
@@ -1565,6 +1565,7 @@#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478#define PCI_DEVICE_ID_RICOH_R5C822 0x0822 +#define PCI_DEVICE_ID_RICOH_R5CE822 0xe822#define PCI_DEVICE_ID_RICOH_R5CE823 0xe823#define PCI_DEVICE_ID_RICOH_R5C832 0x0832#define PCI_DEVICE_ID_RICOH_R5C843 0x0843
include/linux/snmp.h +2 -1
@@ -208,7 +208,6 @@ enumLINUX_MIB_TCPDSACKOFOSENT ,/* TCPDSACKOfoSent */ LINUX_MIB_TCPDSACKRECV ,/* TCPDSACKRecv */ LINUX_MIB_TCPDSACKOFORECV ,/* TCPDSACKOfoRecv */ -LINUX_MIB_TCPABORTONSYN ,/* TCPAbortOnSyn */ LINUX_MIB_TCPABORTONDATA ,/* TCPAbortOnData */ LINUX_MIB_TCPABORTONCLOSE ,/* TCPAbortOnClose */ LINUX_MIB_TCPABORTONMEMORY, /* TCPAbortOnMemory */
@@ -234,6 +233,8 @@ enumLINUX_MIB_TCPREQQFULLDROP ,/* TCPReqQFullDrop */ LINUX_MIB_TCPRETRANSFAIL ,/* TCPRetransFail */ LINUX_MIB_TCPRCVCOALESCE ,/* TCPRcvCoalesce */ +LINUX_MIB_TCPCHALLENGEACK ,/* TCPChallengeACK */ +LINUX_MIB_TCPSYNCHALLENGE ,/* TCPSYNChallenge */ __LINUX_MIB_MAX };
include/net/inet_connection_sock.h +1 -0
@@ -317,6 +317,7 @@ extern void inet_csk_reqsk_queue_prune(struct sock *parent, const unsigned long max_rto);extern void inet_csk_destroy_sock (struct sock *sk); +extern void inet_csk_prepare_forced_close (struct sock *sk);/* * LISTEN is a special case for poll..
include/net/tcp.h +1 -0
@@ -252,6 +252,7 @@ extern int sysctl_tcp_max_ssthresh;extern int sysctl_tcp_cookie_size;extern int sysctl_tcp_thin_linear_timeouts;extern int sysctl_tcp_thin_dupack; +extern int sysctl_tcp_challenge_ack_limit;extern atomic_long_t tcp_memory_allocated;extern struct percpu_counter tcp_sockets_allocated;
kernel/cgroup.c +0 -2
@@ -2568,9 +2568,7 @@ static int cgroup_create_dir(struct cgroup *cgrp, struct dentry *dentry, dentry->d_fsdata = cgrp;inc_nlink (parent->d_inode);rcu_assign_pointer (cgrp->dentry, dentry); -dget (dentry); } -dput (dentry);return error; }
kernel/irq/manage.c +21 -2
@@ -708,6 +708,7 @@ static void irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) { cpumask_var_t mask; +bool valid = true;if (!test_and_clear_bit (IRQTF_AFFINITY , &action->thread_flags))return ;
@@ -722,10 +723,18 @@ irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) }raw_spin_lock_irq (&desc->lock); -cpumask_copy (mask, desc->irq_data.affinity); +/* +* This code is triggered unconditionally. Check the affinity +* mask pointer. For CPU_MASK_OFFSTACK=n this is optimized out. +*/ +if (desc->irq_data.affinity) +cpumask_copy (mask, desc->irq_data.affinity); +else + valid = false;raw_spin_unlock_irq (&desc->lock); -set_cpus_allowed_ptr (current, mask); +if (valid) +set_cpus_allowed_ptr (current, mask);free_cpumask_var (mask); }#else
@@ -933,6 +942,16 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)*/ get_task_struct (t); new->thread = t; +/* +* Tell the thread to set its affinity. This is +* important for shared interrupt handlers as we do +* not invoke setup_affinity() for the secondary +* handlers as everything is already set up. Even for +* interrupts marked with IRQF_NO_BALANCE this is +* correct as we want the thread to move to the cpu(s) +* on which the requesting code placed the interrupt. +*/ +set_bit (IRQTF_AFFINITY , &new->thread_flags); }if (!alloc_cpumask_var (&mask,GFP_KERNEL )) {
lib/atomic64.c +5 -12
@@ -31,7 +31,11 @@static union {raw_spinlock_t lock;char pad[L1_CACHE_BYTES ]; -} atomic64_lock[NR_LOCKS] __cacheline_aligned_in_smp; +} atomic64_lock[NR_LOCKS] __cacheline_aligned_in_smp = { + [0 ... (NR_LOCKS -1 )] = { + .lock =__RAW_SPIN_LOCK_UNLOCKED (atomic64_lock.lock), + }, +};static inline raw_spinlock_t *lock_addr (const atomic64_t *v) {
@@ -173,14 +177,3 @@ int atomic64_add_unless(atomic64_t *v, long long a, long long u)return ret; }EXPORT_SYMBOL (atomic64_add_unless); - -static int init_atomic64_lock (void ) -{ -int i; - -for (i =0 ; i <NR_LOCKS ; ++i) -raw_spin_lock_init (&atomic64_lock[i].lock); -return 0 ; -} - -pure_initcall (init_atomic64_lock);
mm/memory.c +5 -0
@@ -182,10 +182,14 @@ static int tlb_next_batch(struct mmu_gather *tlb)return 1 ; } +if (tlb->batch_count ==MAX_GATHER_BATCH_COUNT ) +return 0 ; + batch = (void *)__get_free_pages (GFP_NOWAIT | __GFP_NOWARN,0 );if (!batch)return 0 ; + tlb->batch_count++; batch->next =NULL ; batch->nr =0 ; batch->max =MAX_GATHER_BATCH ;
@@ -212,6 +216,7 @@ void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, bool fullmm) tlb->local.nr =0 ; tlb->local.max =ARRAY_SIZE (tlb->__pages); tlb->active = &tlb->local; + tlb->batch_count =0 ;#ifdef CONFIG_HAVE_RCU_TABLE_FREE tlb->batch =NULL ;
mm/mempolicy.c +26 -38
116 lines not on this page · raw message
mm/page-writeback.c +20 -5
@@ -187,6 +187,18 @@ static unsigned long highmem_dirtyable_memory(unsigned long total)zone_reclaimable_pages (z) - z->dirty_balance_reserve; }/* +* Unreclaimable memory (kernel memory or anonymous memory +* without swap) can bring down the dirtyable pages below +* the zone's dirty balance reserve and the above calculation +* will underflow. However we still want to add in nodes +* which are below threshold (negative values) to get a more +* accurate calculation but make sure that the total never +* underflows. +*/ +if ((long )x <0 ) + x =0 ; + +/* * Make sure that the number of highmem pages is never larger * than the number of the total dirtyable memory. This can only * occur in very strange VM situations but we want to make sure
@@ -208,8 +220,8 @@ unsigned long global_dirtyable_memory(void) {unsigned long x; - x =global_page_state (NR_FREE_PAGES ) +global_reclaimable_pages () - - dirty_balance_reserve; + x =global_page_state (NR_FREE_PAGES ) +global_reclaimable_pages (); + x -=min (x, dirty_balance_reserve);if (!vm_highmem_is_dirtyable) x -=highmem_dirtyable_memory (x);
@@ -276,9 +288,12 @@ static unsigned long zone_dirtyable_memory(struct zone *zone)* highmem zone can hold its share of dirty pages, so we don't * care about vm_highmem_is_dirtyable here. */ -return zone_page_state (zone,NR_FREE_PAGES ) + -zone_reclaimable_pages (zone) - - zone->dirty_balance_reserve; +unsigned long nr_pages =zone_page_state (zone,NR_FREE_PAGES ) + +zone_reclaimable_pages (zone); + +/* don't allow this to underflow */ + nr_pages -=min (nr_pages, zone->dirty_balance_reserve); +return nr_pages; }/**
net/batman-adv/bat_iv_ogm.c +1 -1
@@ -72,7 +72,7 @@ static unsigned long bat_iv_ogm_emit_send_time(const struct bat_priv *bat_priv) {return jiffies +msecs_to_jiffies (atomic_read (&bat_priv->orig_interval) - -JITTER + (random32 () %2 *JITTER )); +JITTER + (random32 () % (2 *JITTER ))); }/* when do we schedule a ogm packet to be sent */
net/bluetooth/hci_core.c +2 -0
@@ -1866,6 +1866,8 @@ void hci_unregister_dev(struct hci_dev *hdev)for (i =0 ; i <NUM_REASSEMBLY ; i++)kfree_skb (hdev->reassembly[i]); +cancel_work_sync (&hdev->power_on); +if (!test_bit (HCI_INIT , &hdev->flags) && !test_bit (HCI_SETUP , &hdev->dev_flags)) {hci_dev_lock (hdev);
net/bluetooth/rfcomm/sock.c +2 -2
@@ -485,7 +485,7 @@ static int rfcomm_sock_accept(struct socket *sock, struct socket *newsock, int flong timeo;int err =0 ; -lock_sock (sk); +lock_sock_nested (sk,SINGLE_DEPTH_NESTING );if (sk->sk_type !=SOCK_STREAM ) { err = -EINVAL ;
@@ -522,7 +522,7 @@ static int rfcomm_sock_accept(struct socket *sock, struct socket *newsock, int frelease_sock (sk); timeo =schedule_timeout (timeo); -lock_sock (sk); +lock_sock_nested (sk,SINGLE_DEPTH_NESTING ); }__set_current_state (TASK_RUNNING );remove_wait_queue (sk_sleep (sk), &wait);
net/dccp/ipv4.c +2 -2
@@ -435,8 +435,8 @@ exit:NET_INC_STATS_BH (sock_net (sk),LINUX_MIB_LISTENDROPS );return NULL ; put_and_exit: -bh_unlock_sock (newsk); -sock_put (newsk); +inet_csk_prepare_forced_close (newsk); +dccp_done (newsk); goto exit; }
net/dccp/ipv6.c +2 -1
@@ -611,7 +611,8 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk, newinet->inet_rcv_saddr =LOOPBACK4_IPV6 ;if (__inet_inherit_port (sk, newsk) <0 ) { -sock_put (newsk); +inet_csk_prepare_forced_close (newsk); +dccp_done (newsk); goto out; }__inet6_hash (newsk,NULL );
net/ipv4/inet_connection_sock.c +16 -0
@@ -659,6 +659,22 @@ void inet_csk_destroy_sock(struct sock *sk) }EXPORT_SYMBOL (inet_csk_destroy_sock); +/* This function allows to force a closure of a socket after the call to +* tcp/dccp_create_openreq_child(). +*/ +void inet_csk_prepare_forced_close (struct sock *sk) +{ +/* sk_clone_lock locked the socket and set refcnt to 2 */ +bh_unlock_sock (sk); +sock_put (sk); + +/* The below has to be done to allow calling inet_csk_destroy_sock */ +sock_set_flag (sk,SOCK_DEAD ); +percpu_counter_inc (sk->sk_prot->orphan_count); +inet_sk (sk)->inet_num =0 ; +} +EXPORT_SYMBOL (inet_csk_prepare_forced_close); +int inet_csk_listen_start (struct sock *sk,const int nr_table_entries) {struct inet_sock *inet =inet_sk (sk);
net/ipv4/inet_diag.c +122 -32
220 lines not on this page · raw message
net/ipv4/ip_fragment.c +9 -10
@@ -685,28 +685,27 @@ EXPORT_SYMBOL(ip_defrag);struct sk_buff *ip_check_defrag (struct sk_buff *skb,u32 user) { -const struct iphdr *iph; +struct iphdr iph;u32 len;if (skb->protocol !=htons (ETH_P_IP ))return skb; -if (!pskb_may_pull (skb,sizeof (struct iphdr ))) +if (!skb_copy_bits (skb,0 , &iph,sizeof (iph)))return skb; - iph =ip_hdr (skb); -if (iph->ihl <5 || iph->version !=4 ) +if (iph.ihl <5 || iph.version !=4 )return skb; -if (!pskb_may_pull (skb, iph->ihl*4 )) -return skb; - iph =ip_hdr (skb); - len =ntohs (iph->tot_len); -if (skb->len < len || len < (iph->ihl *4 )) + + len =ntohs (iph.tot_len); +if (skb->len < len || len < (iph.ihl *4 ))return skb; -if (ip_is_fragment (ip_hdr (skb))) { +if (ip_is_fragment (&iph)) { skb =skb_share_check (skb,GFP_ATOMIC );if (skb) { +if (!pskb_may_pull (skb, iph.ihl*4 )) +return skb;if (pskb_trim_rcsum (skb, len))return skb;memset (IPCB (skb),0 ,sizeof (struct inet_skb_parm ));
net/ipv4/proc.c +2 -1
@@ -232,7 +232,6 @@ static const struct snmp_mib snmp4_net_list[] = {SNMP_MIB_ITEM ("TCPDSACKOfoSent" ,LINUX_MIB_TCPDSACKOFOSENT ),SNMP_MIB_ITEM ("TCPDSACKRecv" ,LINUX_MIB_TCPDSACKRECV ),SNMP_MIB_ITEM ("TCPDSACKOfoRecv" ,LINUX_MIB_TCPDSACKOFORECV ), -SNMP_MIB_ITEM ("TCPAbortOnSyn" ,LINUX_MIB_TCPABORTONSYN ),SNMP_MIB_ITEM ("TCPAbortOnData" ,LINUX_MIB_TCPABORTONDATA ),SNMP_MIB_ITEM ("TCPAbortOnClose" ,LINUX_MIB_TCPABORTONCLOSE ), SNMP_MIB_ITEM("TCPAbortOnMemory", LINUX_MIB_TCPABORTONMEMORY),
@@ -258,6 +257,8 @@ static const struct snmp_mib snmp4_net_list[] = {SNMP_MIB_ITEM ("TCPReqQFullDrop" ,LINUX_MIB_TCPREQQFULLDROP ),SNMP_MIB_ITEM ("TCPRetransFail" ,LINUX_MIB_TCPRETRANSFAIL ),SNMP_MIB_ITEM ("TCPRcvCoalesce" ,LINUX_MIB_TCPRCVCOALESCE ), +SNMP_MIB_ITEM ("TCPChallengeACK" ,LINUX_MIB_TCPCHALLENGEACK ), +SNMP_MIB_ITEM ("TCPSYNChallenge" ,LINUX_MIB_TCPSYNCHALLENGE ), SNMP_MIB_SENTINEL };
net/ipv4/sysctl_net_ipv4.c +7 -0
@@ -590,6 +590,13 @@ static struct ctl_table ipv4_table[] = { .mode = 0644, .proc_handler = proc_dointvec }, + { + .procname = "tcp_challenge_ack_limit", + .data = &sysctl_tcp_challenge_ack_limit, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = proc_dointvec + },#ifdef CONFIG_NET_DMA { .procname = "tcp_dma_copybreak",
net/ipv4/tcp_input.c +68 -25
177 lines not on this page · raw message
net/ipv4/tcp_ipv4.c +2 -4
@@ -1524,10 +1524,8 @@ exit:NET_INC_STATS_BH (sock_net (sk),LINUX_MIB_LISTENDROPS );return NULL ; put_and_exit: -tcp_clear_xmit_timers (newsk); -tcp_cleanup_congestion_control (newsk); -bh_unlock_sock (newsk); -sock_put (newsk); +inet_csk_prepare_forced_close (newsk); +tcp_done (newsk); goto exit; }EXPORT_SYMBOL (tcp_v4_syn_recv_sock);
net/ipv6/tcp_ipv6.c +2 -1
@@ -1411,7 +1411,8 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,#endif if (__inet_inherit_port (sk, newsk) <0 ) { -sock_put (newsk); +inet_csk_prepare_forced_close (newsk); +tcp_done (newsk); goto out; }__inet6_hash (newsk,NULL );
net/sched/sch_htb.c +1 -1
@@ -876,7 +876,7 @@ ok: q->now =psched_get_time (); start_at = jiffies; - next_event = q->now +5 *PSCHED_TICKS_PER_SEC ; + next_event = q->now +5LLU *PSCHED_TICKS_PER_SEC ;for (level =0 ; level <TC_HTB_MAXDEPTH ; level++) {/* common case optimization - skip event handler quickly */
net/sctp/chunk.c +14 -6
@@ -183,7 +183,7 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc, msg =sctp_datamsg_new (GFP_KERNEL );if (!msg) -return NULL ; +return ERR_PTR (-ENOMEM );/* Note: Calculate this outside of the loop, so that all fragments * have the same expiration.
@@ -280,11 +280,14 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc, chunk =sctp_make_datafrag_empty (asoc, sinfo, len, frag,0 ); -if (!chunk) +if (!chunk) { + err = -ENOMEM ; goto errout; + } + err =sctp_user_addto_chunk (chunk, offset, len, msgh->msg_iov);if (err <0 ) - goto errout; + goto errout_chunk_free; offset += len;
@@ -315,8 +318,10 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc, chunk =sctp_make_datafrag_empty (asoc, sinfo, over, frag,0 ); -if (!chunk) +if (!chunk) { + err = -ENOMEM ; goto errout; + } err =sctp_user_addto_chunk (chunk, offset, over,msgh->msg_iov);
@@ -324,7 +329,7 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,__skb_pull (chunk->skb, (__u8 *)chunk->chunk_hdr - (__u8 *)chunk->skb->data);if (err <0 ) - goto errout; + goto errout_chunk_free;sctp_datamsg_assign (msg, chunk);list_add_tail (&chunk->frag_list, &msg->chunks);
@@ -332,6 +337,9 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,return msg; +errout_chunk_free: +sctp_chunk_free (chunk); + errout:list_for_each_safe (pos, temp, &msg->chunks) {list_del_init (pos);
@@ -339,7 +347,7 @@ errout:sctp_chunk_free (chunk); }sctp_datamsg_put (msg); -return NULL ; +return ERR_PTR (err); }/* Check whether this message has expired. */
net/sctp/socket.c +2 -2
@@ -1908,8 +1908,8 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,/* Break the message into multiple chunks of maximum size. */ datamsg =sctp_datamsg_from_user (asoc, sinfo, msg, msg_len); -if (!datamsg) { - err = -ENOMEM ; +if (IS_ERR (datamsg)) { + err =PTR_ERR (datamsg); goto out_free; }
sound/pci/hda/patch_realtek.c +2 -2
@@ -6520,8 +6520,8 @@ static void alc861vd_fixup_dallas(struct hda_codec *codec, const struct alc_fixup *fix, int action) { if (action == ALC_FIXUP_ACT_PRE_PROBE) { - snd_hda_override_pin_caps(codec, 0x18, 0x00001714); -snd_hda_override_pin_caps (codec,0x19 ,0x0000171c ); + snd_hda_override_pin_caps(codec, 0x18, 0x00000734); +snd_hda_override_pin_caps (codec,0x19 ,0x0000073c ); } }
sound/pci/hda/patch_sigmatel.c +1 -1
@@ -1695,7 +1695,7 @@ static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {SND_PCI_QUIRK (PCI_VENDOR_ID_HP ,0x1658 ,"HP" , STAC_92HD83XXX_HP_cNB11_INTQUAD),SND_PCI_QUIRK (PCI_VENDOR_ID_HP ,0x1659 , -"HP" , STAC_92HD83XXX_HP_cNB11_INTQUAD), +"HP Pavilion dv7" ,STAC_HP_DV7_4000 ),SND_PCI_QUIRK (PCI_VENDOR_ID_HP ,0x165A ,"HP" , STAC_92HD83XXX_HP_cNB11_INTQUAD), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x165B,
sound/usb/midi.c +58 -33
198 lines not on this page · raw message