Linux 3.3.5
Greg KH
maintainerI'm announcing the release of the 3.3.5 kernel.
All users of the 3.3 kernel series must upgrade.
The updated 3.3.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.3.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/Kconfig | 9 arch/arm/include/asm/tls.h | 4 arch/arm/kernel/irq.c | 6 arch/arm/mm/abort-ev6.S | 17 + arch/mips/ath79/dev-wmac.c | 2 arch/powerpc/platforms/85xx/common.c | 6 arch/powerpc/platforms/85xx/mpc85xx_mds.c | 11 - arch/powerpc/platforms/85xx/p1022_ds.c | 13 - arch/x86/boot/Makefile | 3 arch/x86/boot/compressed/Makefile | 1 arch/x86/boot/compressed/eboot.c | 8 arch/x86/boot/compressed/head_32.S | 14 + arch/x86/boot/compressed/head_64.S | 22 +- arch/x86/boot/compressed/mkpiggy.c | 11 - arch/x86/boot/tools/build.c | 42 ++-- arch/x86/include/asm/x86_init.h | 1 arch/x86/kernel/apic/apic.c | 34 ++- arch/x86/kernel/apic/apic_numachip.c | 7 arch/x86/kernel/cpu/amd.c | 7 arch/x86/kernel/cpu/common.c | 9 arch/x86/kernel/i387.c | 1 arch/x86/kernel/microcode_amd.c | 12 - arch/x86/kernel/microcode_core.c | 10 - arch/x86/kernel/x86_init.c | 1 arch/x86/xen/smp.c | 15 + arch/x86/xen/xen-asm.S | 2 drivers/ata/libata-eh.c | 3 drivers/crypto/talitos.c | 20 +- drivers/dma/at_hdmac.c | 4 drivers/firmware/efivars.c | 196 +++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 8 drivers/gpu/drm/i915/i915_reg.h | 1 drivers/gpu/drm/i915/intel_ringbuffer.c | 8 drivers/gpu/drm/i915/intel_sdvo.c | 34 +-- drivers/gpu/drm/nouveau/nouveau_acpi.c | 2 drivers/gpu/drm/radeon/atombios_crtc.c | 4 drivers/hwmon/coretemp.c | 6 drivers/hwmon/fam15h_power.c | 42 ++++ drivers/i2c/busses/i2c-pnx.c | 3 drivers/input/mouse/synaptics.c | 3 drivers/md/raid5.c | 4 drivers/net/wireless/b43/main.c | 10 - drivers/net/wireless/ipw2x00/ipw2200.c | 13 + drivers/net/wireless/iwlwifi/iwl-1000.c | 8 drivers/net/wireless/iwlwifi/iwl-2000.c | 16 - drivers/net/wireless/iwlwifi/iwl-5000.c | 11 - drivers/net/wireless/iwlwifi/iwl-6000.c | 10 - drivers/net/wireless/iwlwifi/iwl-agn.c | 3 drivers/net/wireless/iwlwifi/iwl-fh.h | 24 +- drivers/net/wireless/iwlwifi/iwl-mac80211.c | 10 - drivers/net/wireless/iwlwifi/iwl-prph.h | 27 ++ drivers/net/wireless/rtlwifi/pci.c | 1 drivers/net/wireless/wl1251/main.c | 1 drivers/net/wireless/wl1251/sdio.c | 2 drivers/platform/x86/dell-laptop.c | 1 drivers/scsi/libsas/sas_expander.c | 26 ++ drivers/usb/class/cdc-wdm.c | 7 drivers/usb/core/hcd-pci.c | 9 drivers/usb/gadget/dummy_hcd.c | 1 drivers/usb/gadget/f_mass_storage.c | 2 drivers/usb/gadget/file_storage.c | 2 drivers/usb/gadget/uvc.h | 2 drivers/usb/gadget/uvc_v4l2.c | 2 drivers/usb/host/ehci-pci.c | 8 drivers/usb/host/ehci-tegra.c | 1 fs/autofs4/autofs_i.h | 12 + fs/autofs4/dev-ioctl.c | 3 fs/autofs4/inode.c | 4 fs/autofs4/waitq.c | 20 -- fs/exec.c | 3 fs/hfsplus/catalog.c | 4 fs/hfsplus/dir.c | 11 + fs/nfs/nfs4proc.c | 23 ++ fs/nfs/read.c | 2 fs/nfs/super.c | 8 fs/nfs/write.c | 2 fs/pipe.c | 31 ++- include/linux/efi.h | 13 + include/linux/pipe_fs_i.h | 1 include/linux/usb/hcd.h | 2 kernel/exit.c | 19 - kernel/power/swap.c | 28 ++ kernel/sched/core.c | 75 ++++--- kernel/signal.c | 9 kernel/trace/trace_output.c | 5 net/mac80211/tx.c | 3 net/wireless/nl80211.c | 29 +- sound/pci/hda/patch_realtek.c | 1 sound/soc/codecs/wm8994.c | 276 ++++++++++++++++++++++------ sound/soc/soc-dapm.c | 2 tools/include/tools/be_byteshift.h | 70 +++++++ tools/include/tools/le_byteshift.h | 70 +++++++ 93 files changed, 1176 insertions(+), 355 deletions(-)
Alan Stern (2):
USB: EHCI: fix crash during suspend on ASUS computers
USB: gadget: storage gadgets send wrong error code for unknown commands
Alex Deucher (1):
drm/radeon/kms: need to set up ss on DP bridges as well
Andre Przywara (1):
hwmon: fam15h_power: fix bogus values with current BIOSes
Andreas Herrmann (3):
x86, microcode: Fix sysfs warning during module unload on unsupported CPUs x86, microcode: Ensure that module is only loaded on supported AMD CPUs x86/platform: Remove incorrect error message in x86_default_fixup_cpu_id()
Benjamin Herrenschmidt (1):
Input: synaptics - fix regression with "image sensor" trackpads
Bojan Smojver (1):
PM / Hibernate: fix the number of pages used for hibernate/thaw buffering
Bryan O'Donoghue (1):
x86, apic: APIC code touches invalid MSR on P5 class machines
Dan Carpenter (1):
x86, efi: Fix pointer math issue in handle_ramdisks()
Dan Williams (1):
SCSI: libsas: fix false positive 'device attached' conditions
Daniel Vetter (1):
drm/i915: handle input/output sdvo timings separately in mode_set
Dave Airlie (1):
nouveau: initialise has_optimus variable.
David Henningsson (1):
ALSA: HDA: Add external mic quirk for Asus Zenbook UX31E
David Vrabel (1):
xen: correctly check for pending events when restoring irq flags
Felipe Balbi (1):
usb: gadget: dummy: do not call pullup() on udc_stop()
Felix Fietkau (1):
mac80211: fix AP mode EAP tx for VLAN stations
Fred Isaman (2):
NFS: put open context on error in nfs_pagein_multi
NFS: put open context on error in nfs_flush_multi
Gabor Juhos (1):
MIPS: ath79: fix AR933X WMAC reset code
Grazvydas Ignotas (2):
wl1251: fix crash on remove due to premature kfree
wl1251: fix crash on remove due to leftover work item
Greg Kroah-Hartman (2):
hfsplus: Fix potential buffer overflows
Linux 3.3.5
Guenter Roeck (2):
hwmon: (fam15h_power) Fix pci_device_id array
hwmon: (coretemp) Increase CPU core limit
H. Peter Anvin (1):
x86, boot: Correct CFLAGS for hostprogs
Horia Geanta (1):
crypto: talitos - properly lock access to global talitos registers
Jan Kara (1):
nfs: Enclose hostname in brackets when needed in nfs_do_root_mount
Johannes Berg (2):
nl80211: ensure interface is up in various APIs
iwlwifi: fix hardware queue programming
Kenneth Graunke (1):
drm/i915: Set the Stencil Cache eviction policy to non-LRA mode.
Kirill A. Shutemov (1):
hwmon: (coretemp) fix oops on cpu unplug
Konrad Rzeszutek Wilk (1):
xen/smp: Fix crash when booting with ACPI hotplug CPUs.
Larry Finger (1):
rtlwifi: Fix oops on unload
Laurent Pinchart (1):
usb gadget: uvc: uvc_request_data::length field must be signed
Lin Ming (1):
libata: skip old error history when counting probe trials
Linus Torvalds (3):
Revert "autofs: work around unhappy compat problem on x86-64"
pipes: add a "packetized pipe" mode for writing
autofs: make the autofsv5 packet file descriptor use a packetized pipe
Mark Brown (2):
ASoC: dapm: Ensure power gets managed for line widgets
ASoC: wm8994: Improve sequencing of AIF channel enables
Martin Nyhus (1):
dell-laptop: Terminate quirks list properly
Matt Fleming (5):
tools/include: Add byteshift headers for endian access x86, mkpiggy: Don't open code put_unaligned_le32() x86, boot: Restrict CFLAGS for hostprogs x86, efi: Fix endian issues and unaligned accesses x86, efi: Add dedicated EFI stub entry point
Matthew Garrett (3):
efi: Add new variable attributes
efi: Validate UEFI boot variables
efivars: Improve variable validation
Meenakshi Venkataraman (1):
iwlwifi: use correct released ucode version
Nicolas Ferre (1):
dmaengine: at_hdmac: remove clear-on-read in atc_dostart()
Oleg Nesterov (3):
i387: ptrace breaks the lazy-fpu-restore logic
exit_signal: simplify the "we have changed execution domain" logic
exit_signal: fix the "parent has changed security domain" logic
Oliver Neukum (1):
USB: cdc-wdm: fix race leading leading to memory corruption
Peter Zijlstra (1):
sched: Fix nohz load accounting -- again!
Roland Stigge (1):
i2c: pnx: Disable clk in suspend
Seth Forshee (1):
b43: only reload config after successful initialization
Stanislav Yakovlev (1):
ipw2200: Fix race condition in the command completion acknowledge
Stanislaw Gruszka (1):
iwlwifi: do not nulify ctx->vif on reset
Stephen Warren (1):
USB: ehci-tegra: remove redundant gpio_set_value
Steven Rostedt (1):
tracing: Fix stacktrace of latency tracers (irqsoff and friends)
Thomas Jackson (1):
SCSI: libsas: fix sas_find_bcast_phy() in the presence of 'vacant' phys
Timur Tabi (1):
powerpc/85xx: don't call of_platform_bus_probe() twice
Trond Myklebust (2):
NFSv4: Ensure that the LOCK code sets exception->inode
NFSv4: Ensure that we check lock exclusive/shared type against open modes
Wey-Yi Guy (1):
iwlwifi: use 6000G2B for 6030 device series
Will Deacon (3):
ARM: 7396/1: errata: only handle ARM erratum #326103 on affected cores
ARM: 7403/1: tls: remove covert channel via TPIDRURW
ARM: 7406/1: hotplug: copy the affinity mask when forcefully migrating IRQs
Xi Wang (2):
drm/i915: fix integer overflow in i915_gem_execbuffer2() drm/i915: fix integer overflow in i915_gem_do_execbuffer()
he, bo (1):
sched: Fix OOPS when build_sched_domains() percpu allocation fails
majianpeng (1):
md/raid5: Fix a bug about judging if the operation is syncing or replacing
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 3 -SUBLEVEL = 4 +SUBLEVEL = 5 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/arm/Kconfig +9 -0
@@ -1163,6 +1163,15 @@ if !MMU source "arch/arm/Kconfig-nommu" endif +config ARM_ERRATA_326103 + bool "ARM errata: FSR write bit incorrect on a SWP to read-only memory" + depends on CPU_V6 + help + Executing a SWP instruction to read-only memory does not set bit 11 + of the FSR on the ARM 1136 prior to r1p0. This causes the kernel to + treat the access as a read, preventing a COW from occurring and + causing the faulting task to livelock. + config ARM_ERRATA_411920 bool "ARM errata: Invalidation of the Instruction Cache operation can fail" depends on CPU_V6 || CPU_V6K
arch/arm/include/asm/tls.h +4 -0
@@ -7,6 +7,8 @@ .macro set_tls_v6k, tp, tmp1, tmp2 mcr p15, 0, \tp, c13, c0, 3 @ set TLS register + mov \tmp1, #0 + mcr p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register .endm .macro set_tls_v6, tp, tmp1, tmp2
@@ -15,6 +17,8 @@ mov \tmp2, #0xffff0fff tst \tmp1, #HWCAP_TLS @ hardware TLS available? mcrne p15, 0, \tp, c13, c0, 3 @ yes, set TLS register + movne \tmp1, #0 + mcrne p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register streq \tp, [\tmp2, #-15] @ set TLS value at 0xffff0ff0 .endm
arch/arm/kernel/irq.c +3 -3
@@ -156,10 +156,10 @@ static bool migrate_one_irq(struct irq_desc *desc) } c =irq_data_get_irq_chip (d); -if (c->irq_set_affinity) - c->irq_set_affinity (d, affinity, true); -else +if (!c->irq_set_affinity)pr_debug ("IRQ%u: unable to set affinity\n" , d->irq); +else if (c->irq_set_affinity (d, affinity, true) ==IRQ_SET_MASK_OK && ret) +cpumask_copy (d->affinity, affinity);return ret; }
arch/arm/mm/abort-ev6.S +11 -6
@@ -26,18 +26,23 @@ ENTRY(v6_early_abort) mrc p15, 0, r1, c5, c0, 0 @ get FSR mrc p15, 0, r0, c6, c0, 0 @ get FAR /* - * Faulty SWP instruction on 1136 doesn't set bit 11 in DFSR (erratum 326103). - * The test below covers all the write situations, including Java bytecodes + * Faulty SWP instruction on 1136 doesn't set bit 11 in DFSR. */ - bic r1, r1, #1 << 11 @ clear bit 11 of FSR +#ifdef CONFIG_ARM_ERRATA_326103 + ldr ip, =0x4107b36 + mrc p15, 0, r3, c0, c0, 0 @ get processor id + teq ip, r3, lsr #4 @ r0 ARM1136? + bne do_DataAbort tst r5, #PSR_J_BIT @ Java? + tsteq r5, #PSR_T_BIT @ Thumb? bne do_DataAbort - do_thumb_abort fsr=r1, pc=r4, psr=r5, tmp=r3 - ldreq r3, [r4] @ read aborted ARM instruction + bic r1, r1, #1 << 11 @ clear bit 11 of FSR + ldr r3, [r4] @ read aborted ARM instruction #ifdef CONFIG_CPU_ENDIAN_BE8 - reveq r3, r3 + rev r3, r3 #endif do_ldrd_abort tmp=ip, insn=r3 tst r3, #1 << 20 @ L = 0 -> write orreq r1, r1, #1 << 11 @ yes. +#endif b do_DataAbort
arch/mips/ath79/dev-wmac.c +1 -1
@@ -58,8 +58,8 @@ static void __init ar913x_wmac_setup(void)static int ar933x_wmac_reset (void ) { -ath79_device_reset_clear (AR933X_RESET_WMAC );ath79_device_reset_set (AR933X_RESET_WMAC ); +ath79_device_reset_clear (AR933X_RESET_WMAC );return 0 ; }
arch/powerpc/platforms/85xx/common.c +6 -0
@@ -21,6 +21,12 @@ static struct of_device_id __initdata mpc85xx_common_ids[] = { { .compatible = "fsl,qe", }, { .compatible = "fsl,cpm2", }, { .compatible = "fsl,srio", }, + /* So that the DMA channel nodes can be probed individually: */ + { .compatible = "fsl,eloplus-dma", }, + /* For the PMC driver */ + { .compatible = "fsl,mpc8548-guts", }, + /* Probably unnecessary? */ + { .compatible = "gpio-leds", }, {}, };
arch/powerpc/platforms/85xx/mpc85xx_mds.c +1 -10
@@ -405,12 +405,6 @@ static int __init board_fixups(void)machine_arch_initcall (mpc8568_mds, board_fixups);machine_arch_initcall (mpc8569_mds, board_fixups); -static struct of_device_id mpc85xx_ids[] = { - { .compatible ="fsl,mpc8548-guts" , }, - { .compatible ="gpio-leds" , }, - {}, -}; -static int __init mpc85xx_publish_devices (void ) {if (machine_is (mpc8568_mds))
@@ -418,10 +412,7 @@ static int __init mpc85xx_publish_devices(void)if (machine_is (mpc8569_mds))simple_gpiochip_init ("fsl,mpc8569mds-bcsr-gpio" ); -mpc85xx_common_publish_devices (); -of_platform_bus_probe (NULL , mpc85xx_ids,NULL ); - -return 0 ; +return mpc85xx_common_publish_devices (); }machine_device_initcall (mpc8568_mds, mpc85xx_publish_devices);
arch/powerpc/platforms/85xx/p1022_ds.c +1 -12
@@ -303,18 +303,7 @@ static void __init p1022_ds_setup_arch(void)pr_info ("Freescale P1022 DS reference board\n" ); } -static struct of_device_id __initdata p1022_ds_ids[] = { -/* So that the DMA channel nodes can be probed individually: */ - { .compatible ="fsl,eloplus-dma" , }, - {}, -}; - -static int __init p1022_ds_publish_devices (void ) -{ -mpc85xx_common_publish_devices (); -return of_platform_bus_probe (NULL , p1022_ds_ids,NULL ); -} -machine_device_initcall (p1022_ds, p1022_ds_publish_devices); +machine_device_initcall (p1022_ds, mpc85xx_common_publish_devices);machine_arch_initcall (p1022_ds, swiotlb_setup_bus_notifier);
arch/x86/boot/Makefile +2 -1
@@ -37,7 +37,8 @@ setup-y += video-bios.o targets += $(setup-y) hostprogs-y := mkcpustr tools/build -HOST_EXTRACFLAGS += $(LINUXINCLUDE) +HOST_EXTRACFLAGS += -I$(srctree)/tools/include $(LINUXINCLUDE) \ + -D__EXPORTED_HEADERS__ $(obj)/cpu.o: $(obj)/cpustr.h
arch/x86/boot/compressed/Makefile +1 -0
@@ -22,6 +22,7 @@ LDFLAGS := -m elf_$(UTS_MACHINE) LDFLAGS_vmlinux := -T hostprogs-y := mkpiggy +HOST_EXTRACFLAGS += -I$(srctree)/tools/include VMLINUX_OBJS = $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o \ $(obj)/string.o $(obj)/cmdline.o $(obj)/early_serial_console.o \
arch/x86/boot/compressed/eboot.c +4 -4
@@ -539,7 +539,7 @@ static efi_status_t handle_ramdisks(efi_loaded_image_t *image,struct initrd *initrd;efi_file_handle_t *h;efi_file_info_t *info; -efi_char16_t filename[256 ]; +efi_char16_t filename_16[256 ];unsigned long info_sz;efi_guid_t info_guid =EFI_FILE_INFO_ID ;efi_char16_t *p;
@@ -552,14 +552,14 @@ static efi_status_t handle_ramdisks(efi_loaded_image_t *image, str +=7 ; initrd = &initrds[i]; - p = filename; + p = filename_16;/* Skip any leading slashes */ while (*str =='/' || *str =='\\' ) str++;while (*str && *str !=' ' && *str !='\n' ) { -if (p >= filename +sizeof (filename)) +if ((u8 *)p >= (u8 *)filename_16 +sizeof (filename_16))break ; *p++ = *str++;
@@ -583,7 +583,7 @@ static efi_status_t handle_ramdisks(efi_loaded_image_t *image, goto free_initrds; } - status =efi_call_phys5 (fh->open, fh, &h, filename, + status =efi_call_phys5 (fh->open, fh, &h, filename_16,EFI_FILE_MODE_READ , (u64 )0 );if (status !=EFI_SUCCESS ) goto close_handles;
arch/x86/boot/compressed/head_32.S +11 -3
@@ -33,6 +33,9 @@ __HEAD ENTRY(startup_32) #ifdef CONFIG_EFI_STUB + jmp preferred_addr + + .balign 0x10 /* * We don't need the return address, so set up the stack so * efi_main() can find its arugments.
@@ -41,12 +44,17 @@ ENTRY(startup_32) call efi_main cmpl $0, %eax - je preferred_addr movl %eax, %esi - call 1f + jne 2f 1: + /* EFI init failed, so hang. */ + hlt + jmp 1b +2: + call 3f +3: popl %eax - subl $1b, %eax + subl $3b, %eax subl BP_pref_address(%esi), %eax add BP_code32_start(%esi), %eax leal preferred_addr(%eax), %eax
arch/x86/boot/compressed/head_64.S +16 -6
@@ -200,18 +200,28 @@ ENTRY(startup_64) * entire text+data+bss and hopefully all of memory. */ #ifdef CONFIG_EFI_STUB - pushq %rsi + /* + * The entry point for the PE/COFF executable is 0x210, so only + * legacy boot loaders will execute this jmp. + */ + jmp preferred_addr + + .org 0x210 mov %rcx, %rdi mov %rdx, %rsi call efi_main - popq %rsi - cmpq $0,%rax - je preferred_addr movq %rax,%rsi - call 1f + cmpq $0,%rax + jne 2f 1: + /* EFI init failed, so hang. */ + hlt + jmp 1b +2: + call 3f +3: popq %rax - subq $1b, %rax + subq $3b, %rax subq BP_pref_address(%rsi), %rax add BP_code32_start(%esi), %eax leaq preferred_addr(%rax), %rax
arch/x86/boot/compressed/mkpiggy.c +2 -9
@@ -29,14 +29,7 @@#include <stdio.h> #include <string.h> #include <inttypes.h> - -static uint32_t getle32 (const void *p) -{ -const uint8_t *cp = p; - -return (uint32_t )cp[0 ] + ((uint32_t )cp[1 ] <<8 ) + - ((uint32_t )cp[2 ] <<16 ) + ((uint32_t )cp[3 ] <<24 ); -} +#include <tools/le_byteshift.h> int main (int argc,char *argv[]) {
@@ -69,7 +62,7 @@ int main(int argc, char *argv[]) } ilen =ftell (f); - olen =getle32 (&olen); + olen =get_unaligned_le32 (&olen);fclose (f);/*
arch/x86/boot/tools/build.c +24 -18
95 lines not on this page · raw message
arch/x86/include/asm/x86_init.h +0 -1
@@ -189,6 +189,5 @@ extern struct x86_msi_ops x86_msi;extern void x86_init_noop (void );extern void x86_init_uint_noop (unsigned int unused); -extern void x86_default_fixup_cpu_id (struct cpuinfo_x86 *c,int node);#endif
arch/x86/kernel/apic/apic.c +20 -14
@@ -1632,9 +1632,11 @@ static int __init apic_verify(void) mp_lapic_addr =APIC_DEFAULT_PHYS_BASE ;/* The BIOS may have set up the APIC at some other address */ -rdmsr (MSR_IA32_APICBASE , l, h); -if (l &MSR_IA32_APICBASE_ENABLE ) - mp_lapic_addr = l &MSR_IA32_APICBASE_BASE ; +if (boot_cpu_data.x86 >=6 ) { +rdmsr (MSR_IA32_APICBASE , l, h); +if (l &MSR_IA32_APICBASE_ENABLE ) + mp_lapic_addr = l &MSR_IA32_APICBASE_BASE ; + }pr_info ("Found and enabled local APIC!\n" );return 0 ;
@@ -1652,13 +1654,15 @@ int __init apic_force_enable(unsigned long addr)* MSR. This can only be done in software for Intel P6 or later * and AMD K7 (Model > 1) or later. */ -rdmsr (MSR_IA32_APICBASE , l, h); -if (!(l &MSR_IA32_APICBASE_ENABLE )) { -pr_info ("Local APIC disabled by BIOS -- reenabling.\n" ); - l &= ~MSR_IA32_APICBASE_BASE ; - l |=MSR_IA32_APICBASE_ENABLE | addr; -wrmsr (MSR_IA32_APICBASE , l, h); - enabled_via_apicbase =1 ; +if (boot_cpu_data.x86 >=6 ) { +rdmsr (MSR_IA32_APICBASE , l, h); +if (!(l &MSR_IA32_APICBASE_ENABLE )) { +pr_info ("Local APIC disabled by BIOS -- reenabling.\n" ); + l &= ~MSR_IA32_APICBASE_BASE ; + l |=MSR_IA32_APICBASE_ENABLE | addr; +wrmsr (MSR_IA32_APICBASE , l, h); + enabled_via_apicbase =1 ; + } }return apic_verify (); }
@@ -2204,10 +2208,12 @@ static void lapic_resume(void)* FIXME! This will be wrong if we ever support suspend on * SMP! We'll need to do this as part of the CPU restore! */ -rdmsr (MSR_IA32_APICBASE , l, h); - l &= ~MSR_IA32_APICBASE_BASE ; - l |=MSR_IA32_APICBASE_ENABLE | mp_lapic_addr; -wrmsr (MSR_IA32_APICBASE , l, h); +if (boot_cpu_data.x86 >=6 ) { +rdmsr (MSR_IA32_APICBASE , l, h); + l &= ~MSR_IA32_APICBASE_BASE ; + l |=MSR_IA32_APICBASE_ENABLE | mp_lapic_addr; +wrmsr (MSR_IA32_APICBASE , l, h); + } } maxlvt =lapic_get_maxlvt ();
arch/x86/kernel/apic/apic_numachip.c +5 -2
@@ -201,8 +201,11 @@ static void __init map_csrs(void)static void fixup_cpu_id (struct cpuinfo_x86 *c,int node) { - c->phys_proc_id = node; -per_cpu (cpu_llc_id,smp_processor_id ()) = node; + +if (c->phys_proc_id != node) { + c->phys_proc_id = node; +per_cpu (cpu_llc_id,smp_processor_id ()) = node; + } }static int __init numachip_system_init (void )
arch/x86/kernel/cpu/amd.c +4 -3
@@ -352,10 +352,11 @@ static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c) node =per_cpu (cpu_llc_id, cpu);/* -* If core numbers are inconsistent, it's likely a multi-fabric platform, -* so invoke platform-specific handler +* On multi-fabric platform (e.g. Numascale NumaChip) a +* platform-specific handler needs to be called to fixup some +* IDs of the CPU. */ -if (c->phys_proc_id != node) +if (x86_cpuinit.fixup_cpu_id) x86_cpuinit.fixup_cpu_id (c, node);if (!node_online (node)) {
arch/x86/kernel/cpu/common.c +0 -9
@@ -1163,15 +1163,6 @@ static void dbg_restore_debug_regs(void)#endif /* ! CONFIG_KGDB */ /* -* Prints an error where the NUMA and configured core-number mismatch and the -* platform didn't override this to fix it up -*/ -void __cpuinit x86_default_fixup_cpu_id (struct cpuinfo_x86 *c,int node) -{ -pr_err ("NUMA core number %d differs from configured core number %d\n" , node, c->phys_proc_id); -} - -/* * cpu_init() initializes state that is per-CPU. Some data is already * initialized (naturally) in the bootstrap process, such as the GDT * and IDT. We reload them nevertheless, this function acts as a
arch/x86/kernel/i387.c +1 -0
@@ -154,6 +154,7 @@ int init_fpu(struct task_struct *tsk)if (tsk_used_math (tsk)) {if (HAVE_HWFP && tsk == current)unlazy_fpu (tsk); + tsk->thread.fpu.last_cpu = ~0 ;return 0 ; }
arch/x86/kernel/microcode_amd.c +7 -5
@@ -82,11 +82,6 @@ static int collect_cpu_info_amd(int cpu, struct cpu_signature *csig) {struct cpuinfo_x86 *c = &cpu_data (cpu); -if (c->x86_vendor !=X86_VENDOR_AMD || c->x86 <0x10 ) { -pr_warning ("CPU%d: family %d not supported\n" , cpu, c->x86); -return -1 ; - } - csig->rev = c->microcode;pr_info ("CPU%d: patch_level=0x%08x\n" , cpu, csig->rev);
@@ -380,6 +375,13 @@ static struct microcode_ops microcode_amd_ops = {struct microcode_ops *__init init_amd_microcode (void ) { +struct cpuinfo_x86 *c = &cpu_data (0 ); + +if (c->x86_vendor !=X86_VENDOR_AMD || c->x86 <0x10 ) { +pr_warning ("AMD CPU family 0x%x not supported\n" , c->x86); +return NULL ; + } + patch = (void *)get_zeroed_page (GFP_KERNEL );if (!patch)return NULL ;
arch/x86/kernel/microcode_core.c +4 -6
@@ -418,10 +418,8 @@ static int mc_device_add(struct device *dev, struct subsys_interface *sif)if (err)return err; -if (microcode_init_cpu (cpu) ==UCODE_ERROR ) { -sysfs_remove_group (&dev->kobj, &mc_attr_group); +if (microcode_init_cpu (cpu) ==UCODE_ERROR )return -EINVAL ; - }return err; }
@@ -513,11 +511,11 @@ static int __init microcode_init(void) microcode_ops =init_intel_microcode (); else if (c->x86_vendor == X86_VENDOR_AMD) microcode_ops =init_amd_microcode (); - -if (!microcode_ops) { + else pr_err("no support for this CPU vendor\n"); + +if (!microcode_ops)return -ENODEV ; - } microcode_pdev =platform_device_register_simple ("microcode" ,-1 ,NULL ,0 );
arch/x86/kernel/x86_init.c +0 -1
@@ -92,7 +92,6 @@ struct x86_init_ops x86_init __initdata = {struct x86_cpuinit_ops x86_cpuinit__cpuinitdata = { .setup_percpu_clockev = setup_secondary_APIC_clock, - .fixup_cpu_id = x86_default_fixup_cpu_id, };static void default_nmi_init (void ) { };
arch/x86/xen/smp.c +15 -0
@@ -172,6 +172,7 @@ static void __init xen_fill_possible_map(void)static void __init xen_filter_cpu_maps (void ) {int i, rc; +unsigned int subtract =0 ;if (!xen_initial_domain ())return ;
@@ -186,8 +187,22 @@ static void __init xen_filter_cpu_maps(void) }else {set_cpu_possible (i, false);set_cpu_present (i, false); + subtract++; } } +#ifdef CONFIG_HOTPLUG_CPU +/* This is akin to using 'nr_cpus' on the Linux command line. +* Which is OK as when we use 'dom0_max_vcpus=X' we can only +* have up to X, while nr_cpu_ids is greater than X. This +* normally is not a problem, except when CPU hotplugging +* is involved and then there might be more than X CPUs +* in the guest - which will not work as there is no +* hypercall to expand the max number of VCPUs an already +* running guest has. So cap it up to X. */ +if (subtract) + nr_cpu_ids = nr_cpu_ids - subtract; +#endif + }static void __init xen_smp_prepare_boot_cpu (void )
arch/x86/xen/xen-asm.S +1 -1
@@ -96,7 +96,7 @@ ENTRY(xen_restore_fl_direct) /* check for unmasked and pending */ cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending - jz 1f + jnz 1f 2: call check_events 1: ENDPATCH(xen_restore_fl_direct)
drivers/ata/libata-eh.c +2 -1
@@ -3500,7 +3500,8 @@ static int ata_count_probe_trials_cb(struct ata_ering_entry *ent, void *void_argu64 now =get_jiffies_64 ();int *trials = void_arg; -if (ent->timestamp < now -min (now, interval)) +if ((ent->eflags &ATA_EFLAG_OLD_ER ) || + (ent->timestamp < now -min (now, interval)))return -1 ; (*trials)++;
drivers/crypto/talitos.c +17 -3
@@ -124,6 +124,9 @@ struct talitos_private {void __iomem *reg;int irq[2 ]; +/* SEC global registers lock */ +spinlock_t reg_lock____cacheline_aligned ; +/* SEC version geometry (from device tree node) */ unsigned int num_channels;unsigned int chfifo_len;
@@ -412,6 +415,7 @@ static void talitos_done_##name(unsigned long data) \ { \struct device *dev = (struct device *)data; \struct talitos_private *priv =dev_get_drvdata (dev); \ +unsigned long flags; \ \if (ch_done_mask &1 ) \flush_channel (dev,0 ,0 ,0 ); \
@@ -427,8 +431,10 @@ static void talitos_done_##name(unsigned long data) \ out: \/* At this point, all completed channels have been processed */ \/* Unmask done interrupts for channels completed later on. */ \ +spin_lock_irqsave (&priv->reg_lock, flags); \setbits32 (priv->reg +TALITOS_IMR , ch_done_mask); \setbits32 (priv->reg +TALITOS_IMR_LO ,TALITOS_IMR_LO_INIT ); \ +spin_unlock_irqrestore (&priv->reg_lock, flags); \ } DEF_TALITOS_DONE(4ch, TALITOS_ISR_4CHDONE)DEF_TALITOS_DONE (ch0_2,TALITOS_ISR_CH_0_2_DONE )
@@ -619,22 +625,28 @@ static irqreturn_t talitos_interrupt_##name(int irq, void *data) \struct device *dev = data; \struct talitos_private *priv =dev_get_drvdata (dev); \u32 isr, isr_lo; \ +unsigned long flags; \ \ +spin_lock_irqsave (&priv->reg_lock, flags); \ isr =in_be32 (priv->reg +TALITOS_ISR ); \ isr_lo =in_be32 (priv->reg +TALITOS_ISR_LO ); \/* Acknowledge interrupt */ \out_be32 (priv->reg +TALITOS_ICR , isr & (ch_done_mask | ch_err_mask)); \out_be32 (priv->reg +TALITOS_ICR_LO , isr_lo); \ \ -if (unlikely ((isr & ~TALITOS_ISR_4CHDONE ) & ch_err_mask || isr_lo)) \ -talitos_error (dev, isr, isr_lo); \ -else \ +if (unlikely (isr & ch_err_mask || isr_lo)) { \ +spin_unlock_irqrestore (&priv->reg_lock, flags); \ +talitos_error (dev, isr & ch_err_mask, isr_lo); \ + } \ +else { \if (likely (isr & ch_done_mask)) { \/* mask further done interrupts. */ \clrbits32 (priv->reg +TALITOS_IMR , ch_done_mask); \/* done_task will unmask done interrupts at exit */ \tasklet_schedule (&priv->done_task[tlet]); \ } \ +spin_unlock_irqrestore (&priv->reg_lock, flags); \ + } \ \return (isr & (ch_done_mask | ch_err_mask) || isr_lo) ?IRQ_HANDLED : \IRQ_NONE ; \
@@ -2718,6 +2730,8 @@ static int talitos_probe(struct platform_device *ofdev) priv->ofdev = ofdev; +spin_lock_init (&priv->reg_lock); + err =talitos_probe_irq (ofdev);if (err) goto err_out;
drivers/dma/at_hdmac.c +0 -4
@@ -241,10 +241,6 @@ static void atc_dostart(struct at_dma_chan *atchan, struct at_desc *first)vdbg_dump_regs (atchan); -/* clear any pending interrupt */ -while (dma_readl (atdma,EBCISR )) -cpu_relax (); -channel_writel (atchan,SADDR ,0 );channel_writel (atchan,DADDR ,0 );channel_writel (atchan,CTRLA ,0 );
drivers/firmware/efivars.c +196 -0
214 lines not on this page · raw message
drivers/gpu/drm/i915/i915_gem_execbuffer.c +7 -1
@@ -1082,6 +1082,11 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,return -EINVAL ; } +if (args->num_cliprects >UINT_MAX /sizeof (*cliprects)) { +DRM_DEBUG ("execbuf with %u cliprects\n" , + args->num_cliprects); +return -EINVAL ; + } cliprects =kmalloc (args->num_cliprects *sizeof (*cliprects),GFP_KERNEL );if (cliprects ==NULL ) {
@@ -1353,7 +1358,8 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,struct drm_i915_gem_exec_object2 *exec2_list =NULL ;int ret; -if (args->buffer_count <1 ) { +if (args->buffer_count <1 || + args->buffer_count >UINT_MAX /sizeof (*exec2_list)) {DRM_ERROR ("execbuf2 with %d buffers\n" , args->buffer_count);return -EINVAL ; }
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -523,6 +523,7 @@#define CM0_MASK_SHIFT 16#define CM0_IZ_OPT_DISABLE (1<<6)#define CM0_ZR_OPT_DISABLE (1<<5) +#define CM0_STC_EVICT_DISABLE_LRA_SNB (1<<5)#define CM0_DEPTH_EVICT_DISABLE (1<<4)#define CM0_COLOR_EVICT_DISABLE (1<<3)#define CM0_DEPTH_WRITE_DISABLE (1<<1)
drivers/gpu/drm/i915/intel_ringbuffer.c +8 -0
@@ -417,6 +417,14 @@ static int init_render_ring(struct intel_ring_buffer *ring)if (INTEL_INFO (dev)->gen >=6 ) {I915_WRITE (INSTPM ,INSTPM_FORCE_ORDERING <<16 |INSTPM_FORCE_ORDERING ); + +/* From the Sandybridge PRM, volume 1 part 3, page 24: +* "If this bit is set, STCunit will have LRA as replacement +* policy. [...] This bit must be reset. LRA replacement +* policy is not supported." +*/ +I915_WRITE (CACHE_MODE_0 , +CM0_STC_EVICT_DISABLE_LRA_SNB <<CM0_MASK_SHIFT ); }return ret;
drivers/gpu/drm/i915/intel_sdvo.c +18 -16
@@ -731,6 +731,7 @@ static void intel_sdvo_get_dtd_from_mode(struct intel_sdvo_dtd *dtd,uint16_t width, height;uint16_t h_blank_len, h_sync_len, v_blank_len, v_sync_len;uint16_t h_sync_offset, v_sync_offset; +int mode_clock; width = mode->crtc_hdisplay; height = mode->crtc_vdisplay;
@@ -745,7 +746,11 @@ static void intel_sdvo_get_dtd_from_mode(struct intel_sdvo_dtd *dtd, h_sync_offset = mode->crtc_hsync_start - mode->crtc_hblank_start; v_sync_offset = mode->crtc_vsync_start - mode->crtc_vblank_start; - dtd->part1.clock = mode->clock /10 ; + mode_clock = mode->clock; + mode_clock /=intel_mode_get_pixel_multiplier (mode) ?:1 ; + mode_clock /=10 ; + dtd->part1.clock = mode_clock; + dtd->part1.h_active = width &0xff ; dtd->part1.h_blank = h_blank_len &0xff ; dtd->part1.h_high = (((width >> 8) & 0xf) << 4) |
@@ -997,7 +1002,7 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,struct intel_sdvo *intel_sdvo =to_intel_sdvo (encoder);u32 sdvox;struct intel_sdvo_in_out_map in_out; -struct intel_sdvo_dtd input_dtd; +struct intel_sdvo_dtd input_dtd, output_dtd;int pixel_multiplier =intel_mode_get_pixel_multiplier (adjusted_mode);int rate;
@@ -1022,20 +1027,13 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder, intel_sdvo->attached_output))return ; -/* We have tried to get input timing in mode_fixup, and filled into -* adjusted_mode. -*/ -if (intel_sdvo->is_tv || intel_sdvo->is_lvds) { - input_dtd = intel_sdvo->input_dtd; - }else { -/* Set the output timing to the screen */ -if (!intel_sdvo_set_target_output (intel_sdvo, - intel_sdvo->attached_output)) -return ; - -intel_sdvo_get_dtd_from_mode (&input_dtd, adjusted_mode); - (void )intel_sdvo_set_output_timing (intel_sdvo, &input_dtd); - } +/* lvds has a special fixed output timing. */ +if (intel_sdvo->is_lvds) +intel_sdvo_get_dtd_from_mode (&output_dtd, + intel_sdvo->sdvo_lvds_fixed_mode); +else +intel_sdvo_get_dtd_from_mode (&output_dtd, mode); + (void )intel_sdvo_set_output_timing (intel_sdvo, &output_dtd);/* Set the input timing to the screen. Assume always input 0. */ if (!intel_sdvo_set_target_input (intel_sdvo))
@@ -1053,6 +1051,10 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder, !intel_sdvo_set_tv_format(intel_sdvo))return ; +/* We have tried to get input timing in mode_fixup, and filled into +* adjusted_mode. +*/ +intel_sdvo_get_dtd_from_mode (&input_dtd, adjusted_mode); (void )intel_sdvo_set_input_timing (intel_sdvo, &input_dtd);switch (pixel_multiplier) {
drivers/gpu/drm/nouveau/nouveau_acpi.c +1 -1
@@ -270,7 +270,7 @@ static bool nouveau_dsm_detect(void)struct acpi_buffer buffer = {sizeof (acpi_method_name), acpi_method_name};struct pci_dev *pdev =NULL ;int has_dsm =0 ; -int has_optimus; +int has_optimus =0 ;int vga_count =0 ;bool guid_valid;int retval;
drivers/gpu/drm/radeon/atombios_crtc.c +2 -2
@@ -912,8 +912,8 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_modebreak ; } -if (radeon_encoder->active_device & - (ATOM_DEVICE_LCD_SUPPORT |ATOM_DEVICE_DFP_SUPPORT )) { +if ((radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT |ATOM_DEVICE_DFP_SUPPORT )) || + (radeon_encoder_get_dp_bridge_encoder_id (encoder) !=ENCODER_OBJECT_ID_NONE )) {struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;struct drm_connector *connector =radeon_get_connector_for_encoder (encoder);
drivers/hwmon/coretemp.c +5 -1
@@ -51,7 +51,7 @@ module_param_named(tjmax, force_tjmax, int, 0444);MODULE_PARM_DESC (tjmax,"TjMax value in degrees Celsius" );#define BASE_SYSFS_ATTR_NO 2/* Sysfs Base attr no for coretemp */ -#define NUM_REAL_CORES 16/* Number of Real cores per cpu */ +#define NUM_REAL_CORES 32/* Number of Real cores per cpu */ #define CORETEMP_NAME_LENGTH 17/* String Length of attrs */ #define MAX_CORE_ATTRS 4/* Maximum no of basic attrs */ #define TOTAL_ATTRS (MAX_CORE_ATTRS + 1)
@@ -708,6 +708,10 @@ static void __cpuinit put_core_offline(unsigned int cpu) indx =TO_ATTR_NO (cpu); +/* The core id is too big, just return */ +if (indx >MAX_CORE_DATA -1 ) +return ; +if (pdata->core_data[indx] && pdata->core_data[indx]->cpu == cpu)coretemp_remove_core (pdata, &pdev->dev, indx);
drivers/hwmon/fam15h_power.c +42 -0
54 lines not on this page · raw message
drivers/i2c/busses/i2c-pnx.c +1 -2
@@ -546,8 +546,7 @@ static int i2c_pnx_controller_suspend(struct platform_device *pdev, {struct i2c_pnx_algo_data *alg_data =platform_get_drvdata (pdev); -/* FIXME: shouldn't this be clk_disable? */ -clk_enable (alg_data->clk); +clk_disable (alg_data->clk);return 0 ; }
drivers/input/mouse/synaptics.c +2 -1
@@ -274,7 +274,8 @@ static int synaptics_set_advanced_gesture_mode(struct psmouse *psmouse)static unsigned char param =0xc8 ;struct synaptics_data *priv = psmouse->private; -if (!SYN_CAP_ADV_GESTURE (priv->ext_cap_0c)) +if (!(SYN_CAP_ADV_GESTURE (priv->ext_cap_0c) || +SYN_CAP_IMAGE_SENSOR (priv->ext_cap_0c)))return 0 ;if (psmouse_sliced_command (psmouse,SYN_QUE_MODEL ))
drivers/md/raid5.c +3 -1
@@ -3277,12 +3277,14 @@ static void analyse_stripe(struct stripe_head *sh, struct stripe_head_state *s)/* If there is a failed device being replaced, * we must be recovering. * else if we are after recovery_cp, we must be syncing +* else if MD_RECOVERY_REQUESTED is set, we also are syncing. * else we can only be replacing * sync and recovery both need to read all devices, and so * use the same flag. */ if (do_recovery || - sh->sector >= conf->mddev->recovery_cp) + sh->sector >= conf->mddev->recovery_cp || +test_bit (MD_RECOVERY_REQUESTED , &(conf->mddev->recovery))) s->syncing =1 ;else s->replacing =1 ;
drivers/net/wireless/b43/main.c +8 -2
@@ -4841,8 +4841,14 @@ static int b43_op_start(struct ieee80211_hw *hw) out_mutex_unlock:mutex_unlock (&wl->mutex); -/* reload configuration */ -b43_op_config (hw, ~0 ); +/* +* Configuration may have been overwritten during initialization. +* Reload the configuration, but only if initialization was +* successful. Reloading the configuration after a failed init +* may hang the system. +*/ +if (!err) +b43_op_config (hw, ~0 );return err; }
drivers/net/wireless/ipw2x00/ipw2200.c +12 -1
@@ -2191,6 +2191,7 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd) {int rc =0 ;unsigned long flags; +unsigned long now, end;spin_lock_irqsave (&priv->lock, flags);if (priv->status &STATUS_HCMD_ACTIVE ) {
@@ -2232,10 +2233,20 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd) }spin_unlock_irqrestore (&priv->lock, flags); + now = jiffies; + end = now +HOST_COMPLETE_TIMEOUT ; +again: rc =wait_event_interruptible_timeout (priv->wait_command_queue, !(priv-> status &STATUS_HCMD_ACTIVE ), -HOST_COMPLETE_TIMEOUT ); + end - now); +if (rc <0 ) { + now = jiffies; +if (time_before (now, end)) + goto again; + rc =0 ; + } +if (rc ==0 ) {spin_lock_irqsave (&priv->lock, flags);if (priv->status &STATUS_HCMD_ACTIVE ) {
drivers/net/wireless/iwlwifi/iwl-1000.c +4 -4
@@ -45,8 +45,8 @@#include "iwl-cfg.h" /* Highest firmware API version supported */ -#define IWL1000_UCODE_API_MAX 6 -#define IWL100_UCODE_API_MAX 6 +#define IWL1000_UCODE_API_MAX 5 +#define IWL100_UCODE_API_MAX 5/* Oldest version we won't warn about */ #define IWL1000_UCODE_API_OK 5
@@ -235,5 +235,5 @@ struct iwl_cfg iwl100_bg_cfg = { IWL_DEVICE_100, }; -MODULE_FIRMWARE (IWL1000_MODULE_FIRMWARE (IWL1000_UCODE_API_MAX )); -MODULE_FIRMWARE (IWL100_MODULE_FIRMWARE (IWL100_UCODE_API_MAX)); +MODULE_FIRMWARE (IWL1000_MODULE_FIRMWARE (IWL1000_UCODE_API_OK )); +MODULE_FIRMWARE (IWL100_MODULE_FIRMWARE (IWL100_UCODE_API_OK));
drivers/net/wireless/iwlwifi/iwl-2000.c +8 -8
@@ -51,10 +51,10 @@#define IWL135_UCODE_API_MAX 6/* Oldest version we won't warn about */ -#define IWL2030_UCODE_API_OK 5 -#define IWL2000_UCODE_API_OK 5 -#define IWL105_UCODE_API_OK 5 -#define IWL135_UCODE_API_OK 5 +#define IWL2030_UCODE_API_OK 6 +#define IWL2000_UCODE_API_OK 6 +#define IWL105_UCODE_API_OK 6 +#define IWL135_UCODE_API_OK 6/* Lowest firmware API version supported */ #define IWL2030_UCODE_API_MIN 5
@@ -338,7 +338,7 @@ struct iwl_cfg iwl135_bgn_cfg = { .ht_params = &iwl2000_ht_params, }; -MODULE_FIRMWARE (IWL2000_MODULE_FIRMWARE (IWL2000_UCODE_API_MAX )); -MODULE_FIRMWARE (IWL2030_MODULE_FIRMWARE (IWL2030_UCODE_API_MAX )); -MODULE_FIRMWARE (IWL105_MODULE_FIRMWARE (IWL105_UCODE_API_MAX )); -MODULE_FIRMWARE (IWL135_MODULE_FIRMWARE (IWL135_UCODE_API_MAX )); +MODULE_FIRMWARE (IWL2000_MODULE_FIRMWARE (IWL2000_UCODE_API_OK )); +MODULE_FIRMWARE (IWL2030_MODULE_FIRMWARE (IWL2030_UCODE_API_OK )); +MODULE_FIRMWARE (IWL105_MODULE_FIRMWARE (IWL105_UCODE_API_OK )); +MODULE_FIRMWARE (IWL135_MODULE_FIRMWARE (IWL135_UCODE_API_OK ));
drivers/net/wireless/iwlwifi/iwl-5000.c +9 -2
@@ -50,6 +50,10 @@#define IWL5000_UCODE_API_MAX 5#define IWL5150_UCODE_API_MAX 2 +/* Oldest version we won't warn about */ +#define IWL5000_UCODE_API_OK 5 +#define IWL5150_UCODE_API_OK 2 +/* Lowest firmware API version supported */ #define IWL5000_UCODE_API_MIN 1#define IWL5150_UCODE_API_MIN 1
@@ -359,6 +363,7 @@ static struct iwl_ht_params iwl5000_ht_params = {#define IWL_DEVICE_5000 \ .fw_name_pre = IWL5000_FW_PRE, \ .ucode_api_max = IWL5000_UCODE_API_MAX, \ + .ucode_api_ok = IWL5000_UCODE_API_OK, \ .ucode_api_min = IWL5000_UCODE_API_MIN, \ .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \ .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
@@ -402,6 +407,7 @@ struct iwl_cfg iwl5350_agn_cfg = { .name = "Intel(R) WiMAX/WiFi Link 5350 AGN", .fw_name_pre = IWL5000_FW_PRE, .ucode_api_max = IWL5000_UCODE_API_MAX, + .ucode_api_ok = IWL5000_UCODE_API_OK, .ucode_api_min = IWL5000_UCODE_API_MIN, .eeprom_ver = EEPROM_5050_EEPROM_VERSION, .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
@@ -415,6 +421,7 @@ struct iwl_cfg iwl5350_agn_cfg = {#define IWL_DEVICE_5150 \ .fw_name_pre = IWL5150_FW_PRE, \ .ucode_api_max = IWL5150_UCODE_API_MAX, \ + .ucode_api_ok = IWL5150_UCODE_API_OK, \ .ucode_api_min = IWL5150_UCODE_API_MIN, \ .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \ .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
@@ -436,5 +443,5 @@ struct iwl_cfg iwl5150_abg_cfg = { IWL_DEVICE_5150, }; -MODULE_FIRMWARE (IWL5000_MODULE_FIRMWARE (IWL5000_UCODE_API_MAX )); -MODULE_FIRMWARE (IWL5150_MODULE_FIRMWARE (IWL5150_UCODE_API_MAX)); +MODULE_FIRMWARE (IWL5000_MODULE_FIRMWARE (IWL5000_UCODE_API_OK )); +MODULE_FIRMWARE (IWL5150_MODULE_FIRMWARE (IWL5150_UCODE_API_OK));
drivers/net/wireless/iwlwifi/iwl-6000.c +6 -4
@@ -53,6 +53,8 @@/* Oldest version we won't warn about */ #define IWL6000_UCODE_API_OK 4#define IWL6000G2_UCODE_API_OK 5 +#define IWL6050_UCODE_API_OK 5 +#define IWL6000G2B_UCODE_API_OK 6/* Lowest firmware API version supported */ #define IWL6000_UCODE_API_MIN 4
@@ -389,7 +391,7 @@ struct iwl_cfg iwl6005_2agn_d_cfg = {#define IWL_DEVICE_6030 \ .fw_name_pre = IWL6030_FW_PRE, \ .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ - .ucode_api_ok = IWL6000G2_UCODE_API_OK, \ + .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \ .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \ .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
@@ -548,6 +550,6 @@ struct iwl_cfg iwl6000_3agn_cfg = { };MODULE_FIRMWARE (IWL6000_MODULE_FIRMWARE (IWL6000_UCODE_API_OK )); -MODULE_FIRMWARE (IWL6050_MODULE_FIRMWARE (IWL6050_UCODE_API_MAX )); -MODULE_FIRMWARE (IWL6005_MODULE_FIRMWARE (IWL6000G2_UCODE_API_MAX )); -MODULE_FIRMWARE (IWL6030_MODULE_FIRMWARE (IWL6000G2_UCODE_API_MAX )); +MODULE_FIRMWARE (IWL6050_MODULE_FIRMWARE (IWL6050_UCODE_API_OK )); +MODULE_FIRMWARE (IWL6005_MODULE_FIRMWARE (IWL6000G2_UCODE_API_OK )); +MODULE_FIRMWARE (IWL6030_MODULE_FIRMWARE (IWL6000G2B_UCODE_API_OK ));
drivers/net/wireless/iwlwifi/iwl-agn.c +0 -3
@@ -1403,7 +1403,6 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work)void iwlagn_prepare_restart (struct iwl_priv *priv) { -struct iwl_rxon_context *ctx;bool bt_full_concurrent;u8 bt_ci_compliance;u8 bt_load;
@@ -1412,8 +1411,6 @@ void iwlagn_prepare_restart(struct iwl_priv *priv)lockdep_assert_held (&priv->shrd->mutex); -for_each_context (priv, ctx) - ctx->vif =NULL ; priv->is_open =0 ;/*
drivers/net/wireless/iwlwifi/iwl-fh.h +19 -5
@@ -104,15 +104,29 @@* (see struct iwl_tfd_frame). These 16 pointer registers are offset by 0x04 * bytes from one another. Each TFD circular buffer in DRAM must be 256-byte * aligned (address bits 0-7 must be 0). +* Later devices have 20 (5000 series) or 30 (higher) queues, but the registers +* for them are in different places. * * Bit fields in each pointer register: * 27-0: TFD CB physical base address [35:8], must be 256-byte aligned */ -#define FH_MEM_CBBC_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0) -#define FH_MEM_CBBC_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xA10) - -/* Find TFD CB base pointer for given queue (range 0-15). */ -#define FH_MEM_CBBC_QUEUE (x) (FH_MEM_CBBC_LOWER_BOUND + (x) * 0x4) +#define FH_MEM_CBBC_0_15_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0) +#define FH_MEM_CBBC_0_15_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xA10) +#define FH_MEM_CBBC_16_19_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xBF0) +#define FH_MEM_CBBC_16_19_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xC00) +#define FH_MEM_CBBC_20_31_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xB20) +#define FH_MEM_CBBC_20_31_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xB80) + +/* Find TFD CB base pointer for given queue */ +static inline unsigned int FH_MEM_CBBC_QUEUE (unsigned int chnl) +{ +if (chnl <16 ) +return FH_MEM_CBBC_0_15_LOWER_BOUND +4 * chnl; +if (chnl <20 ) +return FH_MEM_CBBC_16_19_LOWER_BOUND +4 * (chnl -16 ); +WARN_ON_ONCE (chnl >=32 ); +return FH_MEM_CBBC_20_31_LOWER_BOUND +4 * (chnl -20 ); +}/**
drivers/net/wireless/iwlwifi/iwl-mac80211.c +9 -1
@@ -1226,6 +1226,7 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw,struct iwl_rxon_context *tmp, *ctx =NULL ;int err;enum nl80211_iftype viftype =ieee80211_vif_type_p2p (vif); +bool reset = false;IWL_DEBUG_MAC80211 (priv,"enter: type %d, addr %pM\n" , viftype, vif->addr);
@@ -1247,6 +1248,13 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw, tmp->interface_modes | tmp->exclusive_interface_modes;if (tmp->vif) { +/* On reset we need to add the same interface again */ +if (tmp->vif == vif) { + reset = true; + ctx = tmp; +break ; + } +/* check if this busy context is exclusive */ if (tmp->exclusive_interface_modes &BIT (tmp->vif->type)) {
@@ -1273,7 +1281,7 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw, ctx->vif = vif; err =iwl_setup_interface (priv, ctx); -if (!err) +if (!err || reset) goto out; ctx->vif =NULL ;
drivers/net/wireless/iwlwifi/iwl-prph.h +24 -3
@@ -227,12 +227,33 @@#define SCD_AIT (SCD_BASE + 0x0c)#define SCD_TXFACT (SCD_BASE + 0x10)#define SCD_ACTIVE (SCD_BASE + 0x14) -#define SCD_QUEUE_WRPTR (x) (SCD_BASE + 0x18 + (x) * 4) -#define SCD_QUEUE_RDPTR (x) (SCD_BASE + 0x68 + (x) * 4)#define SCD_QUEUECHAIN_SEL (SCD_BASE + 0xe8)#define SCD_AGGR_SEL (SCD_BASE + 0x248)#define SCD_INTERRUPT_MASK (SCD_BASE + 0x108) -#define SCD_QUEUE_STATUS_BITS (x) (SCD_BASE + 0x10c + (x) * 4) + +static inline unsigned int SCD_QUEUE_WRPTR (unsigned int chnl) +{ +if (chnl <20 ) +return SCD_BASE +0x18 + chnl *4 ; +WARN_ON_ONCE (chnl >=32 ); +return SCD_BASE +0x284 + (chnl -20 ) *4 ; +} + +static inline unsigned int SCD_QUEUE_RDPTR (unsigned int chnl) +{ +if (chnl <20 ) +return SCD_BASE +0x68 + chnl *4 ; +WARN_ON_ONCE (chnl >=32 ); +return SCD_BASE +0x2B4 + (chnl -20 ) *4 ; +} + +static inline unsigned int SCD_QUEUE_STATUS_BITS (unsigned int chnl) +{ +if (chnl <20 ) +return SCD_BASE +0x10c + chnl *4 ; +WARN_ON_ONCE (chnl >=32 ); +return SCD_BASE +0x384 + (chnl -20 ) *4 ; +}/*********************** END TX SCHEDULER *************************************/
drivers/net/wireless/rtlwifi/pci.c +1 -0
@@ -1955,6 +1955,7 @@ void rtl_pci_disconnect(struct pci_dev *pdev)rtl_deinit_deferred_work (hw); rtlpriv->intf_ops->adapter_stop (hw); } + rtlpriv->cfg->ops->disable_interrupt (hw);/*deinit rfkill */ rtl_deinit_rfkill (hw);
drivers/net/wireless/wl1251/main.c +1 -0
@@ -479,6 +479,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw)cancel_work_sync (&wl->irq_work);cancel_work_sync (&wl->tx_work);cancel_work_sync (&wl->filter_work); +cancel_delayed_work_sync (&wl->elp_work);mutex_lock (&wl->mutex);
drivers/net/wireless/wl1251/sdio.c +1 -1
@@ -315,8 +315,8 @@ static void __devexit wl1251_sdio_remove(struct sdio_func *func)if (wl->irq)free_irq (wl->irq, wl); -kfree (wl_sdio);wl1251_free_hw (wl); +kfree (wl_sdio);sdio_claim_host (func);sdio_release_irq (func);
drivers/platform/x86/dell-laptop.c +1 -0
@@ -211,6 +211,7 @@ static struct dmi_system_id __devinitdata dell_quirks[] = { }, .driver_data = &quirk_dell_vostro_v130, }, + { } };static struct calling_interface_buffer *buffer;
drivers/scsi/libsas/sas_expander.c +20 -6
@@ -192,7 +192,14 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, phy->attached_sata_ps = dr->attached_sata_ps; phy->attached_iproto = dr->iproto <<1 ; phy->attached_tproto = dr->tproto <<1 ; -memcpy (phy->attached_sas_addr, dr->attached_sas_addr,SAS_ADDR_SIZE ); +/* help some expanders that fail to zero sas_address in the 'no +* device' case +*/ +if (phy->attached_dev_type ==NO_DEVICE || + phy->linkrate <SAS_LINK_RATE_1_5_GBPS ) +memset (phy->attached_sas_addr,0 ,SAS_ADDR_SIZE ); +else +memcpy (phy->attached_sas_addr, dr->attached_sas_addr,SAS_ADDR_SIZE ); phy->attached_phy_id = dr->attached_phy_id; phy->phy_change_count = dr->change_count; phy->routing_attr = dr->routing_attr;
@@ -1643,9 +1650,17 @@ static int sas_find_bcast_phy(struct domain_device *dev, int *phy_id,int phy_change_count =0 ; res =sas_get_phy_change_count (dev, i, &phy_change_count); -if (res) - goto out; -else if (phy_change_count != ex->ex_phy[i].phy_change_count) { +switch (res) { +case SMP_RESP_PHY_VACANT : +case SMP_RESP_NO_PHY : +continue ; +case SMP_RESP_FUNC_ACC : +break ; +default : +return res; + } + +if (phy_change_count != ex->ex_phy[i].phy_change_count) {if (update) ex->ex_phy[i].phy_change_count = phy_change_count;
@@ -1653,8 +1668,7 @@ static int sas_find_bcast_phy(struct domain_device *dev, int *phy_id,return 0 ; } } -out: -return res; +return 0 ; }static int sas_get_ex_change_count (struct domain_device *dev,int *ecc)
drivers/usb/class/cdc-wdm.c +5 -2
@@ -108,8 +108,9 @@ static void wdm_out_callback(struct urb *urb)spin_lock (&desc->iuspin); desc->werr = urb->status;spin_unlock (&desc->iuspin); -clear_bit (WDM_IN_USE , &desc->flags);kfree (desc->outbuf); + desc->outbuf =NULL ; +clear_bit (WDM_IN_USE , &desc->flags);wake_up (&desc->wait); }
@@ -312,7 +313,7 @@ static ssize_t wdm_writeif (we <0 )return -EIO ; - desc->outbuf = buf =kmalloc (count,GFP_KERNEL ); + buf =kmalloc (count,GFP_KERNEL );if (!buf) { rv = -ENOMEM ; goto outnl;
@@ -376,10 +377,12 @@ static ssize_t wdm_write req->wIndex = desc->inum; req->wLength =cpu_to_le16 (count);set_bit (WDM_IN_USE , &desc->flags); + desc->outbuf = buf; rv =usb_submit_urb (desc->command,GFP_KERNEL );if (rv <0 ) {kfree (buf); + desc->outbuf =NULL ;clear_bit (WDM_IN_USE , &desc->flags);dev_err (&desc->intf->dev,"Tx URB error: %d\n" , rv); }else {
drivers/usb/core/hcd-pci.c +9 -0
@@ -491,6 +491,15 @@ static int hcd_pci_suspend_noirq(struct device *dev)pci_save_state (pci_dev); +/* +* Some systems crash if an EHCI controller is in D3 during +* a sleep transition. We have to leave such controllers in D0. +*/ +if (hcd->broken_pci_sleep) { +dev_dbg (dev,"Staying in PCI D0\n" ); +return retval; + } +/* If the root hub is dead rather than suspended, disallow remote * wakeup. usb_hc_died() should ensure that both hosts are marked as * dying, so we only need to check the primary roothub.
drivers/usb/gadget/dummy_hcd.c +0 -1
@@ -924,7 +924,6 @@ static int dummy_udc_stop(struct usb_gadget *g, dum->driver =NULL ; -dummy_pullup (&dum->gadget,0 );return 0 ; }
drivers/usb/gadget/f_mass_storage.c +1 -1
@@ -2190,7 +2190,7 @@ unknown_cmnd: common->data_size_from_cmnd =0 ;sprintf (unknown,"Unknown x%02x" , common->cmnd[0 ]); reply =check_command (common, common->cmnd_size, -DATA_DIR_UNKNOWN ,0xff ,0 , unknown); +DATA_DIR_UNKNOWN , ~0 ,0 , unknown);if (reply ==0 ) { common->curlun->sense_data =SS_INVALID_COMMAND ; reply = -EINVAL ;
drivers/usb/gadget/file_storage.c +1 -1
@@ -2579,7 +2579,7 @@ static int do_scsi_command(struct fsg_dev *fsg) fsg->data_size_from_cmnd =0 ;sprintf (unknown,"Unknown x%02x" , fsg->cmnd[0 ]);if ((reply =check_command (fsg, fsg->cmnd_size, -DATA_DIR_UNKNOWN ,0xff ,0 , unknown)) ==0 ) { +DATA_DIR_UNKNOWN , ~0 ,0 , unknown)) ==0 ) { fsg->curlun->sense_data =SS_INVALID_COMMAND ; reply = -EINVAL ; }
drivers/usb/gadget/uvc.h +1 -1
@@ -28,7 +28,7 @@struct uvc_request_data { -unsigned int length; +__s32 length;__u8 data[60 ]; };
drivers/usb/gadget/uvc_v4l2.c +1 -1
@@ -39,7 +39,7 @@ uvc_send_response(struct uvc_device *uvc, struct uvc_request_data *data)if (data->length <0 )return usb_ep_set_halt (cdev->gadget->ep0); - req->length =min (uvc->event_length, data->length); + req->length = min_t(unsigned int, uvc->event_length, data->length); req->zero = data->length < uvc->event_length; req->dma =DMA_ADDR_INVALID ;
drivers/usb/host/ehci-pci.c +8 -0
@@ -144,6 +144,14 @@ static int ehci_pci_setup(struct usb_hcd *hcd) hcd->has_tt =1 ;tdi_reset (ehci); } +if (pdev->subsystem_vendor ==PCI_VENDOR_ID_ASUSTEK ) { +/* EHCI #1 or #2 on 6 Series/C200 Series chipset */ +if (pdev->device ==0x1c26 || pdev->device ==0x1c2d ) { +ehci_info (ehci,"broken D3 during system sleep on ASUS\n" ); + hcd->broken_pci_sleep =1 ; +device_set_wakeup_capable (&pdev->dev, false); + } + }break ;case PCI_VENDOR_ID_TDI :if (pdev->device ==PCI_DEVICE_ID_TDI_EHCI ) {
drivers/usb/host/ehci-tegra.c +0 -1
@@ -601,7 +601,6 @@ static int setup_vbus_gpio(struct platform_device *pdev)dev_err (&pdev->dev,"can't enable vbus\n" );return err; } -gpio_set_value (gpio,1 );return err; }
fs/autofs4/autofs_i.h +11 -1
@@ -110,7 +110,6 @@ struct autofs_sb_info {int sub_version;int min_proto;int max_proto; -int compat_daemon;unsigned long exp_timeout;unsigned int type;int reghost_enabled;
@@ -270,6 +269,17 @@ int autofs4_fill_super(struct super_block *, void *, int);struct autofs_info *autofs4_new_ino (struct autofs_sb_info *);void autofs4_clean_ino (struct autofs_info *); +static inline int autofs_prepare_pipe (struct file *pipe) +{ +if (!pipe->f_op || !pipe->f_op->write) +return -EINVAL ; +if (!S_ISFIFO (pipe->f_dentry->d_inode->i_mode)) +return -EINVAL ; +/* We want a packet pipe */ + pipe->f_flags |=O_DIRECT ; +return 0 ; +} +/* Queue management functions */ int autofs4_wait (struct autofs_sb_info *,struct dentry *,enum autofs_notify );
fs/autofs4/dev-ioctl.c +1 -2
@@ -376,7 +376,7 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp, err = -EBADF ; goto out; } -if (!pipe->f_op || !pipe->f_op->write) { +if (autofs_prepare_pipe (pipe) <0 ) { err = -EPIPE ;fput (pipe); goto out;
@@ -385,7 +385,6 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp, sbi->pipefd = pipefd; sbi->pipe = pipe; sbi->catatonic =0 ; - sbi->compat_daemon =is_compat_task (); } out:mutex_unlock (&sbi->wq_mutex);
fs/autofs4/inode.c +1 -3
@@ -19,7 +19,6 @@#include <linux/parser.h> #include <linux/bitops.h> #include <linux/magic.h> -#include <linux/compat.h> #include "autofs_i.h" #include <linux/module.h>
@@ -225,7 +224,6 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)set_autofs_type_indirect (&sbi->type); sbi->min_proto =0 ; sbi->max_proto =0 ; - sbi->compat_daemon =is_compat_task ();mutex_init (&sbi->wq_mutex);mutex_init (&sbi->pipe_mutex);spin_lock_init (&sbi->fs_lock);
@@ -295,7 +293,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)printk ("autofs: could not open pipe file descriptor\n" ); goto fail_dput; } -if (!pipe->f_op || !pipe->f_op->write) +if (autofs_prepare_pipe (pipe) <0 ) goto fail_fput; sbi->pipe = pipe; sbi->pipefd = pipefd;
fs/autofs4/waitq.c +2 -18
@@ -92,23 +92,6 @@ static int autofs4_write(struct autofs_sb_info *sbi,return (bytes >0 ); } -/* -* The autofs_v5 packet was misdesigned. -* -* The packets are identical on x86-32 and x86-64, but have different -* alignment. Which means that 'sizeof()' will give different results. -* Fix it up for the case of running 32-bit user mode on a 64-bit kernel. -*/ -static noinline size_t autofs_v5_packet_size(struct autofs_sb_info *sbi) -{ -size_t pktsz =sizeof (struct autofs_v5_packet ); -#if defined(CONFIG_X86_64 ) && defined(CONFIG_COMPAT ) -if (sbi->compat_daemon >0 ) - pktsz -=4 ; -#endif -return pktsz; -} -static void autofs4_notify_daemon (struct autofs_sb_info *sbi,struct autofs_wait_queue *wq,int type)
@@ -172,7 +155,8 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi, {struct autofs_v5_packet *packet = &pkt.v5_pkt.v5_packet; - pktsz =autofs_v5_packet_size (sbi); + pktsz =sizeof (*packet); + packet->wait_queue_token = wq->wait_queue_token; packet->len = wq->name.len;memcpy (packet->name, wq->name.name, wq->name.len);
fs/exec.c +3 -0
@@ -975,6 +975,9 @@ static int de_thread(struct task_struct *tsk) sig->notify_count =0 ; no_thread_group: +/* we have changed execution domain */ + tsk->exit_signal =SIGCHLD ; +if (current->mm)setmax_mm_hiwater_rss (&sig->maxrss, current->mm);
fs/hfsplus/catalog.c +4 -0
@@ -366,6 +366,10 @@ int hfsplus_rename_cat(u32 cnid, err =hfs_brec_find (&src_fd);if (err) goto out; +if (src_fd.entrylength >sizeof (entry) || src_fd.entrylength <0 ) { + err = -EIO ; + goto out; + }hfs_bnode_read (src_fd.bnode, &entry, src_fd.entryoffset, src_fd.entrylength);
fs/hfsplus/dir.c +11 -0
@@ -150,6 +150,11 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir) filp->f_pos++;/* fall through */ case 1 : +if (fd.entrylength >sizeof (entry) || fd.entrylength <0 ) { + err = -EIO ; + goto out; + } +hfs_bnode_read (fd.bnode, &entry, fd.entryoffset, fd.entrylength);if (be16_to_cpu (entry.type) !=HFSPLUS_FOLDER_THREAD ) {
@@ -181,6 +186,12 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir) err = -EIO ; goto out; } + +if (fd.entrylength >sizeof (entry) || fd.entrylength <0 ) { + err = -EIO ; + goto out; + } +hfs_bnode_read (fd.bnode, &entry, fd.entryoffset, fd.entrylength); type =be16_to_cpu (entry.type);
fs/nfs/nfs4proc.c +21 -2
@@ -4460,7 +4460,9 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *fstatic int nfs4_lock_reclaim (struct nfs4_state *state,struct file_lock *request) {struct nfs_server *server =NFS_SERVER (state->inode); -struct nfs4_exception exception = { }; +struct nfs4_exception exception = { + .inode = state->inode, + };int err; do {
@@ -4478,7 +4480,9 @@ static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *requeststatic int nfs4_lock_expired (struct nfs4_state *state,struct file_lock *request) {struct nfs_server *server =NFS_SERVER (state->inode); -struct nfs4_exception exception = { }; +struct nfs4_exception exception = { + .inode = state->inode, + };int err; err =nfs4_set_lock_state (state, request);
@@ -4558,6 +4562,7 @@ static int nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock * {struct nfs4_exception exception = { .state = state, + .inode = state->inode, };int err;
@@ -4603,6 +4608,20 @@ nfs4_proc_lock(struct file *filp, int cmd, struct file_lock *request)if (state ==NULL )return -ENOLCK ; +/* +* Don't rely on the VFS having checked the file open mode, +* since it won't do this for flock() locks. +*/ +switch (request->fl_type & (F_RDLCK |F_WRLCK |F_UNLCK )) { +case F_RDLCK : +if (!(filp->f_mode &FMODE_READ )) +return -EBADF ; +break ; +case F_WRLCK : +if (!(filp->f_mode &FMODE_WRITE )) +return -EBADF ; + } + do { status = nfs4_proc_setlk(state, cmd, request); if ((status != -EAGAIN) || IS_SETLK(cmd))
fs/nfs/read.c +1 -1
@@ -324,7 +324,7 @@ out_bad:while (!list_empty (res)) { data = list_entry(res->next, struct nfs_read_data, list);list_del (&data->list); -nfs_readdata_free (data); +nfs_readdata_release (data); }nfs_readpage_release (req);return -ENOMEM ;
fs/nfs/super.c +6 -2
@@ -2707,11 +2707,15 @@ static struct vfsmount *nfs_do_root_mount(struct file_system_type *fs_type,char *root_devname;size_t len; - len =strlen (hostname) +3 ; + len =strlen (hostname) +5 ; root_devname =kmalloc (len,GFP_KERNEL );if (root_devname ==NULL )return ERR_PTR (-ENOMEM ); -snprintf (root_devname, len,"%s:/" , hostname); +/* Does hostname needs to be enclosed in brackets? */ +if (strchr (hostname,':' )) +snprintf (root_devname, len,"[%s]:/" , hostname); +else +snprintf (root_devname, len,"%s:/" , hostname); root_mnt =vfs_kern_mount (fs_type, flags, root_devname, data);kfree (root_devname);return root_mnt;
fs/nfs/write.c +1 -1
@@ -974,7 +974,7 @@ out_bad:while (!list_empty (res)) { data = list_entry(res->next, struct nfs_write_data, list);list_del (&data->list); -nfs_writedata_free (data); +nfs_writedata_release (data); }nfs_redirty_request (req);return -ENOMEM ;
fs/pipe.c +29 -2
@@ -345,6 +345,16 @@ static const struct pipe_buf_operations anon_pipe_buf_ops = { .get = generic_pipe_buf_get, }; +static const struct pipe_buf_operations packet_pipe_buf_ops = { + .can_merge =0 , + .map = generic_pipe_buf_map, + .unmap = generic_pipe_buf_unmap, + .confirm = generic_pipe_buf_confirm, + .release = anon_pipe_buf_release, + .steal = generic_pipe_buf_steal, + .get = generic_pipe_buf_get, +}; +static ssize_t pipe_read (struct kiocb *iocb,const struct iovec *_iov,unsigned long nr_segs,loff_t pos)
@@ -406,6 +416,13 @@ redo: ret += chars; buf->offset += chars; buf->len -= chars; + +/* Was it a packet buffer? Clean up and exit */ +if (buf->flags &PIPE_BUF_FLAG_PACKET ) { + total_len = chars; + buf->len =0 ; + } +if (!buf->len) { buf->ops =NULL ; ops->release (pipe, buf);
@@ -458,6 +475,11 @@ redo:return ret; } +static inline int is_packetized (struct file *file) +{ +return (file->f_flags &O_DIRECT ) !=0 ; +} +static ssize_t pipe_write (struct kiocb *iocb,const struct iovec *_iov,unsigned long nr_segs,loff_t ppos)
@@ -592,6 +614,11 @@ redo2: buf->ops = &anon_pipe_buf_ops; buf->offset =0 ; buf->len = chars; + buf->flags =0 ; +if (is_packetized (filp)) { + buf->ops = &packet_pipe_buf_ops; + buf->flags =PIPE_BUF_FLAG_PACKET ; + } pipe->nrbufs = ++bufs; pipe->tmp_page =NULL ;
@@ -1012,7 +1039,7 @@ struct file *create_write_pipe(int flags) goto err_dentry; f->f_mapping = inode->i_mapping; - f->f_flags =O_WRONLY | (flags &O_NONBLOCK ); + f->f_flags =O_WRONLY | (flags & (O_NONBLOCK |O_DIRECT )); f->f_version =0 ;return f;
@@ -1056,7 +1083,7 @@ int do_pipe_flags(int *fd, int flags)int error;int fdw, fdr; -if (flags & ~(O_CLOEXEC |O_NONBLOCK )) +if (flags & ~(O_CLOEXEC |O_NONBLOCK |O_DIRECT ))return -EINVAL ; fw =create_write_pipe (flags);
include/linux/efi.h +12 -1
@@ -510,7 +510,18 @@ extern int __init efi_setup_pcdp_console(char *);#define EFI_VARIABLE_NON_VOLATILE 0x0000000000000001#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002#define EFI_VARIABLE_RUNTIME_ACCESS 0x0000000000000004 - +#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x0000000000000008 +#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x0000000000000010 +#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x0000000000000020 +#define EFI_VARIABLE_APPEND_WRITE 0x0000000000000040 + +#define EFI_VARIABLE_MASK (EFI_VARIABLE_NON_VOLATILE | \ + EFI_VARIABLE_BOOTSERVICE_ACCESS | \ + EFI_VARIABLE_RUNTIME_ACCESS | \ + EFI_VARIABLE_HARDWARE_ERROR_RECORD | \ + EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS | \ + EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | \ + EFI_VARIABLE_APPEND_WRITE)/* * The type of search to perform when calling boottime->locate_handle */
include/linux/pipe_fs_i.h +1 -0
@@ -8,6 +8,7 @@#define PIPE_BUF_FLAG_LRU 0x01/* page is on the LRU */ #define PIPE_BUF_FLAG_ATOMIC 0x02/* was atomically mapped */ #define PIPE_BUF_FLAG_GIFT 0x04/* page is a gift */ +#define PIPE_BUF_FLAG_PACKET 0x08/* read() as a packet */ /** * struct pipe_buffer - a linux kernel pipe buffer
include/linux/usb/hcd.h +2 -0
@@ -126,6 +126,8 @@ struct usb_hcd { unsigned wireless:1; /* Wireless USB HCD */ unsigned authorized_default:1; unsigned has_tt:1; /* Integrated TT in root hub */ + unsigned broken_pci_sleep:1; /* Don't put the +controller in PCI-D3 for system sleep */ int irq;/* irq allocated */ void __iomem *regs;/* device memory/io */
kernel/exit.c +0 -19
@@ -818,25 +818,6 @@ static void exit_notify(struct task_struct *tsk, int group_dead)if (group_dead)kill_orphaned_pgrp (tsk->group_leader,NULL ); -/* Let father know we died -* -* Thread signals are configurable, but you aren't going to use -* that to send signals to arbitrary processes. -* That stops right now. -* -* If the parent exec id doesn't match the exec id we saved -* when we started then we know the parent has changed security -* domain. -* -* If our self_exec id doesn't match our parent_exec_id then -* we have changed execution domain as these two values started -* the same after a fork. -*/ -if (thread_group_leader (tsk) && tsk->exit_signal !=SIGCHLD && - (tsk->parent_exec_id != tsk->real_parent->self_exec_id || - tsk->self_exec_id != tsk->parent_exec_id)) - tsk->exit_signal =SIGCHLD ; -if (unlikely (tsk->ptrace)) {int sig =thread_group_leader (tsk) && thread_group_empty(tsk) &&
kernel/power/swap.c +22 -6
@@ -51,6 +51,23 @@#define MAP_PAGE_ENTRIES (PAGE_SIZE / sizeof(sector_t) - 1) +/* +* Number of free pages that are not high. +*/ +static inline unsigned long low_free_pages (void ) +{ +return nr_free_pages () -nr_free_highpages (); +} + +/* +* Number of pages required to be kept free while writing the image. Always +* half of all available low pages before the writing starts. +*/ +static inline unsigned long reqd_free_pages (void ) +{ +return low_free_pages () /2 ; +} +struct swap_map_page {sector_t entries[MAP_PAGE_ENTRIES ];sector_t next_swap;
@@ -72,7 +89,7 @@ struct swap_map_handle {sector_t cur_swap;sector_t first_sector;unsigned int k; -unsigned long nr_free_pages, written; +unsigned long reqd_free_pages;u32 crc32; };
@@ -316,8 +333,7 @@ static int get_swap_writer(struct swap_map_handle *handle) goto err_rel; } handle->k =0 ; - handle->nr_free_pages =nr_free_pages () >>1 ; - handle->written =0 ; + handle->reqd_free_pages =reqd_free_pages (); handle->first_sector = handle->cur_swap;return 0 ; err_rel:
@@ -352,11 +368,11 @@ static int swap_write_page(struct swap_map_handle *handle, void *buf, handle->cur_swap = offset; handle->k =0 ; } -if (bio_chain && ++handle->written > handle->nr_free_pages) { +if (bio_chain &&low_free_pages () <= handle->reqd_free_pages) { error =hib_wait_on_bio_chain (bio_chain);if (error) goto out; - handle->written =0 ; + handle->reqd_free_pages =reqd_free_pages (); } out:return error;
@@ -618,7 +634,7 @@ static int save_image_lzo(struct swap_map_handle *handle,* Adjust number of free pages after all allocations have been done. * We don't want to run out of pages when writing. */ - handle->nr_free_pages =nr_free_pages () >>1 ; + handle->reqd_free_pages =reqd_free_pages ();/* * Start the CRC32 thread.
kernel/sched/core.c +42 -33
123 lines not on this page · raw message
kernel/signal.c +9 -0
@@ -1642,6 +1642,15 @@ bool do_notify_parent(struct task_struct *tsk, int sig)BUG_ON (!tsk->ptrace && (tsk->group_leader != tsk || !thread_group_empty (tsk))); +if (sig !=SIGCHLD ) { +/* +* This is only possible if parent == real_parent. +* Check if it has changed security domain. +*/ +if (tsk->parent_exec_id != tsk->parent->self_exec_id) + sig =SIGCHLD ; + } + info.si_signo = sig; info.si_errno =0 ;/*
kernel/trace/trace_output.c +5 -0
@@ -650,6 +650,8 @@ int trace_print_lat_context(struct trace_iterator *iter) {u64 next_ts;int ret; +/* trace_find_next_entry will reset ent_size */ +int ent_size = iter->ent_size;struct trace_seq *s = &iter->seq;struct trace_entry *entry = iter->ent, *next_entry = trace_find_next_entry(iter, NULL,
@@ -658,6 +660,9 @@ int trace_print_lat_context(struct trace_iterator *iter)unsigned long abs_usecs =ns2usecs (iter->ts - iter->tr->time_start);unsigned long rel_usecs; +/* Restore the original ent_size */ + iter->ent_size = ent_size; +if (!next_entry) next_ts = iter->ts; rel_usecs =ns2usecs (next_ts - iter->ts);
net/mac80211/tx.c +2 -1
@@ -1144,7 +1144,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata, tx->sta =rcu_dereference (sdata->u.vlan.sta);if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr)return TX_DROP ; - }else if (info->flags &IEEE80211_TX_CTL_INJECTED ) { + }else if (info->flags &IEEE80211_TX_CTL_INJECTED || + tx->sdata->control_port_protocol == tx->skb->protocol) { tx->sta =sta_info_get_bss (sdata, hdr->addr1); }if (!tx->sta)
net/wireless/nl80211.c +17 -12
@@ -1293,6 +1293,11 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) goto bad_res; } +if (!netif_running (netdev)) { + result = -ENETDOWN ; + goto bad_res; + } +nla_for_each_nested (nl_txq_params, info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS ], rem_txq_params) {
@@ -6262,7 +6267,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_get_key, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -6294,7 +6299,7 @@ static struct genl_ops nl80211_ops[] = { .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, .doit = nl80211_addset_beacon, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -6302,7 +6307,7 @@ static struct genl_ops nl80211_ops[] = { .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, .doit = nl80211_addset_beacon, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -6326,7 +6331,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_set_station, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -6342,7 +6347,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_del_station, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -6375,7 +6380,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_del_mpath, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -6383,7 +6388,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_set_bss, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -6409,7 +6414,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_get_mesh_config, .policy = nl80211_policy, /* can be retrieved by unprivileged users */ - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -6542,7 +6547,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_setdel_pmksa, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -6550,7 +6555,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_setdel_pmksa, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -6558,7 +6563,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_flush_pmksa, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
@@ -6718,7 +6723,7 @@ static struct genl_ops nl80211_ops[] = { .doit = nl80211_probe_client, .policy = nl80211_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = NL80211_FLAG_NEED_NETDEV | + .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | NL80211_FLAG_NEED_RTNL, }, {
sound/pci/hda/patch_realtek.c +1 -0
@@ -5402,6 +5402,7 @@ static const struct alc_fixup alc269_fixups[] = { };static const struct snd_pci_quirk alc269_fixup_tbl[] = { +SND_PCI_QUIRK (0x1043 ,0x1427 ,"Asus Zenbook UX31E" ,ALC269VB_FIXUP_DMIC ),SND_PCI_QUIRK (0x1043 ,0x1a13 ,"Asus G73Jw" ,ALC269_FIXUP_ASUS_G73JW ),SND_PCI_QUIRK (0x1043 ,0x16e3 ,"ASUS UX50" ,ALC269_FIXUP_STEREO_DMIC ),SND_PCI_QUIRK (0x1043 ,0x831a ,"ASUS P901" ,ALC269_FIXUP_STEREO_DMIC ),
sound/soc/codecs/wm8994.c +222 -54
358 lines not on this page · raw message
sound/soc/soc-dapm.c +2 -0
@@ -70,6 +70,7 @@ static int dapm_up_seq[] = { [snd_soc_dapm_out_drv] = 10, [snd_soc_dapm_hp] = 10, [snd_soc_dapm_spk] = 10, + [snd_soc_dapm_line] = 10, [snd_soc_dapm_post] = 11, };
@@ -78,6 +79,7 @@ static int dapm_down_seq[] = { [snd_soc_dapm_adc] = 1, [snd_soc_dapm_hp] = 2, [snd_soc_dapm_spk] = 2, + [snd_soc_dapm_line] = 2, [snd_soc_dapm_out_drv] = 2, [snd_soc_dapm_pga] = 4, [snd_soc_dapm_mixer_named_ctl] = 5,
tools/include/tools/be_byteshift.h new file +70 -0
70 lines not on this page · raw message
tools/include/tools/le_byteshift.h new file +70 -0
70 lines not on this page · raw message