Linux 2.6.27.59
Subsystems (75)
I've just released Linux 2.6.27.59.
I'll also be replying to this message with a copy of the patch between 2.6.27.58 and 2.6.27.59.
The patch and changelog will appear soon at the following locations:
ftp://ftp.all.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.27/ ftp://ftp.all.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.27/patch-2.6.27.59.bz2 ftp://ftp.all.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.27/ChangeLog-2.6.27.59
Git repository:
git://git.kernel.org/pub/scm/linux/kernel/git/longterm/linux-2.6.27.y.git
http://www.kernel.org/pub/scm/linux/kernel/git/longterm/linux-2.6.27.y.git
Git repository through the gitweb interface:
http://git.kernel.org/?p=linux/kernel/git/longterm/linux-2.6.27.y.git
Thanks to all reviewers,
Willy
-------
Documentation/kernel-parameters.txt | 1 MAINTAINERS | 2 Makefile | 2 arch/arm/kernel/signal.c | 4 - arch/ia64/sn/pci/tioca_provider.c | 2 arch/parisc/kernel/firmware.c | 23 ------ arch/parisc/kernel/irq.c | 2 arch/powerpc/include/asm/hvcall.h | 1 arch/powerpc/kernel/cpu_setup_6xx.S | 40 ++++++------ arch/powerpc/kernel/crash.c | 42 ++++++++++++ arch/powerpc/kernel/machine_kexec_64.c | 25 +++++++ arch/powerpc/kernel/rtas_flash.c | 39 ++++++----- arch/powerpc/kernel/setup_64.c | 17 +++-- arch/powerpc/platforms/pseries/hvCall.S | 38 +++++++++++ arch/powerpc/platforms/pseries/lpar.c | 35 ++++++---- arch/powerpc/platforms/pseries/plpar_wrappers.h | 18 +++++ arch/powerpc/sysdev/fsl_rio.c | 1 arch/s390/include/asm/processor.h | 5 - arch/s390/kernel/traps.c | 37 ----------- arch/x86/kernel/e820.c | 3 arch/x86/kernel/early-quirks.c | 7 +- arch/x86/kernel/entry_64.S | 2 arch/x86/lib/semaphore_32.S | 2 arch/x86/mm/pgtable.c | 3 drivers/acpi/asus_acpi.c | 8 -- drivers/ata/ahci.c | 15 ++++ drivers/ata/libata-core.c | 24 ++++--- drivers/block/cciss.h | 1 drivers/block/pktcdvd.c | 2 drivers/bluetooth/btusb.c | 3 drivers/char/tpm/tpm.c | 12 ++- drivers/firmware/dcdbas.c | 4 - drivers/hwmon/f71882fg.c | 2 drivers/hwmon/via686a.c | 14 +++- drivers/infiniband/core/cm.c | 1 drivers/infiniband/core/cma.c | 15 ++++ drivers/input/serio/i8042-x86ia64io.h | 21 ++++++ drivers/input/serio/i8042.c | 6 + drivers/input/xen-kbdfront.c | 32 ++++++--- drivers/isdn/hisax/config.c | 18 ++++- drivers/isdn/hisax/hisax.h | 1 drivers/isdn/i4l/isdn_tty.c | 6 - drivers/md/dm-raid1.c | 2 drivers/md/md.c | 8 +- drivers/media/dvb/ttpci/av7110_ca.c | 2 drivers/media/radio/radio-aimslab.c | 24 ++----- drivers/media/video/sn9c102/sn9c102_core.c | 6 - drivers/message/fusion/mptscsih.c | 2 drivers/mfd/ucb1x00-ts.c | 12 ++- drivers/misc/acer-wmi.c | 4 - drivers/misc/tc1100-wmi.c | 2 drivers/net/myri10ge/myri10ge.c | 1 drivers/net/r8169.c | 6 + drivers/net/wireless/hostap/hostap_cs.c | 10 --- drivers/net/wireless/rt2x00/rt73usb.c | 1 drivers/pci/quirks.c | 61 ++++++++++++++++-- drivers/rtc/rtc-ds1511.c | 2 drivers/s390/char/keyboard.c | 3 drivers/scsi/libsas/sas_scsi_host.c | 1 drivers/scsi/sd.c | 9 ++ drivers/scsi/ses.c | 4 - drivers/serial/8250.c | 3 drivers/usb/class/cdc-acm.c | 3 drivers/usb/core/hub.c | 5 + drivers/usb/gadget/printer.c | 14 ++-- drivers/usb/host/ehci-hcd.c | 28 ++++++-- drivers/usb/host/ehci-pci.c | 39 +++++++++++ drivers/usb/host/ehci-q.c | 27 ++------ drivers/usb/host/ehci-sched.c | 79 ++++++++++++++++++++++++ drivers/usb/host/ehci.h | 1 drivers/usb/misc/iowarrior.c | 2 drivers/usb/misc/uss720.c | 7 -- drivers/usb/musb/omap2430.c | 1 drivers/usb/serial/ch341.c | 1 drivers/usb/serial/io_edgeport.c | 4 - drivers/usb/serial/pl2303.c | 2 drivers/usb/serial/pl2303.h | 2 drivers/usb/serial/ti_usb_3410_5052.c | 2 drivers/usb/storage/unusual_devs.h | 16 ++++ drivers/video/console/tileblit.c | 2 drivers/virtio/virtio_pci.c | 1 fs/aio.c | 4 - fs/compat.c | 28 ++++---- fs/dquot.c | 11 +-- fs/ecryptfs/keystore.c | 1 fs/exec.c | 30 ++++++++- fs/ext2/namei.c | 9 -- fs/ext3/namei.c | 2 fs/ext3/super.c | 7 ++ fs/ext4/inode.c | 11 +-- fs/gfs2/bmap.c | 2 fs/nfs/direct.c | 34 ++++++---- fs/nfs/file.c | 2 fs/nfsd/lockd.c | 1 fs/nfsd/nfs4xdr.c | 8 +- fs/nfsd/vfs.c | 2 fs/ocfs2/aops.c | 6 + fs/ocfs2/stack_user.c | 2 fs/partitions/ldm.c | 5 + fs/partitions/mac.c | 17 ++--- fs/proc/array.c | 7 -- fs/proc/base.c | 9 ++ fs/proc/task_mmu.c | 4 - fs/ramfs/file-nommu.c | 3 fs/ubifs/commit.c | 2 fs/ubifs/file.c | 3 fs/ubifs/lpt.c | 7 -- fs/xfs/linux-2.6/xfs_ioctl.c | 11 ++- fs/xfs/xfs_fsops.c | 3 include/asm-x86/mach-default/smpboot_hooks.h | 2 include/asm-x86/mmu_context_32.h | 5 - include/asm-x86/mmu_context_64.h | 5 - include/asm-x86/pgtable-3level.h | 11 --- include/drm/drm_pciids.h | 1 include/linux/binfmts.h | 5 + include/linux/pid.h | 2 include/net/sctp/command.h | 1 include/scsi/scsi_device.h | 2 include/sound/soc-dapm.h | 16 ++-- init/calibrate.c | 6 - kernel/irq/manage.c | 2 kernel/kgdb.c | 9 -- kernel/pid.c | 5 + kernel/ptrace.c | 2 kernel/signal.c | 8 +- mm/mremap.c | 19 ++++- mm/shmem.c | 1 net/ax25/af_ax25.c | 2 net/bluetooth/bnep/sock.c | 1 net/bluetooth/sco.c | 1 net/bridge/netfilter/ebtables.c | 2 net/can/bcm.c | 4 - net/core/filter.c | 64 ++++++++++--------- net/dccp/input.c | 7 -- net/econet/af_econet.c | 8 +- net/ipv4/inet_diag.c | 27 ++++---- net/ipv4/netfilter/arp_tables.c | 3 net/ipv4/netfilter/ip_tables.c | 3 net/ipv4/netfilter/ipt_CLUSTERIP.c | 5 + net/ipv4/tcp.c | 3 net/ipv6/netfilter/ip6_tables.c | 3 net/irda/af_irda.c | 16 ++-- net/irda/iriap.c | 6 + net/irda/irnet/irnet_ppp.c | 3 net/mac80211/sta_info.c | 1 net/packet/af_packet.c | 3 net/rose/rose_subr.c | 18 ++++- net/sctp/auth.c | 8 +- net/sctp/sm_make_chunk.c | 32 +++------ net/sctp/sm_sideeffect.c | 26 +++++++ net/sctp/sm_statefuns.c | 8 ++ net/sunrpc/cache.c | 4 - net/sunrpc/sched.c | 14 +--- net/tipc/socket.c | 1 net/x25/x25_link.c | 4 + sound/oss/dev_table.h | 2 sound/oss/midi_synth.c | 34 ++++------ sound/oss/midi_synth.h | 2 sound/oss/opl3.c | 23 ++++-- sound/oss/sequencer.c | 2 sound/pci/au88x0/au88x0_pcm.c | 24 ++++++- sound/pci/ens1370.c | 23 +++++- 162 files changed, 1119 insertions(+), 536 deletions(-)
Summary of changes from 2.6.27.58 to 2.6.27.59
============================================
Aaro Koskinen (1):
procfs: fix /proc/<pid>/maps heap check
Alan Stern (6):
USB: usb-storage: unusual_devs entry for CamSport Evo
USB: EHCI: fix DMA deallocation bug
USB: g_printer: fix bug in module parameter definitions
USB: prevent buggy hubs from crashing the USB stack
ehci-hcd: Bug fix: don't set a QH's Halt bit
USB: EHCI: unlink unused QHs when the controller is stopped
Alex Deucher (1):
drm/radeon: remove 0x4243 pci id
Alex Elder (1):
xfs: zero proper structure size for geometry calls
Alex He (2):
USB: EHCI: ASPM quirk of ISOC on AMD SB800
USB: EHCI: ASPM quirk of ISOC on AMD Hudson
Alexander van Heukelum (1):
x86, binutils, xen: Fix another wrong size directive
Amir Goldstein (1):
ext3: skip orphan cleanup on rocompat fs
Andreas Herrmann (1):
x86, quirk: Fix SB600 revision check
Anton Blanchard (3):
powerpc/kdump: CPUs assume the context of the oopsing CPU powerpc/kdump: Use chip->shutdown to disable IRQs
powerpc: Use more accurate limit for first segment memory allocations
Apollon Oikonomopoulos (1):
x25: decrement netdev reference counts on unload
Artem Bityutskiy (3):
UBIFS: do not read flash unnecessarily
UBIFS: fix oops on error path in read_pnode
UBIFS: fix oops when R/O file-system is fsync'ed
Benjamin Herrenschmidt (1):
powerpc: Fix some 6xx/7xxx CPU setup functions
Bjørn Mork (1):
USB: io_edgeport: fix the reported firmware major and minor
Bud Brown (1):
cciss: fix lost command issue
Chuck Lever (1):
NFS: Fix "kernel BUG at fs/aio.c:554!"
Clemens Ladisch (1):
ALSA: ens1371: fix Creative Ectiva support
Dan Carpenter (2):
av7110: check for negative array offset
keyboard: integer underflow bug
Dan Rosenberg (10):
sctp: Fix out-of-bounds reading in sctp_asoc_get_hmac() Fix pktcdvd ioctl dev_minor range check sound/oss/opl3: validate voice and channel indexes
xfs: prevent leaking uninitialized stack memory in FSGEOMETRY_V1
irda: validate peer name and attribute lengths
irda: prevent heap corruption on invalid nickname
ROSE: prevent heap corruption with bad facilities sound/oss: remove offset from load_patch callbacks
irda: prevent integer underflow in IRLMP_ENUMDEVICES
CAN: Use inode instead of kernel address for /proc file
Dario Lombardo (1):
drivers: update to pl2303 usb-serial to support Motorola cables
David Milburn (1):
ahci: add device IDs for Ibex Peak ahci controllers
David S. Miller (5):
filter: make sure filters dont read uninitialized memory
tcp: Increase TCP_MAXSEG socket option minimum.
tcp: Make TCP_MAXSEG minimum more correct.
x25: Do not reference freed memory.
econet: Fix crash in aun_incoming().
Don Zickus (1):
x86: Use u32 instead of long to set reset vector back to 0
Enrik Berkhan (1):
nommu: ramfs: pages allocated to an inode's pagecache may get wrongly discarded
Eric Sandeen (1):
ext3: Always set dx_node's fake_dirent explicitly.
Felix Fietkau (1):
mac80211: initialize sta->last_rx in sta_info_alloc
Geert Uytterhoeven (1):
radio-aimslab.c needs #include <linux/delay.h>
Gerrit Renker (1):
dccp: fix oops on Reset after close
Goldwyn Rodrigues (1):
Treat writes as new when holes span across page boundaries
Greg Kroah-Hartman (1):
rt2x00: add device id for windy31 usb device
Guy Martin (1):
parisc : Remove broken line wrapping handling pdc_iodc_print()
Hans de Goede (1):
hwmon/f71882fg: Set platform drvdata to NULL later
Henry Nestler (1):
fbcon: Bugfix soft cursor detection in Tile Blitting
Hugh Dickins (2):
mm: fix possible cause of a page_mapped BUG
shmem: let shared anonymous be nonlinear again
Ionut Nicu (1):
USB: ti_usb: fix module removal
J. Bruce Fields (1):
nfsd: fix auth_domain reference leak on nlm operations
J. R. Okajima (1):
NFS: fix the return value of nfs_file_fsync()
James Bottomley (2):
fix medium error problems with some arrays which can cause data corruption
libsas: fix runaway error handler problem
Jan Beulich (1):
x86: Fix a bogus unwind annotation in lib/semaphore_32.S
Jan Kara (1):
quota: Don't write quota info in dquot_commit()
Jason Wessel (1):
repair gdbstub to match the gdbserial protocol specification
Jean Delvare (1):
hwmon: (via686a) Initialize fan_div values
Jeff Mahoney (1):
tioca: Fix assignment from incompatible pointer warnings
Jiri Kosina (1):
Input: i8042 - introduce 'notimeout' blacklist for Dell Vostro V13
Jiri Slaby (2):
PCI: add more checking to ICH region quirks
PCI: do not create quirk I/O regions below PCIBIOS_MIN_IO for ICH
Jochen Friedrich (1):
mfd: Fix NULL pointer due to non-initialized ucb1x00-ts absinfo
Johan Hovold (2):
usb: musb: omap2430: fix kernel panic on reboot
USB: cdc-acm: fix potential null-pointer dereference on disconnect
John Hughes (1):
ses: show devices for enclosures with no page 7
Josh Hunt (1):
ext2: Fix link count corruption under heavy link+rename load
Julien Tinnes (1):
Prevent rt_sigqueueinfo and rt_tgsigqueueinfo from spoofing the signal code
Kamal Mostafa (1):
x86: Fix panic when handling "mem={invalid}" param
Kamalesh Babulal (2):
powerpc/kexec: Add ifdef CONFIG_PPC_STD_MMU_64 to PPC64 code
powerpc: Fix default_machine_crash_shutdown #ifdef botch
Kees Cook (3):
usb: iowarrior: don't trust report_size for buffer size
proc: protect mm start_code/end_code in /proc/pid/stat
net: ax25: fix information leak to userland harder
Konstantin Khorenko (1):
NFSD: memory corruption due to writing beyond the stat array
Krishnasamy, Somasundaram (1):
ses: Avoid kernel panic when lun 0 is not mapped
Kulikov Vasiliy (2):
sound: oss: midi_synth: check get_user() return value
net: tipc: fix information leak to userland
Kyle McMartin (1):
parisc: pass through '\t' to early (iodc) console
Li Zefan (1):
sunrpc/cache: fix module refcnt leak in a failure path
Linus Torvalds (3):
mm: avoid wrapping vm_pgoff in mremap()
next_pidmap: fix overflow condition
proc: do proper range check on readdir offset
Marc-Antoine Perennou (1):
Bluetooth: add support for Apple MacBook Pro 8,2
Mark Brown (1):
ASoC: Explicitly say registerless widgets have no register
Martin Schwidefsky (1):
s390: remove task_show_regs
Matt Evans (1):
powerpc/kexec: Fix orphaned offline CPUs across kexec
Mauro Carvalho Chehab (1):
radio-aimslab.c: Fix gcc 4.5+ bug
Maxim Uvarov (1):
powerpc/crashdump: Do not fail on NULL pointer dereferencing
Michael Neuling (3):
powerpc/pseries: Add hcall to read 4 ptes at a time in real mode powerpc/kexec: Speedup kexec hash PTE tear down powerpc/kdump: Fix race in kdump shutdown
Michael S. Tsirkin (1):
virtio: set pci bus master enable bit
Mikulas Patocka (1):
dm raid1: fail writes if errors are not handled and log fails
Milton Miller (1):
powerpc: rtas_flash needs to use rtas_data_buf
NeilBrown (3):
md: fix regression with re-adding devices to arrays with no metadata
nfsd: correctly handle return value from nfsd_map_name_to_*
md: correctly handle probe of an 'mdp' device.
Nelson Elhage (1):
inet_diag: Make sure we actually run the same bytecode we audited.
Nick Holloway (1):
USB: Storage: Add unusual_devs entry for VTech Kidizoom
Olaf Hering (1):
Input: xen-kbdfront - advertise either absolute or relative coordinates
Oleg Nesterov (2):
exec: make argv/envp memory visible to oom-killer
exec: copy-and-paste the fixes into compat_do_execve() paths
Pavel Machek (1):
serial: unbreak billionton CF card
Peter Holik (1):
USB: uss720 fixup refcount position
Peter Huewe (1):
char/tpm: Fix unitialized usage of data buffer
Rajiv Andrade (1):
TPM: Long default timeout fix
Randy Dunlap (1):
MAINTAINERS: update STABLE BRANCH info
Raymond Yau (1):
ALSA : au88x0 - Limit number of channels to fix Oops via OSS emu
Roberto Sassu (1):
eCryptfs: ecryptfs_keyring_auth_tok_for_sig() bug fix
Roland Dreier (2):
aio: wake all waiters when destroying ctx
Relax si_code check in rt_sigqueueinfo and rt_tgsigqueueinfo
Russell King (1):
ARM: Ensure predictable endian state on signal handler entry
Ryan Kuester (1):
mptsas: fix hangs caused by ATA pass-through
Sean Hefty (2):
RDMA/cma: Fix crash in request handlers
IB/cm: Bump reference count on cm_id before invoking callback
Seth Heasley (4):
ahci: AHCI and RAID mode SATA patch for Intel Cougar Point DeviceIDs
ahci: AHCI and RAID mode SATA patch for Intel Patsburg DeviceIDs
ahci: AHCI mode SATA patch for Intel DH89xxCC DeviceIDs
ahci: AHCI mode SATA patch for Intel Patsburg SATA RAID controller
Shaohua Li (1):
x86: Flush TLB if PGD entry is changed in i386 PAE mode
Simone Contini (1):
USB: serial: pl2303: Hybrid reader Uniform HCR331
Stanislaw Gruszka (3):
hostap_cs: fix sleeping function called from invalid context
r8169: disable ASPM
myri10ge: fix rmmod crash
Steven J. Magnani (1):
net: Fix oops from tcp_collapse() when using splice()
Steven Whitehouse (1):
GFS2: Fix bmap allocation corner-case bug
Stuart Hayes (1):
dcdbas: force SMI to happen when expected
Suresh Siddha (1):
x86, mm: avoid possible bogus tlb entries by clearing prev mm_cpumask after switching mm
Tejun Heo (2):
ptrace: use safer wake up on ptrace_detach()
libata: no special completion processing for EH commands
Thomas Gleixner (3):
isdn: hisax: Replace the bogus access to irq stats
genirq: Disable the SHIRQ_DEBUG call in request_threaded_irq for now fix per-cpu flag problem in the cpu affinity checkers
Thomas Taranowski (1):
rapidio: fix hang on RapidIO doorbell queue full condition
Tilman Schmidt (1):
isdn: avoid calling tty_ldisc_flush() in atomic context
Tim Deegan (1):
fix jiffy calculations in calibrate_delay_direct to handle overflow
Timo Warns (2):
fs/partitions: Validate map_count in Mac partition tables
ldm: corrupted partition table can cause kernel oops
Trond Myklebust (1):
SUNRPC: Ensure we always run the tk_callback before tk_action
Vasiliy Kulikov (15):
platform: x86: asus_acpi: world-writable procfs files
platform: x86: acer-wmi: world-writable sysfs threeg file
platform: x86: tc1100-wmi: world-writable sysfs wireless and jogdial files
Bluetooth: sco: fix information leak to userspace
bridge: netfilter: fix information leak
Bluetooth: bnep: fix buffer overflow
netfilter: ip_tables: fix infoleak to userspace
netfilter: arp_tables: fix infoleak to userspace
netfilter: ipt_CLUSTERIP: fix buffer overflow
ipv6: netfilter: ip6_tables: fix infoleak to userspace drivers/rtc/rtc-ds1511.c: world-writable sysfs nvram file
econet: 4 byte infoleak to the network
net: ax25: fix information leak to userland
net: packet: fix information leak to userland
video: sn9c102: world-wirtable sysfs files
Vlad Yasevich (1):
sctp: Fix oops when sending queued ASCONF chunks
Wei Yongjun (1):
sctp: fix to calc the INIT/INIT-ACK chunk length correctly is set
Willy Tarreau (1):
Linux 2.6.27.59
Yongqiang Yang (1):
ext4: fix credits computing for indirect mapped files
dann frazier (1):
ocfs2_connection_find() returns pointer to bad structure
wangyanqing (1):
USB: serial: ch341: add new id
Documentation/kernel-parameters.txt +1 -0
@@ -811,6 +811,7 @@ and is between 256 and 4096 characters. It is defined in the file i8042.panicblink= [HW] Frequency with which keyboard LEDs should blink when kernel panics (default is 0.5 sec) + i8042.notimeout [HW] Ignore timeout condition signalled by conroller i8042.reset [HW] Reset the controller during init and cleanup i8042.unlock [HW] Unlock (ignore) the keylock
MAINTAINERS +0 -2
@@ -3857,8 +3857,6 @@ S: Supported STABLE BRANCH: P: Greg Kroah-Hartman M: [email protected] -P: Chris Wright -M: [email protected] L: [email protected] S: Maintained
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 27 -EXTRAVERSION = .58 +EXTRAVERSION = .59 NAME = Trembling Tortoise # *DOCUMENTATION*
arch/arm/kernel/signal.c +3 -1
@@ -410,7 +410,9 @@ setup_return(struct pt_regs *regs, struct k_sigaction *ka,unsigned long handler = (unsigned long )ka->sa.sa_handler;unsigned long retcode;int thumb =0 ; -unsigned long cpsr = regs->ARM_cpsr & ~PSR_f; +unsigned long cpsr = regs->ARM_cpsr & ~(PSR_f |PSR_E_BIT ); + + cpsr |=PSR_ENDSTATE ;/* * Maybe we need to deliver a 32-bit signal to a 26-bit task.
arch/ia64/sn/pci/tioca_provider.c +1 -1
@@ -517,7 +517,7 @@ tioca_dma_unmap(struct pci_dev *pdev, dma_addr_t bus_addr, int dir)* use the GART mapped mode. */ static u64 -tioca_dma_map (struct pci_dev *pdev,u64 paddr,size_t byte_count,int dma_flags) +tioca_dma_map (struct pci_dev *pdev,unsigned long paddr,size_t byte_count,int dma_flags) {u64 mapaddr;
arch/parisc/kernel/firmware.c +2 -21
@@ -1096,42 +1096,23 @@ static char __attribute__((aligned(64))) iodc_dbuf[4096];*/ int pdc_iodc_print (const unsigned char *str,unsigned count) { -static int posx;/* for simple TAB-Simulation... */ unsigned int i;unsigned long flags; -for (i =0 ; i < count && i <79 ;) { +for (i =0 ; i < count;) {switch (str[i]) {case '\n' : iodc_dbuf[i+0 ] ='\r' ; iodc_dbuf[i+1 ] ='\n' ; i +=2 ; - posx =0 ; goto print; -case '\t' : -while (posx &7 ) { - iodc_dbuf[i] =' ' ; - i++, posx++; - } -break ; -case '\b' :/* BS */ - posx -=2 ;default : iodc_dbuf[i] = str[i]; - i++, posx++; + i++;break ; } } -/* if we're at the end of line, and not already inserting a newline, -* insert one anyway. iodc console doesn't claim to support >79 char -* lines. don't account for this in the return value. -*/ -if (i ==79 && iodc_dbuf[i-1 ] !='\n' ) { - iodc_dbuf[i+0 ] ='\r' ; - iodc_dbuf[i+1 ] ='\n' ; - } - print:spin_lock_irqsave (&pdc_lock, flags); real32_call(PAGE0->mem_cons.iodc_io,
arch/parisc/kernel/irq.c +1 -1
@@ -117,7 +117,7 @@ int cpu_check_affinity(unsigned int irq, cpumask_t *dest)int cpu_dest;/* timer and ipi have to always be received on all CPUs */ -if (CHECK_IRQ_PER_CPU (irq)) { +if (CHECK_IRQ_PER_CPU (irq_to_desc (irq)->status)) {/* Bad linux design decision. The mask has already * been set; we must reset it */ irq_desc[irq].affinity =CPU_MASK_ALL ;
arch/powerpc/include/asm/hvcall.h +1 -0
@@ -268,6 +268,7 @@ long plpar_hcall_raw(unsigned long opcode, unsigned long *retbuf, ...);*/ #define PLPAR_HCALL9_BUFSIZE 9long plpar_hcall9 (unsigned long opcode,unsigned long *retbuf, ...); +long plpar_hcall9_raw (unsigned long opcode,unsigned long *retbuf, ...);/* For hcall instrumentation. One structure per-hcall, per-CPU */ struct hcall_stats {
arch/powerpc/kernel/cpu_setup_6xx.S +20 -20
@@ -17,65 +17,65 @@ #include <asm/cache.h> _GLOBAL(__setup_cpu_603) - mflr r4 + mflr r5 BEGIN_FTR_SECTION bl __init_fpu_registers END_FTR_SECTION_IFCLR(CPU_FTR_FPU_UNAVAILABLE) bl setup_common_caches - mtlr r4 + mtlr r5 blr _GLOBAL(__setup_cpu_604) - mflr r4 + mflr r5 bl setup_common_caches bl setup_604_hid0 - mtlr r4 + mtlr r5 blr _GLOBAL(__setup_cpu_750) - mflr r4 + mflr r5 bl __init_fpu_registers bl setup_common_caches bl setup_750_7400_hid0 - mtlr r4 + mtlr r5 blr _GLOBAL(__setup_cpu_750cx) - mflr r4 + mflr r5 bl __init_fpu_registers bl setup_common_caches bl setup_750_7400_hid0 bl setup_750cx - mtlr r4 + mtlr r5 blr _GLOBAL(__setup_cpu_750fx) - mflr r4 + mflr r5 bl __init_fpu_registers bl setup_common_caches bl setup_750_7400_hid0 bl setup_750fx - mtlr r4 + mtlr r5 blr _GLOBAL(__setup_cpu_7400) - mflr r4 + mflr r5 bl __init_fpu_registers bl setup_7400_workarounds bl setup_common_caches bl setup_750_7400_hid0 - mtlr r4 + mtlr r5 blr _GLOBAL(__setup_cpu_7410) - mflr r4 + mflr r5 bl __init_fpu_registers bl setup_7410_workarounds bl setup_common_caches bl setup_750_7400_hid0 li r3,0 mtspr SPRN_L2CR2,r3 - mtlr r4 + mtlr r5 blr _GLOBAL(__setup_cpu_745x) - mflr r4 + mflr r5 bl setup_common_caches bl setup_745x_specifics - mtlr r4 + mtlr r5 blr /* Enable caches for 603's, 604, 750 & 7400 */
@@ -189,10 +189,10 @@ setup_750cx: cror 4*cr0+eq,4*cr0+eq,4*cr1+eq cror 4*cr0+eq,4*cr0+eq,4*cr2+eq bnelr - lwz r6,CPU_SPEC_FEATURES(r5) + lwz r6,CPU_SPEC_FEATURES(r4) li r7,CPU_FTR_CAN_NAP andc r6,r6,r7 - stw r6,CPU_SPEC_FEATURES(r5) + stw r6,CPU_SPEC_FEATURES(r4) blr /* 750fx specific
@@ -220,12 +220,12 @@ BEGIN_FTR_SECTION andis. r11,r11,L3CR_L3E@h beq 1f END_FTR_SECTION_IFSET(CPU_FTR_L3CR) - lwz r6,CPU_SPEC_FEATURES(r5) + lwz r6,CPU_SPEC_FEATURES(r4) andi. r0,r6,CPU_FTR_L3_DISABLE_NAP beq 1f li r7,CPU_FTR_CAN_NAP andc r6,r6,r7 - stw r6,CPU_SPEC_FEATURES(r5) + stw r6,CPU_SPEC_FEATURES(r4) 1: mfspr r11,SPRN_HID0
arch/powerpc/kernel/crash.c +40 -2
85 lines not on this page · raw message
arch/powerpc/kernel/machine_kexec_64.c +25 -0
@@ -14,6 +14,7 @@#include <linux/smp.h> #include <linux/thread_info.h> #include <linux/errno.h> +#include <linux/cpu.h> #include <asm/page.h> #include <asm/current.h>
@@ -168,10 +169,34 @@ static void kexec_smp_down(void *arg)/* NOTREACHED */ } +/* +* We need to make sure each present CPU is online. The next kernel will scan +* the device tree and assume primary threads are online and query secondary +* threads via RTAS to online them if required. If we don't online primary +* threads, they will be stuck. However, we also online secondary threads as we +* may be using 'cede offline'. In this case RTAS doesn't see the secondary +* threads as offline -- and again, these CPUs will be stuck. +* +* So, we online all CPUs that should be running, including secondary threads. +*/ +static void wake_offline_cpus (void ) +{ +int cpu =0 ; + +for_each_present_cpu (cpu) { +if (!cpu_online (cpu)) { +printk (KERN_INFO "kexec: Waking offline cpu %d.\n" , + cpu); +cpu_up (cpu); + } + } +} +static void kexec_prepare_cpus (void ) {int my_cpu, i, notified=-1 ; +wake_offline_cpus ();smp_call_function (kexec_smp_down,NULL ,/* wait */ 0 ); my_cpu =get_cpu ();
arch/powerpc/kernel/rtas_flash.c +21 -18
@@ -93,12 +93,8 @@ struct flash_block_list {struct flash_block_list *next;struct flash_block blocks[FLASH_BLOCKS_PER_NODE ]; }; -struct flash_block_list_header {/* just the header of flash_block_list */ -unsigned long num_blocks; -struct flash_block_list *next; -}; -static struct flash_block_list_header rtas_firmware_flash_list = {0 ,NULL }; +static struct flash_block_list *rtas_firmware_flash_list;/* Use slab cache to guarantee 4k alignment */ static struct kmem_cache *flash_block_cache =NULL ;
@@ -107,13 +103,14 @@ static struct kmem_cache *flash_block_cache = NULL;/* Local copy of the flash block list. * We only allow one open of the flash proc file and create this -* list as we go. This list will be put in the -* rtas_firmware_flash_list var once it is fully read. +* list as we go. The rtas_firmware_flash_list varable will be +* set once the data is fully read. * * For convenience as we build the list we use virtual addrs, * we do not fill in the version number, and the length field * is treated as the number of entries currently in the block -* (i.e. not a byte count). This is all fixed on release. +* (i.e. not a byte count). This is all fixed when calling +* the flash routine. */ /* Status int must be first member of struct */
@@ -200,16 +197,16 @@ static int rtas_flash_release(struct inode *inode, struct file *file)if (uf->flist) {/* File was opened in write mode for a new flash attempt */ /* Clear saved list */ -if (rtas_firmware_flash_list.next) { -free_flash_list (rtas_firmware_flash_list.next); - rtas_firmware_flash_list.next =NULL ; +if (rtas_firmware_flash_list) { +free_flash_list (rtas_firmware_flash_list); + rtas_firmware_flash_list =NULL ; }if (uf->status !=FLASH_AUTH ) uf->status =flash_list_valid (uf->flist);if (uf->status ==FLASH_IMG_READY ) - rtas_firmware_flash_list.next = uf->flist; + rtas_firmware_flash_list = uf->flist;else free_flash_list (uf->flist);
@@ -592,7 +589,7 @@ static void rtas_flash_firmware(int reboot_type)unsigned long rtas_block_list;int i, status, update_token; -if (rtas_firmware_flash_list.next ==NULL ) +if (rtas_firmware_flash_list ==NULL )return ;/* nothing to do */ if (reboot_type !=SYS_RESTART ) {
@@ -609,20 +606,25 @@ static void rtas_flash_firmware(int reboot_type)return ; } -/* NOTE: the "first" block list is a global var with no data -* blocks in the kernel data segment. We do this because -* we want to ensure this block_list addr is under 4GB. +/* +* NOTE: the "first" block must be under 4GB, so we create +* an entry with no data blocks in the reserved buffer in +* the kernel data segment. */ - rtas_firmware_flash_list.num_blocks =0 ; - flist = (struct flash_block_list *)&rtas_firmware_flash_list; +spin_lock (&rtas_data_buf_lock); + flist = (struct flash_block_list *)&rtas_data_buf[0 ]; + flist->num_blocks =0 ; + flist->next = rtas_firmware_flash_list; rtas_block_list =virt_to_abs (flist);if (rtas_block_list >=4UL *1024 *1024 *1024 ) {printk (KERN_ALERT "FLASH: kernel bug...flash list header addr above 4GB\n" ); +spin_unlock (&rtas_data_buf_lock);return ; }printk (KERN_ALERT "FLASH: preparing saved firmware image for flash\n" );/* Update the block_list in place. */ + rtas_firmware_flash_list =NULL ;/* too hard to backout on error */ image_size =0 ;for (f = flist; f; f = next) {/* Translate data addrs to absolute */
@@ -663,6 +665,7 @@ static void rtas_flash_firmware(int reboot_type)printk (KERN_ALERT "FLASH: unknown flash return code %d\n" , status);break ; } +spin_unlock (&rtas_data_buf_lock); }static void remove_flash_pde (struct proc_dir_entry *dp)
arch/powerpc/kernel/setup_64.c +13 -4
@@ -451,9 +451,18 @@ void __init setup_system(void)DBG (" <- setup_system()\n" ); } +static u64 slb0_limit (void ) +{ +if (cpu_has_feature (CPU_FTR_1T_SEGMENT )) { +return 1UL <<SID_SHIFT_1T ; + } +return 1UL <<SID_SHIFT ; +} +#ifdef CONFIG_IRQSTACKS static void __init irqstack_early_init (void ) { +u64 limit =slb0_limit ();unsigned int i;/*
@@ -463,10 +472,10 @@ static void __init irqstack_early_init(void)for_each_possible_cpu (i) { softirq_ctx[i] = (struct thread_info *)__va (lmb_alloc_base (THREAD_SIZE , -THREAD_SIZE ,0x10000000 )); +THREAD_SIZE , limit)); hardirq_ctx[i] = (struct thread_info *)__va (lmb_alloc_base (THREAD_SIZE , -THREAD_SIZE ,0x10000000 )); +THREAD_SIZE , limit)); } }#else
@@ -479,7 +488,7 @@ static void __init irqstack_early_init(void)*/ static void __init emergency_stack_init (void ) { -unsigned long limit; +u64 limit;unsigned int i;/*
@@ -491,7 +500,7 @@ static void __init emergency_stack_init(void)* bringup, we need to get at them in real mode. This means they * must also be within the RMO region. */ - limit =min (0x10000000UL , lmb.rmo_size); + limit =min (slb0_limit (), lmb.rmo_size);for_each_possible_cpu (i) {unsigned long sp;
arch/powerpc/platforms/pseries/hvCall.S +38 -0
@@ -202,3 +202,41 @@ _GLOBAL(plpar_hcall9) mtcrf 0xff,r0 blr /* return r3 = status */ + +/* See plpar_hcall_raw to see why this is needed */ +_GLOBAL(plpar_hcall9_raw) + HMT_MEDIUM + + mfcr r0 + stw r0,8(r1) + + std r4,STK_PARM(r4)(r1) /* Save ret buffer */ + + mr r4,r5 + mr r5,r6 + mr r6,r7 + mr r7,r8 + mr r8,r9 + mr r9,r10 + ld r10,STK_PARM(r11)(r1) /* put arg7 in R10 */ + ld r11,STK_PARM(r12)(r1) /* put arg8 in R11 */ + ld r12,STK_PARM(r13)(r1) /* put arg9 in R12 */ + + HVSC /* invoke the hypervisor */ + + mr r0,r12 + ld r12,STK_PARM(r4)(r1) + std r4, 0(r12) + std r5, 8(r12) + std r6, 16(r12) + std r7, 24(r12) + std r8, 32(r12) + std r9, 40(r12) + std r10,48(r12) + std r11,56(r12) + std r0, 64(r12) + + lwz r0,8(r1) + mtcrf 0xff,r0 + + blr /* return r3 = status */
arch/powerpc/platforms/pseries/lpar.c +21 -14
@@ -366,21 +366,28 @@ static void pSeries_lpar_hptab_clear(void) {unsigned long size_bytes =1UL << ppc64_pft_size;unsigned long hpte_count = size_bytes >>4 ; -unsigned long dummy1, dummy2, dword0; +struct { +unsigned long pteh; +unsigned long ptel; + } ptes[4 ];long lpar_rc; -int i; - -/* TODO: Use bulk call */ -for (i =0 ; i < hpte_count; i++) { -/* dont remove HPTEs with VRMA mappings */ - lpar_rc =plpar_pte_remove_raw (H_ANDCOND , i,HPTE_V_1TB_SEG , - &dummy1, &dummy2); -if (lpar_rc ==H_NOT_FOUND ) { - lpar_rc =plpar_pte_read_raw (0 , i, &dword0, &dummy1); -if (!lpar_rc && ((dword0 &HPTE_V_VRMA_MASK ) - !=HPTE_V_VRMA_MASK )) -/* Can be hpte for 1TB Seg. So remove it */ -plpar_pte_remove_raw (0 , i,0 , &dummy1, &dummy2); +int i, j; + +/* Read in batches of 4, +* invalidate only valid entries not in the VRMA +* hpte_count will be a multiple of 4 +*/ +for (i =0 ; i < hpte_count; i +=4 ) { + lpar_rc =plpar_pte_read_4_raw (0 , i, (void *)ptes); +if (lpar_rc !=H_SUCCESS ) +continue ; +for (j =0 ; j <4 ; j++){ +if ((ptes[j].pteh &HPTE_V_VRMA_MASK ) == +HPTE_V_VRMA_MASK ) +continue ; +if (ptes[j].pteh &HPTE_V_VALID ) +plpar_pte_remove_raw (0 , i + j,0 , + &(ptes[j].pteh), &(ptes[j].ptel)); } } }
arch/powerpc/platforms/pseries/plpar_wrappers.h +18 -0
@@ -159,6 +159,24 @@ static inline long plpar_pte_read_raw(unsigned long flags, unsigned long ptex,return rc; } +/* +* plpar_pte_read_4_raw can be called in real mode. +* ptes must be 8*sizeof(unsigned long) +*/ +static inline long plpar_pte_read_4_raw (unsigned long flags,unsigned long ptex, +unsigned long *ptes) + +{ +long rc; +unsigned long retbuf[PLPAR_HCALL9_BUFSIZE ]; + + rc =plpar_hcall9_raw (H_READ , retbuf, flags |H_READ_4 , ptex); + +memcpy (ptes, retbuf,8 *sizeof (unsigned long )); + +return rc; +} +static inline long plpar_pte_protect (unsigned long flags,unsigned long ptex,unsigned long avpn) {
arch/powerpc/sysdev/fsl_rio.c +0 -1
@@ -828,7 +828,6 @@ fsl_rio_dbell_handler(int irq, void *dev_instance)if (dsr &DOORBELL_DSR_QFI ) {pr_info ("RIO: doorbell queue full\n" );out_be32 (&priv->msg_regs->dsr,DOORBELL_DSR_QFI ); - goto out; }/* XXX Need to check/dispatch until queue empty */
arch/s390/include/asm/processor.h +0 -5
@@ -175,11 +175,6 @@ extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);*/ extern unsigned long thread_saved_pc (struct task_struct *t); -/* -* Print register of task into buffer. Used in fs/proc/array.c. -*/ -extern void task_show_regs (struct seq_file *m,struct task_struct *task); -extern void show_code (struct pt_regs *regs);unsigned long get_wchan (struct task_struct *p);
arch/s390/kernel/traps.c +0 -37
@@ -241,43 +241,6 @@ void show_regs(struct pt_regs *regs)show_last_breaking_event (regs); } -/* This is called from fs/proc/array.c */ -void task_show_regs (struct seq_file *m,struct task_struct *task) -{ -struct pt_regs *regs; - - regs =task_pt_regs (task); -seq_printf (m,"task: %p, ksp: %p\n" , - task, (void *)task->thread.ksp); -seq_printf (m,"User PSW : %p %p\n" , - (void *) regs->psw.mask, (void *)regs->psw.addr); - -seq_printf (m,"User GPRS: " FOURLONG , - regs->gprs[0 ], regs->gprs[1 ], - regs->gprs[2 ], regs->gprs[3 ]); -seq_printf (m," " FOURLONG , - regs->gprs[4 ], regs->gprs[5 ], - regs->gprs[6 ], regs->gprs[7 ]); -seq_printf (m," " FOURLONG , - regs->gprs[8 ], regs->gprs[9 ], - regs->gprs[10 ], regs->gprs[11 ]); -seq_printf (m," " FOURLONG , - regs->gprs[12 ], regs->gprs[13 ], - regs->gprs[14 ], regs->gprs[15 ]); -seq_printf (m,"User ACRS: %08x %08x %08x %08x\n" , - task->thread.acrs[0 ], task->thread.acrs[1 ], - task->thread.acrs[2 ], task->thread.acrs[3 ]); -seq_printf (m," %08x %08x %08x %08x\n" , - task->thread.acrs[4 ], task->thread.acrs[5 ], - task->thread.acrs[6 ], task->thread.acrs[7 ]); -seq_printf (m," %08x %08x %08x %08x\n" , - task->thread.acrs[8 ], task->thread.acrs[9 ], - task->thread.acrs[10 ], task->thread.acrs[11 ]); -seq_printf (m," %08x %08x %08x %08x\n" , - task->thread.acrs[12 ], task->thread.acrs[13 ], - task->thread.acrs[14 ], task->thread.acrs[15 ]); -} -static DEFINE_SPINLOCK (die_lock);void die (const char * str,struct pt_regs * regs,long err)
arch/x86/kernel/e820.c +3 -0
@@ -1189,6 +1189,9 @@ static int __init parse_memopt(char *p) userdef =1 ; mem_size =memparse (p, &p); +/* don't remove all of memory when handling "mem={invalid}" param */ +if (mem_size ==0 ) +return -EINVAL ;e820_remove_range (mem_size,ULLONG_MAX - mem_size,E820_RAM ,1 );return 0 ;
arch/x86/kernel/early-quirks.c +6 -1
@@ -163,7 +163,12 @@ static void __init ati_bugs_contd(int num, int slot, int func)return ; rev =ati_sbx00_rev (num, slot, func); -if (rev >0x13 ) +/* +* SB600: revisions 0x11, 0x12, 0x13, 0x14, ... +* SB700: revisions 0x39, 0x3a, ... +* SB800: revisions 0x40, 0x41, ... +*/ +if (rev >=0x39 )return ;/* check for IRQ0 interrupt swap */
arch/x86/kernel/entry_64.S +1 -1
@@ -1404,7 +1404,7 @@ ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs) decl %gs:pda_irqcount jmp error_exit CFI_ENDPROC -END(do_hypervisor_callback) +END(xen_do_hypervisor_callback) /* # Hypervisor uses this for application faults while it executes.
arch/x86/lib/semaphore_32.S +1 -1
@@ -36,7 +36,7 @@ */ #ifdef CONFIG_SMP ENTRY(__write_lock_failed) - CFI_STARTPROC simple + CFI_STARTPROC FRAME 2: LOCK_PREFIX addl $ RW_LOCK_BIAS,(%eax)
arch/x86/mm/pgtable.c +1 -2
@@ -138,8 +138,7 @@ void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd)* section 8.1: in PAE mode we explicitly have to flush the * TLB via cr3 if the top-level pgd is changed... */ -if (mm == current->active_mm) - write_cr3(read_cr3()); + flush_tlb_mm(mm); }#else /* !CONFIG_X86_PAE */
drivers/acpi/asus_acpi.c +1 -7
@@ -985,14 +985,8 @@ static int asus_hotk_add_fs(struct acpi_device *device)struct proc_dir_entry *proc;mode_t mode; -/* -* If parameter uid or gid is not changed, keep the default setting for -* our proc entries (-rw-rw-rw-) else, it means we care about security, -* and then set to -rw-rw---- -*/ -if ((asus_uid ==0 ) && (asus_gid ==0 )) { - mode =S_IFREG |S_IRUGO |S_IWUGO ; + mode =S_IFREG |S_IRUGO |S_IWUSR |S_IWGRP ; }else { mode =S_IFREG |S_IRUSR |S_IRGRP |S_IWUSR |S_IWGRP ; printk(KERN_WARNING " asus_uid and asus_gid parameters are "
drivers/ata/ahci.c +15 -0
@@ -486,10 +486,25 @@ static const struct pci_device_id ahci_pci_tbl[] = { { PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */ { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */ { PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */ + { PCI_VDEVICE(INTEL, 0x3b22), board_ahci }, /* PCH AHCI */ + { PCI_VDEVICE(INTEL, 0x3b23), board_ahci }, /* PCH AHCI */ { PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */ { PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */ + { PCI_VDEVICE(INTEL, 0x3b29), board_ahci }, /* PCH AHCI */ { PCI_VDEVICE(INTEL, 0x3b2b), board_ahci }, /* PCH RAID */ { PCI_VDEVICE(INTEL, 0x3b2c), board_ahci }, /* PCH RAID */ + { PCI_VDEVICE(INTEL, 0x3b2f), board_ahci }, /* PCH AHCI */ + { PCI_VDEVICE(INTEL, 0x1c02), board_ahci }, /* CPT AHCI */ + { PCI_VDEVICE(INTEL, 0x1c03), board_ahci }, /* CPT AHCI */ + { PCI_VDEVICE(INTEL, 0x1c04), board_ahci }, /* CPT RAID */ + { PCI_VDEVICE(INTEL, 0x1c05), board_ahci }, /* CPT RAID */ + { PCI_VDEVICE(INTEL, 0x1c06), board_ahci }, /* CPT RAID */ + { PCI_VDEVICE(INTEL, 0x1c07), board_ahci }, /* CPT RAID */ + { PCI_VDEVICE(INTEL, 0x1d02), board_ahci }, /* PBG AHCI */ + { PCI_VDEVICE(INTEL, 0x1d04), board_ahci }, /* PBG RAID */ + { PCI_VDEVICE(INTEL, 0x1d06), board_ahci }, /* PBG RAID */ + { PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* PBG RAID */ + { PCI_VDEVICE(INTEL, 0x2323), board_ahci }, /* DH89xxCC AHCI *//* JMicron 360/1/3/5/6, match class to avoid IDE function */ { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
drivers/ata/libata-core.c +15 -9
@@ -4702,9 +4702,6 @@ static void ata_verify_xfer(struct ata_queued_cmd *qc) {struct ata_device *dev = qc->dev; -if (ata_tag_internal (qc->tag)) -return ; -if (ata_is_nodata (qc->tf.protocol))return ;
@@ -4751,14 +4748,23 @@ void ata_qc_complete(struct ata_queued_cmd *qc)if (unlikely (qc->err_mask)) qc->flags |=ATA_QCFLAG_FAILED ; -if (unlikely (qc->flags &ATA_QCFLAG_FAILED )) { -/* always fill result TF for failed qc */ +/* +* Finish internal commands without any further processing +* and always with the result TF filled. +*/ +if (unlikely (ata_tag_internal (qc->tag))) {fill_result_tf (qc); +__ata_qc_complete (qc); +return ; + } -if (!ata_tag_internal (qc->tag)) -ata_qc_schedule_eh (qc); -else -__ata_qc_complete (qc); +/* +* Non-internal qc has failed. Fill the result TF and +* summon EH. +*/ +if (unlikely (qc->flags &ATA_QCFLAG_FAILED )) { +fill_result_tf (qc); +ata_qc_schedule_eh (qc);return ; }
drivers/block/cciss.h +1 -0
@@ -157,6 +157,7 @@ static void SA5_submit_command( ctlr_info_t *h, CommandList_struct *c)printk ("Sending %x - down to controller\n" , c->busaddr );#endif /* CCISS_DEBUG */ writel (c->busaddr, h->vaddr +SA5_REQUEST_PORT_OFFSET ); +readl (h->vaddr +SA5_REQUEST_PORT_OFFSET ); h->commands_outstanding++;if ( h->commands_outstanding > h->max_outstanding) h->max_outstanding = h->commands_outstanding;
drivers/block/pktcdvd.c +1 -1
@@ -2405,7 +2405,7 @@ static void pkt_release_dev(struct pktcdvd_device *pd, int flush)pkt_shrink_pktlist (pd); } -static struct pktcdvd_device *pkt_find_dev_from_minor (int dev_minor) +static struct pktcdvd_device *pkt_find_dev_from_minor (unsigned int dev_minor) {if (dev_minor >=MAX_WRITERS )return NULL ;
drivers/bluetooth/btusb.c +3 -0
@@ -65,6 +65,9 @@ static struct usb_device_id btusb_table[] = {/* Generic Bluetooth USB device */ { USB_DEVICE_INFO(0xe0, 0x01, 0x01) }, +/* Apple MacBookPro8,2 */ + { USB_DEVICE(0x05ac, 0x821a) }, +/* AVM BlueFRITZ! USB v2.0 */ { USB_DEVICE(0x057c, 0x3800) },
drivers/char/tpm/tpm.c +7 -5
@@ -354,12 +354,14 @@ unsigned long tpm_calc_ordinal_duration(struct tpm_chip *chip, tpm_protected_ordinal_duration[ordinal &TPM_PROTECTED_ORDINAL_MASK ]; -if (duration_idx !=TPM_UNDEFINED ) +if (duration_idx !=TPM_UNDEFINED ) { duration = chip->vendor.duration[duration_idx]; -if (duration <=0 ) +/* if duration is 0, it's because chip->vendor.duration wasn't */ +/* filled yet, so we set the lowest timeout just to give enough */ +/* time for tpm_get_timeouts() to succeed */ +return (duration <=0 ?HZ : duration); + }else return 2 *60 *HZ ; -else -return duration; }EXPORT_SYMBOL_GPL (tpm_calc_ordinal_duration);
@@ -986,7 +988,7 @@ int tpm_open(struct inode *inode, struct file *file)spin_unlock (&driver_lock); - chip->data_buffer =kmalloc (TPM_BUFSIZE *sizeof (u8),GFP_KERNEL ); + chip->data_buffer =kzalloc (TPM_BUFSIZE ,GFP_KERNEL );if (chip->data_buffer ==NULL ) { chip->num_opens--;put_device (chip->dev);
drivers/firmware/dcdbas.c +3 -1
@@ -264,8 +264,10 @@ static int smi_request(struct smi_cmd *smi_cmd) }/* generate SMI */ +/* inb to force posted write through and make SMI happen now */ asm volatile ( - "outb %b0,%w1" + "outb %b0,%w1\n" + "inb %w1" : /* no output args */ : "a" (smi_cmd->command_code), "d" (smi_cmd->command_address),
drivers/hwmon/f71882fg.c +1 -1
@@ -808,7 +808,6 @@ static int __devexit f71882fg_remove(struct platform_device *pdev)int i;struct f71882fg_data *data =platform_get_drvdata (pdev); -platform_set_drvdata (pdev,NULL );hwmon_device_unregister (data->hwmon_dev);for (i =0 ; i <ARRAY_SIZE (f71882fg_dev_attr); i++)
@@ -821,6 +820,7 @@ static int __devexit f71882fg_remove(struct platform_device *pdev)for (i =0 ; i <ARRAY_SIZE (f71882fg_fan_attr); i++)device_remove_file (&pdev->dev, &f71882fg_fan_attr[i].dev_attr); +platform_set_drvdata (pdev,NULL );kfree (data);return 0 ;
drivers/hwmon/via686a.c +11 -3
@@ -686,6 +686,13 @@ static int __devexit via686a_remove(struct platform_device *pdev)return 0 ; } +static void via686a_update_fan_div (struct via686a_data *data) +{ +int reg =via686a_read_value (data,VIA686A_REG_FANDIV ); + data->fan_div[0 ] = (reg >>4 ) &0x03 ; + data->fan_div[1 ] = reg >>6 ; +} +static void __devinit via686a_init_device (struct via686a_data *data) {u8 reg;
@@ -699,6 +706,9 @@ static void __devinit via686a_init_device(struct via686a_data *data)via686a_write_value (data,VIA686A_REG_TEMP_MODE , (reg & ~VIA686A_TEMP_MODE_MASK ) |VIA686A_TEMP_MODE_CONTINUOUS ); + +/* Pre-read fan clock divisor values */ +via686a_update_fan_div (data); }static struct via686a_data *via686a_update_device (struct device *dev)
@@ -750,9 +760,7 @@ static struct via686a_data *via686a_update_device(struct device *dev) (via686a_read_value (data,VIA686A_REG_TEMP_LOW23 ) &0xc0 ) >>6 ; - i =via686a_read_value (data,VIA686A_REG_FANDIV ); - data->fan_div[0 ] = (i >>4 ) &0x03 ; - data->fan_div[1 ] = i >>6 ; +via686a_update_fan_div (data); data->alarms =via686a_read_value (data, VIA686A_REG_ALARM1) |
drivers/infiniband/core/cm.c +1 -0
@@ -2987,6 +2987,7 @@ static int cm_sidr_req_handler(struct cm_work *work) goto out;/* No match. */ }atomic_inc (&cur_cm_id_priv->refcount); +atomic_inc (&cm_id_priv->refcount);spin_unlock_irq (&cm.lock); cm_id_priv->id.cm_handler = cur_cm_id_priv->id.cm_handler;
drivers/infiniband/core/cma.c +15 -0
@@ -1129,6 +1129,11 @@ static int cma_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event) cm_id->context = conn_id; cm_id->cm_handler = cma_ib_handler; +/* +* Protect against the user destroying conn_id from another thread +* until we're done accessing it. +*/ +atomic_inc (&conn_id->refcount); ret = conn_id->id.event_handler (&conn_id->id, &event);if (!ret) {/*
@@ -1141,8 +1146,10 @@ static int cma_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event)ib_send_cm_mra (cm_id,CMA_CM_MRA_SETTING ,NULL ,0 );mutex_unlock (&lock);mutex_unlock (&conn_id->handler_mutex); +cma_deref_id (conn_id); goto out; } +cma_deref_id (conn_id);/* Destroy the CM ID by returning a non-zero value. */ conn_id->cm_id.ib =NULL ;
@@ -1344,17 +1351,25 @@ static int iw_conn_req_handler(struct iw_cm_id *cm_id, event.param.conn.private_data_len = iw_event->private_data_len; event.param.conn.initiator_depth = attr.max_qp_init_rd_atom; event.param.conn.responder_resources = attr.max_qp_rd_atom; + +/* +* Protect against the user destroying conn_id from another thread +* until we're done accessing it. +*/ +atomic_inc (&conn_id->refcount); ret = conn_id->id.event_handler (&conn_id->id, &event);if (ret) {/* User wants to destroy the CM ID */ conn_id->cm_id.iw =NULL ;cma_exch (conn_id,CMA_DESTROYING );mutex_unlock (&conn_id->handler_mutex); +cma_deref_id (conn_id);rdma_destroy_id (&conn_id->id); goto out; }mutex_unlock (&conn_id->handler_mutex); +cma_deref_id (conn_id); out:if (dev)
drivers/input/serio/i8042-x86ia64io.h +21 -0
@@ -430,6 +430,13 @@ static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4280"), }, }, + { + /* Dell Vostro V13 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V13"), + }, + }, { } };
@@ -655,6 +662,17 @@ static int __init i8042_platform_init(void) {int retval; +static const struct dmi_system_id __initconst i8042_dmi_notimeout_table[] = { + { +/* Dell Vostro V13 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ), +DMI_MATCH (DMI_PRODUCT_NAME ,"Vostro V13" ), + }, + }, + { } +}; +/* * On ix86 platforms touching the i8042 data register region can do really * bad things. Because of this the region is always reserved on ix86 boxes.
@@ -681,6 +699,9 @@ static int __init i8042_platform_init(void)if (dmi_check_system (i8042_dmi_nomux_table)) i8042_nomux =1 ; +if (dmi_check_system (i8042_dmi_notimeout_table)) + i8042_notimeout = true; +if (dmi_check_system (i8042_dmi_dritek_table)) i8042_dritek =1 ;#endif /* CONFIG_X86 */
drivers/input/serio/i8042.c +5 -1
@@ -63,6 +63,10 @@ static unsigned int i8042_blink_frequency = 500;module_param_named (panicblink, i8042_blink_frequency, uint,0600 );MODULE_PARM_DESC (panicblink,"Frequency with which keyboard LEDs should blink when kernel panics" ); +static unsigned int i8042_notimeout; +module_param_named (notimeout, i8042_notimeout, bool,0 ); +MODULE_PARM_DESC (notimeout,"Ignore timeouts signalled by i8042" ); +#ifdef CONFIG_X86 static unsigned int i8042_dritek;module_param_named (dritek, i8042_dritek, bool,0 );
@@ -362,7 +366,7 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id) }else { dfl = ((str &I8042_STR_PARITY ) ?SERIO_PARITY :0 ) | - ((str &I8042_STR_TIMEOUT ) ?SERIO_TIMEOUT :0 ); + ((str &I8042_STR_TIMEOUT && !i8042_notimeout) ?SERIO_TIMEOUT :0 ); port_no = (str &I8042_STR_AUXDATA ) ?I8042_AUX_PORT_NO :I8042_KBD_PORT_NO ;
drivers/input/xen-kbdfront.c +23 -9
@@ -105,7 +105,7 @@ static irqreturn_t input_handler(int rq, void *dev_id)static int __devinit xenkbd_probe (struct xenbus_device *dev,const struct xenbus_device_id *id) { -int ret, i; +int ret, i, abs;struct xenkbd_info *info;struct input_dev *kbd, *ptr;
@@ -123,6 +123,11 @@ static int __devinit xenkbd_probe(struct xenbus_device *dev,if (!info->page) goto error_nomem; +if (xenbus_scanf (XBT_NIL , dev->otherend,"feature-abs-pointer" ,"%d" , &abs) <0 ) + abs =0 ; +if (abs) +xenbus_printf (XBT_NIL , dev->nodename,"request-abs-pointer" ,"1" ); +/* keyboard */ kbd =input_allocate_device ();if (!kbd)
@@ -132,11 +137,12 @@ static int __devinit xenkbd_probe(struct xenbus_device *dev, kbd->id.bustype =BUS_PCI ; kbd->id.vendor =0x5853 ; kbd->id.product =0xffff ; - kbd->evbit[0 ] =BIT (EV_KEY ); + +__set_bit (EV_KEY , kbd->evbit);for (i =KEY_ESC ; i <KEY_UNKNOWN ; i++) -set_bit (i, kbd->keybit); +__set_bit (i, kbd->keybit);for (i =KEY_OK ; i <KEY_MAX ; i++) -set_bit (i, kbd->keybit); +__set_bit (i, kbd->keybit); ret =input_register_device (kbd);if (ret) {
@@ -155,12 +161,20 @@ static int __devinit xenkbd_probe(struct xenbus_device *dev, ptr->id.bustype =BUS_PCI ; ptr->id.vendor =0x5853 ; ptr->id.product =0xfffe ; - ptr->evbit[0 ] =BIT (EV_KEY ) |BIT (EV_REL ) |BIT (EV_ABS ); + +if (abs) { +__set_bit (EV_ABS , ptr->evbit); +input_set_abs_params (ptr,ABS_X ,0 ,XENFB_WIDTH ,0 ,0 ); +input_set_abs_params (ptr,ABS_Y ,0 ,XENFB_HEIGHT ,0 ,0 ); + }else { +input_set_capability (ptr,EV_REL ,REL_X ); +input_set_capability (ptr,EV_REL ,REL_Y ); + } +input_set_capability (ptr,EV_REL ,REL_WHEEL ); + +__set_bit (EV_KEY , ptr->evbit);for (i =BTN_LEFT ; i <=BTN_TASK ; i++) -set_bit (i, ptr->keybit); - ptr->relbit[0 ] =BIT (REL_X ) |BIT (REL_Y ) |BIT (REL_WHEEL ); -input_set_abs_params (ptr,ABS_X ,0 ,XENFB_WIDTH ,0 ,0 ); -input_set_abs_params (ptr,ABS_Y ,0 ,XENFB_HEIGHT ,0 ,0 ); +__set_bit (i, ptr->keybit); ret =input_register_device (ptr);if (ret) {
drivers/isdn/hisax/config.c +14 -4
@@ -806,6 +806,16 @@ static void closecard(int cardnr)ll_unload (csta); } +static irqreturn_t card_irq (int intno,void *dev_id) +{ +struct IsdnCardState *cs = dev_id; +irqreturn_t ret = cs->irq_func (intno, cs); + +if (ret ==IRQ_HANDLED ) + cs->irq_cnt++; +return ret; +} +static int init_card (struct IsdnCardState *cs) {int irq_cnt, cnt =3 , ret;
@@ -814,10 +824,10 @@ static int init_card(struct IsdnCardState *cs) ret = cs->cardmsg (cs,CARD_INIT ,NULL );return (ret); } - irq_cnt =kstat_irqs (cs->irq); + irq_cnt = cs->irq_cnt =0 ;printk (KERN_INFO "%s: IRQ %d count %d\n" , CardType[cs->typ], cs->irq, irq_cnt); -if (request_irq (cs->irq, cs->irq_func, cs->irq_flags,"HiSax" , cs)) { +if (request_irq (cs->irq, card_irq, cs->irq_flags,"HiSax" , cs)) {printk (KERN_WARNING "HiSax: couldn't get interrupt %d\n" , cs->irq);return 1 ;
@@ -827,8 +837,8 @@ static int init_card(struct IsdnCardState *cs)/* Timeout 10ms */ msleep (10 );printk (KERN_INFO "%s: IRQ %d count %d\n" , - CardType[cs->typ], cs->irq,kstat_irqs (cs->irq)); -if (kstat_irqs (cs->irq) == irq_cnt) { + CardType[cs->typ], cs->irq, cs->irq_cnt); +if (cs->irq_cnt == irq_cnt) {printk (KERN_WARNING "%s: IRQ(%d) getting no interrupts during init %d\n" , CardType[cs->typ], cs->irq,4 - cnt);
drivers/isdn/hisax/hisax.h +1 -0
@@ -950,6 +950,7 @@ struct IsdnCardState {u_long event;struct work_struct tqueue;struct timer_list dbusytimer; +unsigned int irq_cnt;#ifdef ERROR_STATISTIC int err_crc;int err_tx;
drivers/isdn/i4l/isdn_tty.c +0 -6
@@ -2634,12 +2634,6 @@ isdn_tty_modem_result(int code, modem_info * info)if ((info->flags &ISDN_ASYNC_CLOSING ) || (!info->tty)) {return ; } -#ifdef CONFIG_ISDN_AUDIO -if ( !info->vonline ) -tty_ldisc_flush (info->tty); -#else -tty_ldisc_flush (info->tty); -#endif if ((info->flags &ISDN_ASYNC_CHECK_CD ) && (!((info->flags &ISDN_ASYNC_CALLOUT_ACTIVE ) && (info->flags &ISDN_ASYNC_CALLOUT_NOHUP )))) {
drivers/md/dm-raid1.c +1 -1
@@ -1198,7 +1198,7 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes)/* * Dispatch io. */ -if (unlikely (ms->log_failure)) { +if (unlikely (ms->log_failure) &&errors_handled (ms)) {spin_lock_irq (&ms->lock);bio_list_merge (&ms->failures, &sync);spin_unlock_irq (&ms->lock);
drivers/md/md.c +6 -2
@@ -241,6 +241,9 @@ static mddev_t * mddev_find(dev_t unit) {mddev_t *mddev, *new =NULL ; +if (unit &&MAJOR (unit) !=MD_MAJOR ) + unit &= ~((1 <<MdpMinorShift)-1 ); + retry:spin_lock (&all_mddevs_lock);list_for_each_entry (mddev, &all_mddevs, all_mddevs)
@@ -4303,9 +4306,10 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info)/* set saved_raid_disk if appropriate */ if (!mddev->persistent) {if (info->state & (1 <<MD_DISK_SYNC ) && - info->raid_disk < mddev->raid_disks) + info->raid_disk < mddev->raid_disks) { rdev->raid_disk = info->raid_disk; -else +set_bit (In_sync, &rdev->flags); + }else rdev->raid_disk =-1 ; }else super_types[mddev->major_version].
drivers/media/dvb/ttpci/av7110_ca.c +1 -1
@@ -277,7 +277,7 @@ static int dvb_ca_ioctl(struct inode *inode, struct file *file, {ca_slot_info_t *info=(ca_slot_info_t *)parg; -if (info->num >1 ) +if (info->num <0 || info->num >1 )return -EINVAL ; av7110->ci_slot[info->num].num = info->num; av7110->ci_slot[info->num].type = FW_CI_LL_SUPPORT(av7110->arm_app) ?
drivers/media/radio/radio-aimslab.c +7 -17
@@ -31,9 +31,9 @@#include <linux/module.h> /* Modules */ #include <linux/init.h> /* Initdata */ #include <linux/ioport.h> /* request_region */ -#include <linux/delay.h> /* udelay */ #include <asm/io.h> /* outb, outb_p */ #include <asm/uaccess.h> /* copy to/from user */ +#include <linux/delay.h> /* msleep */ #include <linux/videodev2.h> /* kernel radio structs */ #include <media/v4l2-common.h> #include <media/v4l2-ioctl.h>
@@ -60,27 +60,17 @@ struct rt_device/* local things */ -static void sleep_delay (long n) -{ -/* Sleep nicely for 'n' uS */ -int d=n/msecs_to_jiffies (1000 ); -if (!d) -udelay (n); -else -msleep (jiffies_to_msecs (d)); -} -static void rt_decvol (void ) {outb (0x58 , io);/* volume down + sigstr + on */ -sleep_delay (100000 ); +msleep (100 );outb (0xd8 , io);/* volume steady + sigstr + on */ }static void rt_incvol (void ) {outb (0x98 , io);/* volume up + sigstr + on */ -sleep_delay (100000 ); +msleep (100 );outb (0xd8 , io);/* volume steady + sigstr + on */ }
@@ -109,7 +99,7 @@ static int rt_setvol(struct rt_device *dev, int vol)if (vol ==0 ) {/* volume = 0 means mute the card */ outb (0x48 , io);/* volume down but still "on" */ -sleep_delay (2000000 );/* make sure it's totally down */ +msleep (2000 );/* make sure it's totally down */ outb (0xd0 , io);/* volume steady, off */ dev->curvol =0 ;/* track the volume state! */ mutex_unlock (&lock);
@@ -144,7 +134,7 @@ static void send_0_byte(int port, struct rt_device *dev)outb_p (128 +64 +16 +8 +1 , port);/* on + wr-enable + data low */ outb_p (128 +64 +16 +8 +2 +1 , port);/* clock */ } -sleep_delay (1000 ); +msleep (1 ); }static void send_1_byte (int port,struct rt_device *dev)
@@ -158,7 +148,7 @@ static void send_1_byte(int port, struct rt_device *dev)outb_p (128 +64 +16 +8 +4 +2 +1 , port);/* clock */ } -sleep_delay (1000 ); +msleep (1 ); }static int rt_setfreq (struct rt_device *dev,unsigned long freq)
@@ -440,7 +430,7 @@ static int __init rtrack_init(void)/* this ensures that the volume is all the way down */ outb (0x48 , io);/* volume down but still "on" */ -sleep_delay (2000000 );/* make sure it's totally down */ +msleep (2000 );/* make sure it's totally down */ outb (0xc0 , io);/* steady volume, mute card */ rtrack_unit.curvol =0 ;
drivers/media/video/sn9c102/sn9c102_core.c +3 -3
@@ -1410,9 +1410,9 @@ static DEVICE_ATTR(i2c_reg, S_IRUGO | S_IWUSR, sn9c102_show_i2c_reg, sn9c102_store_i2c_reg); static DEVICE_ATTR(i2c_val, S_IRUGO | S_IWUSR, sn9c102_show_i2c_val, sn9c102_store_i2c_val); -static DEVICE_ATTR(green, S_IWUGO, NULL, sn9c102_store_green); -static DEVICE_ATTR(blue, S_IWUGO, NULL, sn9c102_store_blue); -static DEVICE_ATTR(red, S_IWUGO, NULL, sn9c102_store_red); +static DEVICE_ATTR(green, S_IWUSR, NULL, sn9c102_store_green); +static DEVICE_ATTR(blue, S_IWUSR, NULL, sn9c102_store_blue); +static DEVICE_ATTR(red, S_IWUSR, NULL, sn9c102_store_red); static DEVICE_ATTR(frame_header, S_IRUGO, sn9c102_show_frame_header, NULL);
drivers/message/fusion/mptscsih.c +2 -0
@@ -2469,6 +2469,8 @@ mptscsih_slave_configure(struct scsi_device *sdev) ioc->name,sdev->tagged_supported, sdev->simple_tags, sdev->ordered_tags)); +blk_queue_dma_alignment (sdev->request_queue,512 -1 ); +return 0 ; }
drivers/mfd/ucb1x00-ts.c +9 -3
@@ -385,12 +385,18 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev) idev->close = ucb1x00_ts_close;__set_bit (EV_ABS , idev->evbit); -__set_bit (ABS_X , idev->absbit); -__set_bit (ABS_Y , idev->absbit); -__set_bit (ABS_PRESSURE , idev->absbit);input_set_drvdata (idev, ts); +ucb1x00_adc_enable (ts->ucb); + ts->x_res =ucb1x00_ts_read_xres (ts); + ts->y_res =ucb1x00_ts_read_yres (ts); +ucb1x00_adc_disable (ts->ucb); + +input_set_abs_params (idev,ABS_X ,0 , ts->x_res,0 ,0 ); +input_set_abs_params (idev,ABS_Y ,0 , ts->y_res,0 ,0 ); +input_set_abs_params (idev,ABS_PRESSURE ,0 ,0 ,0 ,0 ); + err =input_register_device (idev);if (err) goto fail;
drivers/misc/acer-wmi.c +2 -2
@@ -957,7 +957,7 @@ set_bool_##value(struct device *dev, struct device_attribute *attr, \return -EINVAL ; \return count; \ } \ -static DEVICE_ATTR(value, S_IWUGO | S_IRUGO | S_IWUSR, \ +static DEVICE_ATTR(value, S_IRUGO | S_IWUSR, \ show_bool_##value, set_bool_##value);show_set_bool (wireless,ACER_CAP_WIRELESS );
@@ -982,7 +982,7 @@ static ssize_t show_interface(struct device *dev, struct device_attribute *attr, } } -static DEVICE_ATTR(interface, S_IWUGO | S_IRUGO | S_IWUSR, +static DEVICE_ATTR(interface, S_IRUGO | S_IWUSR, show_interface, NULL);/*
drivers/misc/tc1100-wmi.c +1 -1
@@ -179,7 +179,7 @@ set_bool_##value(struct device *dev, struct device_attribute *attr, \return -EINVAL ; \return count; \ } \ -static DEVICE_ATTR(value, S_IWUGO | S_IRUGO | S_IWUSR, \ +static DEVICE_ATTR(value, S_IRUGO | S_IWUSR, \ show_bool_##value, set_bool_##value);show_set_bool (wireless,TC1100_INSTANCE_WIRELESS );
drivers/net/myri10ge/myri10ge.c +1 -0
@@ -3480,6 +3480,7 @@ static void myri10ge_free_slices(struct myri10ge_priv *mgp)dma_free_coherent (&pdev->dev, bytes, ss->fw_stats, ss->fw_stats_bus); ss->fw_stats =NULL ; +netif_napi_del (&ss->napi); } }kfree (mgp->ss);
drivers/net/r8169.c +6 -0
@@ -23,6 +23,7 @@#include <linux/tcp.h> #include <linux/init.h> #include <linux/dma-mapping.h> +#include <linux/pci-aspm.h> #include <asm/system.h> #include <asm/io.h>
@@ -1618,6 +1619,11 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) mii->reg_num_mask =0x1f ; mii->supports_gmii = !!(cfg->features &RTL_FEATURE_GMII ); +/* disable ASPM completely as that cause random device stop working +* problems as well as full system hangs for some PCIe devices users */ +pci_disable_link_state (pdev,PCIE_LINK_STATE_L0S |PCIE_LINK_STATE_L1 | +PCIE_LINK_STATE_CLKPM ); +/* enable device (incl. PCI PM wakeup and hotplug setup) */ rc =pci_enable_device (pdev);if (rc <0 ) {
drivers/net/wireless/hostap/hostap_cs.c +2 -8
@@ -689,12 +689,6 @@ static int prism2_config(struct pcmcia_device *link) link->dev_node = &hw_priv->node;/* -* Make sure the IRQ handler cannot proceed until at least -* dev->base_addr is initialized. -*/ -spin_lock_irqsave (&local->irq_init_lock, flags); - -/* * Allocate an interrupt line. Note that this does not assign a * handler to the interrupt, unless the 'Handler' member of the * irq structure is initialized.
@@ -716,9 +710,10 @@ static int prism2_config(struct pcmcia_device *link)CS_CHECK (RequestConfiguration,pcmcia_request_configuration (link, &link->conf)); +/* IRQ handler cannot proceed until at dev->base_addr is initialized */ +spin_lock_irqsave (&local->irq_init_lock, flags); dev->irq = link->irq.AssignedIRQ; dev->base_addr = link->io.BasePort1; -spin_unlock_irqrestore (&local->irq_init_lock, flags);/* Finally, report what we've done */
@@ -751,7 +746,6 @@ static int prism2_config(struct pcmcia_device *link)return ret; cs_failed: -spin_unlock_irqrestore (&local->irq_init_lock, flags);cs_error (link, last_fn, last_ret); failed:
drivers/net/wireless/rt2x00/rt73usb.c +1 -0
@@ -2122,6 +2122,7 @@ static struct usb_device_id rt73usb_device_table[] = {/* Ralink */ { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt73usb_ops) }, { USB_DEVICE(0x148f, 0x2671), USB_DEVICE_DATA(&rt73usb_ops) }, + { USB_DEVICE(0x0812, 0x3101), USB_DEVICE_DATA(&rt73usb_ops) },/* Qcom */ { USB_DEVICE(0x18e8, 0x6196), USB_DEVICE_DATA(&rt73usb_ops) }, { USB_DEVICE(0x18e8, 0x6229), USB_DEVICE_DATA(&rt73usb_ops) },
drivers/pci/quirks.c +53 -8
83 lines not on this page · raw message
drivers/rtc/rtc-ds1511.c +1 -1
@@ -493,7 +493,7 @@ ds1511_nvram_write(struct kobject *kobj, struct bin_attribute *bin_attr,static struct bin_attribute ds1511_nvram_attr = { .attr = { .name ="nvram" , - .mode =S_IRUGO |S_IWUGO , + .mode =S_IRUGO |S_IWUSR , .owner =THIS_MODULE , }, .size =DS1511_RAM_MAX ,
drivers/s390/char/keyboard.c +2 -1
@@ -462,7 +462,8 @@ kbd_ioctl(struct kbd_data *kbd, struct file *file, unsigned int cmd, unsigned long arg) {void __user *argp; -int ct, perm; +unsigned int ct; +int perm; argp = (void __user *)arg;
drivers/scsi/libsas/sas_scsi_host.c +1 -0
@@ -648,6 +648,7 @@ void sas_scsi_recover_host(struct Scsi_Host *shost)spin_lock_irqsave (shost->host_lock, flags);list_splice_init (&shost->eh_cmd_q, &eh_work_q); + shost->host_eh_scheduled =0 ;spin_unlock_irqrestore (shost->host_lock, flags);SAS_DPRINTK ("Enter %s\n" , __func__);
drivers/scsi/sd.c +8 -1
@@ -971,6 +971,12 @@ static unsigned int sd_completed_bytes(struct scsi_cmnd *scmd)u64 end_lba = scmd->request->sector + (scsi_bufflen (scmd) /512 );u64 bad_lba;int info_valid; +/* +* resid is optional but mostly filled in. When it's unused, +* its value is zero, so we assume the whole buffer transferred +*/ +unsigned int transferred =scsi_bufflen (scmd) -scsi_get_resid (scmd); +unsigned int good_bytes;if (!blk_fs_request (scmd->request))return 0 ;
@@ -1004,7 +1010,8 @@ static unsigned int sd_completed_bytes(struct scsi_cmnd *scmd)/* This computation should always be done in terms of * the resolution of the device's medium. */ -return (bad_lba - start_lba) * scmd->device->sector_size; + good_bytes = (bad_lba - start_lba) * scmd->device->sector_size; +return min (good_bytes, transferred); }/**
drivers/scsi/ses.c +2 -2
@@ -558,9 +558,9 @@ static int ses_intf_add(struct device *cdev, len = (desc_ptr[2 ] <<8 ) + desc_ptr[3 ];/* skip past overall descriptor */ desc_ptr += len +4 ; -if (ses_dev->page10) - addl_desc_ptr = ses_dev->page10 +8 ; } +if (ses_dev->page10) + addl_desc_ptr = ses_dev->page10 +8 ; type_ptr = ses_dev->page1 +12 + ses_dev->page1[11 ]; components =0 ;for (i =0 ; i < types; i++, type_ptr +=4 ) {
drivers/serial/8250.c +2 -1
@@ -237,7 +237,8 @@ static const struct serial8250_config uart_config[] = { .fifo_size = 128, .tx_loadsz = 128, .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10, - .flags = UART_CAP_FIFO | UART_CAP_EFR | UART_CAP_SLEEP, +/* UART_CAP_EFR breaks billionon CF bluetooth card. */ + .flags = UART_CAP_FIFO | UART_CAP_SLEEP, }, [PORT_RSA] = { .name = "RSA",
drivers/usb/class/cdc-acm.c +2 -1
@@ -285,6 +285,8 @@ static void acm_ctrl_irq(struct urb *urb)if (!ACM_READY (acm)) goto exit; +usb_mark_last_busy (acm->dev); + data = (unsigned char *)(dr +1 );switch (dr->bNotificationType) {
@@ -319,7 +321,6 @@ static void acm_ctrl_irq(struct urb *urb)break ; } exit: -usb_mark_last_busy (acm->dev); retval =usb_submit_urb (urb,GFP_ATOMIC );if (retval) err ("%s - usb_submit_urb failed with result %d",
drivers/usb/core/hub.c +5 -0
@@ -2430,6 +2430,11 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, udev->ttport = hdev->ttport; }else if (udev->speed !=USB_SPEED_HIGH && hdev->speed ==USB_SPEED_HIGH ) { +if (!hub->tt.hub) { +dev_err (&udev->dev,"parent hub has no TT\n" ); + retval = -EINVAL ; + goto fail; + } udev->tt = &hub->tt; udev->ttport = port1; }
drivers/usb/gadget/printer.c +7 -7
@@ -116,31 +116,31 @@ static struct printer_dev usb_printer_gadget;* parameters are in UTF-8 (superset of ASCII's 7 bit characters). */ -static ushort __initdata idVendor; +static ushort idVendor;module_param (idVendor, ushort,S_IRUGO );MODULE_PARM_DESC (idVendor,"USB Vendor ID" ); -static ushort __initdata idProduct; +static ushort idProduct;module_param (idProduct, ushort,S_IRUGO );MODULE_PARM_DESC (idProduct,"USB Product ID" ); -static ushort __initdata bcdDevice; +static ushort bcdDevice;module_param (bcdDevice, ushort,S_IRUGO );MODULE_PARM_DESC (bcdDevice,"USB Device version (BCD)" ); -static char *__initdata iManufacturer; +static char *iManufacturer;module_param (iManufacturer, charp,S_IRUGO );MODULE_PARM_DESC (iManufacturer,"USB Manufacturer string" ); -static char *__initdata iProduct; +static char *iProduct;module_param (iProduct, charp,S_IRUGO );MODULE_PARM_DESC (iProduct,"USB Product string" ); -static char *__initdata iSerialNum; +static char *iSerialNum;module_param (iSerialNum, charp,S_IRUGO );MODULE_PARM_DESC (iSerialNum,"1" ); -static char *__initdata iPNPstring; +static char *iPNPstring;module_param (iPNPstring, charp,S_IRUGO );MODULE_PARM_DESC (iPNPstring,"MFG:linux;MDL:g_printer;CLS:PRINTER;SN:1;" );
drivers/usb/host/ehci-hcd.c +21 -7
@@ -103,6 +103,9 @@ MODULE_PARM_DESC (ignore_oc, "ignore bogus hardware overcurrent indications");#define INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT) +/* for ASPM quirk of ISOC on AMD SB800 */ +static struct pci_dev *amd_nb_dev; +/*-------------------------------------------------------------------------*/ #include "ehci.h"
@@ -450,6 +453,11 @@ static void ehci_stop (struct usb_hcd *hcd)spin_unlock_irq (&ehci->lock);ehci_mem_cleanup (ehci); +if (amd_nb_dev) { +pci_dev_put (amd_nb_dev); + amd_nb_dev =NULL ; + } +#ifdef EHCI_STATS ehci_dbg (ehci, "irq normal %ld err %ld reclaim %ld (lost %ld)\n", ehci->stats.normal, ehci->stats.error, ehci->stats.reclaim,
@@ -480,17 +488,29 @@ static int ehci_init(struct usb_hcd *hcd) ehci->iaa_watchdog.function = ehci_iaa_watchdog; ehci->iaa_watchdog.data = (unsigned long ) ehci; + hcc_params =ehci_readl (ehci, &ehci->caps->hcc_params); +/* * hw default: 1K periodic list heads, one per frame. * periodic_size can shrink by USBCMD update if hcc_params allows. */ ehci->periodic_size =DEFAULT_I_TDPS ;INIT_LIST_HEAD (&ehci->cached_itd_list); + +if (HCC_PGM_FRAMELISTLEN (hcc_params)) { +/* periodic schedule size can be smaller than default */ +switch (EHCI_TUNE_FLS ) { +case 0 : ehci->periodic_size =1024 ;break ; +case 1 : ehci->periodic_size =512 ;break ; +case 2 : ehci->periodic_size =256 ;break ; +default :BUG (); + } + } +if ((retval =ehci_mem_init (ehci,GFP_KERNEL )) <0 )return retval;/* controllers may cache some of the periodic schedule ... */ - hcc_params =ehci_readl (ehci, &ehci->caps->hcc_params);if (HCC_ISOC_CACHE (hcc_params))// full frame cache ehci->i_thresh =8 ;else // N microframes cached
@@ -538,12 +558,6 @@ static int ehci_init(struct usb_hcd *hcd)/* periodic schedule size can be smaller than default */ temp &= ~(3 <<2 ); temp |= (EHCI_TUNE_FLS <<2 ); -switch (EHCI_TUNE_FLS ) { -case 0 : ehci->periodic_size =1024 ;break ; -case 1 : ehci->periodic_size =512 ;break ; -case 2 : ehci->periodic_size =256 ;break ; -default :BUG (); - } } ehci->command = temp;
drivers/usb/host/ehci-pci.c +39 -0
@@ -61,6 +61,42 @@ static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev)return 0 ; } +static int ehci_quirk_amd_hudson (struct ehci_hcd *ehci) +{ +struct pci_dev *amd_smbus_dev; +u8 rev =0 ; + + amd_smbus_dev =pci_get_device (PCI_VENDOR_ID_ATI ,0x4385 ,NULL ); +if (amd_smbus_dev) { +pci_read_config_byte (amd_smbus_dev,PCI_REVISION_ID , &rev); +if (rev <0x40 ) { +pci_dev_put (amd_smbus_dev); + amd_smbus_dev =NULL ; +return 0 ; + } + }else { + amd_smbus_dev =pci_get_device (PCI_VENDOR_ID_AMD ,0x780b ,NULL ); +if (!amd_smbus_dev) +return 0 ; +pci_read_config_byte (amd_smbus_dev,PCI_REVISION_ID , &rev); +if (rev <0x11 || rev >0x18 ) { +pci_dev_put (amd_smbus_dev); + amd_smbus_dev =NULL ; +return 0 ; + } + } + +if (!amd_nb_dev) + amd_nb_dev =pci_get_device (PCI_VENDOR_ID_AMD ,0x1510 ,NULL ); + +ehci_info (ehci,"QUIRK: Enable exception for AMD Hudson ASPM\n" ); + +pci_dev_put (amd_smbus_dev); + amd_smbus_dev =NULL ; + +return 1 ; +} +/* called during probe() after chip reset completes */ static int ehci_pci_setup (struct usb_hcd *hcd) {
@@ -119,6 +155,9 @@ static int ehci_pci_setup(struct usb_hcd *hcd)/* cache this readonly data; minimize chip reads */ ehci->hcs_params =ehci_readl (ehci, &ehci->caps->hcs_params); +if (ehci_quirk_amd_hudson (ehci)) + ehci->amd_l1_fix =1 ; + retval =ehci_halt (ehci);if (retval)return retval;
drivers/usb/host/ehci-q.c +9 -18
@@ -285,7 +285,6 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)int stopped;unsigned count =0 ;u8 state; -__le32 halt =HALT_BIT (ehci);if (unlikely (list_empty (&qh->qtd_list)))return count;
@@ -381,7 +380,6 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) && !(qtd->hw_alt_next & EHCI_LIST_END(ehci))) { stopped =1 ; - goto halt; }/* stop scanning when we reach qtds the hc is using */
@@ -408,16 +406,6 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) && cpu_to_hc32(ehci, qtd->qtd_dma) == qh->hw_current) token =hc32_to_cpu (ehci, qh->hw_token); - -/* force halt for unlinked or blocked qh, so we'll -* patch the qh later and so that completions can't -* activate it while we "know" it's stopped. -*/ -if ((halt & qh->hw_token) ==0 ) { -halt: - qh->hw_token |= halt; -wmb (); - } }/* unless we already know the urb's status, collect qtd status
@@ -1150,24 +1138,27 @@ static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)static void scan_async (struct ehci_hcd *ehci) { +bool stopped;struct ehci_qh *qh;enum ehci_timer_action action =TIMER_IO_WATCHDOG ; ehci->stamp =ehci_readl (ehci, &ehci->regs->frame_index);timer_action_done (ehci,TIMER_ASYNC_SHRINK ); rescan: + stopped = !HC_IS_RUNNING (ehci_to_hcd (ehci)->state); qh = ehci->async->qh_next.qh;if (likely (qh !=NULL )) { do { /* clean any finished work for this qh */ - if (!list_empty (&qh->qtd_list) - && qh->stamp != ehci->stamp) { + if (!list_empty(&qh->qtd_list) && (stopped || + qh->stamp != ehci->stamp)) { int temp; /* unlinks could happen here; completion * reporting drops the lock. rescan using * the latest schedule, but don't rescan - * qhs we already finished (no looping). + * qhs we already finished (no looping) + * unless the controller is stopped. */ qh = qh_get (qh); qh->stamp = ehci->stamp;
@@ -1186,9 +1177,9 @@ rescan:*/ if (list_empty (&qh->qtd_list) && qh->qh_state ==QH_STATE_LINKED ) { -if (!ehci->reclaim - && ((ehci->stamp - qh->stamp) &0x1fff ) - >= (EHCI_SHRINK_FRAMES *8 )) +if (!ehci->reclaim && (stopped || + ((ehci->stamp - qh->stamp) &0x1fff ) + >=EHCI_SHRINK_FRAMES *8 ))start_unlink_async (ehci, qh);else action =TIMER_ASYNC_SHRINK ;
drivers/usb/host/ehci-sched.c +79 -0
109 lines not on this page · raw message
drivers/usb/host/ehci.h +1 -0
@@ -122,6 +122,7 @@ struct ehci_hcd { /* one per controller */ unsigned has_fsl_port_bug:1; /* FreeScale */ unsigned big_endian_mmio:1; unsigned big_endian_desc:1; + unsigned amd_l1_fix:1;u8 sbrn;/* packed release number */
drivers/usb/misc/iowarrior.c +1 -1
@@ -372,7 +372,7 @@ static ssize_t iowarrior_write(struct file *file,case USB_DEVICE_ID_CODEMERCS_IOWPV2 :case USB_DEVICE_ID_CODEMERCS_IOW40 :/* IOW24 and IOW40 use a synchronous call */ - buf =kmalloc (8 ,GFP_KERNEL );/* 8 bytes are enough for both products */ + buf =kmalloc (count,GFP_KERNEL );if (!buf) { retval = -ENOMEM ; goto exit;
drivers/usb/misc/uss720.c +3 -4
@@ -176,12 +176,11 @@ static struct uss720_async_request *submit_async_request(struct parport_uss720_pspin_lock_irqsave (&priv->asynclock, flags);list_add_tail (&rq->asynclist, &priv->asynclist);spin_unlock_irqrestore (&priv->asynclock, flags); +kref_get (&rq->ref_count); ret =usb_submit_urb (rq->urb, mem_flags); -if (!ret) { -kref_get (&rq->ref_count); +if (!ret)return rq; - } -kref_put (&rq->ref_count, destroy_async); +destroy_async (&rq->ref_count);err ("submit_async_request submit_urb failed with %d" , ret);return NULL ; }
drivers/usb/musb/omap2430.c +1 -0
@@ -312,6 +312,7 @@ static int musb_platform_resume(struct musb *musb)int musb_platform_exit (struct musb *musb) { +del_timer_sync (&musb_idle_timer);omap_vbus_power (musb,0 /*off*/ ,1 );
drivers/usb/serial/ch341.c +1 -0
@@ -29,6 +29,7 @@ static int debug;static struct usb_device_id id_table [] = { {USB_DEVICE (0x4348 ,0x5523 ) }, {USB_DEVICE (0x1a86 ,0x7523 ) }, + {USB_DEVICE (0x1a86 ,0x5523 ) }, { }, };MODULE_DEVICE_TABLE (usb, id_table);
drivers/usb/serial/io_edgeport.c +2 -2
@@ -2924,8 +2924,8 @@ static void load_application_firmware(struct edgeport_serial *edge_serial)dbg ("%s %d.%d.%d" , fw_info, rec->data[0 ], rec->data[1 ], build); - edge_serial->product_info.FirmwareMajorVersion = fw->data[0 ]; - edge_serial->product_info.FirmwareMinorVersion = fw->data[1 ]; + edge_serial->product_info.FirmwareMajorVersion = rec->data[0 ]; + edge_serial->product_info.FirmwareMinorVersion = rec->data[1 ]; edge_serial->product_info.FirmwareBuildNumber =cpu_to_le16 (build); for (rec = ihex_next_binrec(rec); rec;
drivers/usb/serial/pl2303.c +2 -0
@@ -59,6 +59,8 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_GPRS) }, + { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_HCR331) }, + { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MOTOROLA) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
drivers/usb/serial/pl2303.h +2 -0
@@ -16,6 +16,8 @@#define PL2303_PRODUCT_ID_ALDIGA 0x0611#define PL2303_PRODUCT_ID_MMX 0x0612#define PL2303_PRODUCT_ID_GPRS 0x0609 +#define PL2303_PRODUCT_ID_HCR331 0x331a +#define PL2303_PRODUCT_ID_MOTOROLA 0x0307#define ATEN_VENDOR_ID 0x0557#define ATEN_VENDOR_ID2 0x0547
drivers/usb/serial/ti_usb_3410_5052.c +1 -1
@@ -398,9 +398,9 @@ failed_1port: static void __exit ti_exit(void) { +usb_deregister (&ti_usb_driver);usb_serial_deregister (&ti_1port_device);usb_serial_deregister (&ti_2port_device); -usb_deregister (&ti_usb_driver); }
drivers/usb/storage/unusual_devs.h +16 -0
@@ -1314,6 +1314,15 @@ UNUSUAL_DEV( 0x084d, 0x0011, 0x0110, 0x0110, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_BULK32), +/* Reported by <[email protected]> +* The device reports a vendor-specific device class, requiring an +* explicit vendor/product match. +*/ +UNUSUAL_DEV (0x0851 ,0x1542 ,0x0002 ,0x0002 , +"MagicPixel" , +"FW_Omega2" , + US_SC_DEVICE, US_PR_DEVICE, NULL, 0), +/* Andrew Lunn <[email protected]> * PanDigital Digital Picture Frame. Does not like ALLOW_MEDIUM_REMOVAL * on LUN 4.
@@ -1607,6 +1616,13 @@ UNUSUAL_DEV( 0x0fca, 0x0006, 0x0001, 0x0001, US_FL_IGNORE_DEVICE ), #endif +/* Submitted by Nick Holloway */ +UNUSUAL_DEV (0x0f88 ,0x042e ,0x0100 ,0x0100 , +"VTech" , +"Kidizoom" , +US_SC_DEVICE ,US_PR_DEVICE ,NULL , +US_FL_FIX_CAPACITY ), +/* Reported by Michael Stattmann <[email protected]> */ UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000, "Sony Ericsson",
drivers/video/console/tileblit.c +1 -1
@@ -83,7 +83,7 @@ static void tile_cursor(struct vc_data *vc, struct fb_info *info, int mode, int softback_lines, int fg, int bg) { struct fb_tilecursor cursor; -int use_sw = (vc->vc_cursor_type &0x01 ); +int use_sw = (vc->vc_cursor_type &0x10 ); cursor.sx = vc->vc_x; cursor.sy = vc->vc_y;
drivers/virtio/virtio_pci.c +1 -0
@@ -347,6 +347,7 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev, goto out_req_regions;pci_set_drvdata (pci_dev, vp_dev); +pci_set_master (pci_dev);/* we use the subsystem vendor/device id as the virtio vendor/device * id. this allows us to use the same PCI vendor/device id for all
fs/aio.c +2 -2
@@ -478,7 +478,7 @@ static inline void really_put_req(struct kioctx *ctx, struct kiocb *req) ctx->reqs_active--;if (unlikely (!ctx->reqs_active && ctx->dead)) -wake_up (&ctx->wait); +wake_up_all (&ctx->wait); }static void aio_fput_routine (struct work_struct *data)
@@ -1257,7 +1257,7 @@ static void io_destroy(struct kioctx *ioctx)* by other CPUs at this point. Right now, we rely on the * locking done by the above calls to ensure this consistency. */ -wake_up (&ioctx->wait); +wake_up_all (&ioctx->wait);put_ioctx (ioctx);/* once for the lookup */ }
fs/compat.c +15 -13
@@ -1241,6 +1241,10 @@ static int compat_count(compat_uptr_t __user *argv, int max) argv++;if (++i > max)return -E2BIG ; + +if (fatal_signal_pending (current)) +return -ERESTARTNOHAND ; +cond_resched (); } }return i;
@@ -1282,6 +1286,12 @@ static int compat_copy_strings(int argc, compat_uptr_t __user *argv,while (len >0 ) {int offset, bytes_to_copy; +if (fatal_signal_pending (current)) { + ret = -ERESTARTNOHAND ; + goto out; + } +cond_resched (); + offset = pos %PAGE_SIZE ;if (offset ==0 ) offset =PAGE_SIZE ;
@@ -1298,18 +1308,8 @@ static int compat_copy_strings(int argc, compat_uptr_t __user *argv,if (!kmapped_page || kpos != (pos &PAGE_MASK )) {struct page *page; -#ifdef CONFIG_STACK_GROWSUP - ret =expand_stack_downwards (bprm->vma, pos); -if (ret <0 ) { -/* We've exceed the stack rlimit. */ - ret = -E2BIG ; - goto out; - } -#endif - ret =get_user_pages (current, bprm->mm, pos, -1 ,1 ,1 , &page,NULL ); -if (ret <=0 ) { -/* We've exceed the stack rlimit. */ + page =get_arg_page (bprm, pos,1 ); +if (!page) { ret = -E2BIG ; goto out; }
@@ -1425,8 +1425,10 @@ out:security_bprm_free (bprm); out_mm: -if (bprm->mm) +if (bprm->mm) { +acct_arg_size (bprm,0 );mmput (bprm->mm); + } out_file:if (bprm->file) {
fs/dquot.c +4 -7
@@ -365,7 +365,7 @@ out_iolock:*/ int dquot_commit (struct dquot *dquot) { -int ret =0 , ret2 =0 ; +int ret =0 ;struct quota_info *dqopt =sb_dqopt (dquot->dq_sb);mutex_lock (&dqopt->dqio_mutex);
@@ -377,13 +377,10 @@ int dquot_commit(struct dquot *dquot)spin_unlock (&dq_list_lock);/* Inactive dquot can be only if there was error during read/init * => we have better not writing it */ -if (test_bit (DQ_ACTIVE_B , &dquot->dq_flags)) { +if (test_bit (DQ_ACTIVE_B , &dquot->dq_flags)) ret = dqopt->ops[dquot->dq_type]->commit_dqblk (dquot); -if (info_dirty (&dqopt->info[dquot->dq_type])) - ret2 = dqopt->ops[dquot->dq_type]->write_file_info (dquot->dq_sb, dquot->dq_type); -if (ret >=0 ) - ret = ret2; - } +else + ret = -EIO ; out_sem:mutex_unlock (&dqopt->dqio_mutex);return ret;
fs/ecryptfs/keystore.c +1 -0
@@ -977,6 +977,7 @@ int ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key,printk (KERN_ERR "Could not find key with description: [%s]\n" , sig); rc =process_request_key_err (PTR_ERR (*auth_tok_key)); + (*auth_tok_key) =NULL ; goto out; } (*auth_tok) =ecryptfs_get_key_payload_data (*auth_tok_key);
fs/exec.c +27 -3
@@ -168,7 +168,22 @@ exit:#ifdef CONFIG_MMU -static struct page *get_arg_page (struct linux_binprm *bprm,unsigned long pos, +void acct_arg_size (struct linux_binprm *bprm,unsigned long pages) +{ +struct mm_struct *mm = current->mm; +long diff = (long )(pages - bprm->vma_pages); + +if (!mm || !diff) +return ; + + bprm->vma_pages = pages; + +down_write (&mm->mmap_sem); + mm->total_vm += diff; +up_write (&mm->mmap_sem); +} + +struct page *get_arg_page (struct linux_binprm *bprm,unsigned long pos,int write) {struct page *page;
@@ -190,6 +205,8 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start;struct rlimit *rlim; +acct_arg_size (bprm, size /PAGE_SIZE ); +/* * We've historically supported up to 32 pages (ARG_MAX) * of argument strings even with small stacks
@@ -291,7 +308,11 @@ static bool valid_arg_len(struct linux_binprm *bprm, long len)#else -static struct page *get_arg_page (struct linux_binprm *bprm,unsigned long pos, +void acct_arg_size (struct linux_binprm *bprm,unsigned long pages) +{ +} + +struct page *get_arg_page (struct linux_binprm *bprm,unsigned long pos,int write) {struct page *page;
@@ -995,6 +1016,7 @@ int flush_old_exec(struct linux_binprm * bprm)/* * Release all of the old mmap stuff */ +acct_arg_size (bprm,0 ); retval =exec_mmap (bprm->mm);if (retval) goto out;
@@ -1378,8 +1400,10 @@ out:security_bprm_free (bprm); out_mm: -if (bprm->mm) +if (bprm->mm) { +acct_arg_size (bprm,0 );mmput (bprm->mm); + } out_file:if (bprm->file) {
fs/ext2/namei.c +2 -7
@@ -322,7 +322,6 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, new_de =ext2_find_entry (new_dir, new_dentry, &new_page);if (!new_de) goto out_dir; -inode_inc_link_count (old_inode);ext2_set_link (new_dir, new_de, new_page, old_inode); new_inode->i_ctime =CURRENT_TIME_SEC ;if (dir_de)
@@ -334,12 +333,9 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry,if (new_dir->i_nlink >=EXT2_LINK_MAX ) goto out_dir; } -inode_inc_link_count (old_inode); err =ext2_add_link (new_dentry, old_inode); -if (err) { -inode_dec_link_count (old_inode); +if (err) goto out_dir; - }if (dir_de)inode_inc_link_count (new_dir); }
@@ -347,12 +343,11 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry,/* * Like most other Unix systems, set the ctime for inodes on a * rename. -* inode_dec_link_count() will mark the inode dirty. */ old_inode->i_ctime =CURRENT_TIME_SEC ; +mark_inode_dirty (old_inode);ext2_delete_entry (old_de, old_page); -inode_dec_link_count (old_inode);if (dir_de) {ext2_set_link (old_inode, dir_de, dir_page, new_dir);
fs/ext3/namei.c +1 -1
@@ -1555,8 +1555,8 @@ static int ext3_dx_add_entry(handle_t *handle, struct dentry *dentry, goto cleanup; node2 = (struct dx_node *)(bh2->b_data); entries2 = node2->entries; +memset (&node2->fake,0 ,sizeof (struct fake_dirent )); node2->fake.rec_len =ext3_rec_len_to_disk (sb->s_blocksize); - node2->fake.inode =0 ;BUFFER_TRACE (frame->bh,"get_write_access" ); err =ext3_journal_get_write_access (handle, frame->bh);if (err)
fs/ext3/super.c +7 -0
@@ -1362,6 +1362,13 @@ static void ext3_orphan_cleanup (struct super_block * sb,return ; } +/* Check if feature set allows readwrite operations */ +if (EXT3_HAS_RO_COMPAT_FEATURE (sb, ~EXT3_FEATURE_RO_COMPAT_SUPP )) { +printk (KERN_INFO "EXT3-fs: %s: Skipping orphan cleanup due to " +"unknown ROCOMPAT features\n" , sb->s_id); +return ; + } +if (EXT3_SB (sb)->s_mount_state &EXT3_ERROR_FS ) {if (es->s_last_orphan) jbd_debug(1, "Errors on filesystem, "
fs/ext4/inode.c +5 -6
@@ -4818,13 +4818,12 @@ static int ext4_indirect_trans_blocks(struct inode *inode, int nrblocks,/* if nrblocks are contiguous */ if (chunk) {/* -* With N contiguous data blocks, it need at most -* N/EXT4_ADDR_PER_BLOCK(inode->i_sb) indirect blocks -* 2 dindirect blocks -* 1 tindirect block +* With N contiguous data blocks, we need at most +* N/EXT4_ADDR_PER_BLOCK(inode->i_sb) + 1 indirect blocks, +* 2 dindirect blocks, and 1 tindirect block */ - indirects = nrblocks /EXT4_ADDR_PER_BLOCK (inode->i_sb); -return indirects +3 ; +return DIV_ROUND_UP (nrblocks, +EXT4_ADDR_PER_BLOCK (inode->i_sb)) +4 ; }/* * if nrblocks are not contiguous, worse case, each block touch
fs/gfs2/bmap.c +1 -1
@@ -537,7 +537,7 @@ static int gfs2_bmap_alloc(struct inode *inode, const sector_t lblock, *ptr++ =cpu_to_be64 (bn++);break ; } - }while (state !=ALLOC_DATA ); + }while ((state !=ALLOC_DATA ) || !dblock); ip->i_height = height;gfs2_add_inode_blocks (&ip->i_inode, alloced);
fs/nfs/direct.c +20 -14
@@ -397,15 +397,18 @@ static ssize_t nfs_direct_read_schedule_iovec(struct nfs_direct_req *dreq, pos += vec->iov_len; } +/* +* If no bytes were started, return the error, and let the +* generic layer handle the completion. +*/ +if (requested_bytes ==0 ) { +nfs_direct_req_release (dreq); +return result <0 ? result : -EIO ; + } +if (put_dreq (dreq))nfs_direct_complete (dreq); - -if (requested_bytes !=0 ) -return 0 ; - -if (result <0 ) -return result; -return -EIO ; +return 0 ; } static ssize_t nfs_direct_read(struct kiocb *iocb, const struct iovec *iov,
@@ -817,15 +820,18 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq, pos += vec->iov_len; } +/* +* If no bytes were started, return the error, and let the +* generic layer handle the completion. +*/ +if (requested_bytes ==0 ) { +nfs_direct_req_release (dreq); +return result <0 ? result : -EIO ; + } +if (put_dreq (dreq))nfs_direct_write_complete (dreq, dreq->inode); - -if (requested_bytes !=0 ) -return 0 ; - -if (result <0 ) -return result; -return -EIO ; +return 0 ; } static ssize_t nfs_direct_write(struct kiocb *iocb, const struct iovec *iov,
fs/nfs/file.c +1 -1
@@ -218,7 +218,7 @@ static int nfs_do_fsync(struct nfs_open_context *ctx, struct inode *inode) have_error |=test_bit (NFS_CONTEXT_ERROR_WRITE , &ctx->flags);if (have_error) ret =xchg (&ctx->error,0 ); -if (!ret) +if (!ret && status <0 ) ret = status;return ret; }
fs/nfsd/lockd.c +0 -1
@@ -44,7 +44,6 @@ nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp)exp_readlock (); nfserr =nfsd_open (rqstp, &fh,S_IFREG ,NFSD_MAY_LOCK , filp);fh_put (&fh); - rqstp->rq_client =NULL ;exp_readunlock ();/* We return nlm error codes as nlm doesn't know * about nfsd, but nfsd does know about nlm..
fs/nfsd/nfs4xdr.c +4 -4
@@ -335,8 +335,8 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, struct iattr *iaREAD_BUF (dummy32); len += (XDR_QUADLEN (dummy32) <<2 );READMEM (buf, dummy32); -if ((host_err =nfsd_map_name_to_uid (argp->rqstp, buf, dummy32, &iattr->ia_uid))) - goto out_nfserr; +if ((status =nfsd_map_name_to_uid (argp->rqstp, buf, dummy32, &iattr->ia_uid))) +return status; iattr->ia_valid |=ATTR_UID ; }if (bmval[1 ] &FATTR4_WORD1_OWNER_GROUP ) {
@@ -346,8 +346,8 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, struct iattr *iaREAD_BUF (dummy32); len += (XDR_QUADLEN (dummy32) <<2 );READMEM (buf, dummy32); -if ((host_err =nfsd_map_name_to_gid (argp->rqstp, buf, dummy32, &iattr->ia_gid))) - goto out_nfserr; +if ((status =nfsd_map_name_to_gid (argp->rqstp, buf, dummy32, &iattr->ia_gid))) +return status; iattr->ia_valid |=ATTR_GID ; }if (bmval[1 ] &FATTR4_WORD1_TIME_ACCESS_SET ) {
fs/nfsd/vfs.c +1 -1
@@ -805,7 +805,7 @@ nfsd_get_raparms(dev_t dev, ino_t ino)if (ra->p_count ==0 ) frap = rap; } - depth = nfsdstats.ra_size*11 /10 ; + depth = nfsdstats.ra_size;if (!frap) {spin_unlock (&rab->pb_lock);return NULL ;
fs/ocfs2/aops.c +6 -0
@@ -1099,6 +1099,12 @@ static int ocfs2_prepare_page_for_write(struct inode *inode, u64 *p_blkno,ocfs2_figure_cluster_boundaries (OCFS2_SB (inode->i_sb), cpos, &cluster_start, &cluster_end); +/* treat the write as new if the a hole/lseek spanned across +* the page boundary. +*/ + new = new | ((i_size_read (inode) <=page_offset (page)) && + (page_offset (page) <= user_pos)); +if (page == wc->w_target_page) { map_from = user_pos & (PAGE_CACHE_SIZE -1 ); map_to = map_from + user_len;
fs/ocfs2/stack_user.c +1 -1
@@ -190,7 +190,7 @@ static struct ocfs2_live_connection *ocfs2_connection_find(const char *name)return c; } -return c; +return NULL ; }/*
fs/partitions/ldm.c +5 -0
@@ -251,6 +251,11 @@ static bool ldm_parse_vmdb (const u8 *data, struct vmdb *vm) } vm->vblk_size =get_unaligned_be32 (data +0x08 ); +if (vm->vblk_size ==0 ) { +ldm_error ("Illegal VBLK size" ); +return false; + } + vm->vblk_offset =get_unaligned_be32 (data +0x0C ); vm->last_vblk_seq =get_unaligned_be32 (data +0x04 );
fs/partitions/mac.c +9 -8
@@ -29,10 +29,9 @@ static inline void mac_fix_string(char *stg, int len)int mac_partition (struct parsed_partitions *state,struct block_device *bdev) { -int slot =1 ;Sector sect;unsigned char *data; -int blk, blocks_in_map; +int slot, blocks_in_map;unsigned secsize;#ifdef CONFIG_PPC_PMAC int found_root =0 ;
@@ -59,10 +58,14 @@ int mac_partition(struct parsed_partitions *state, struct block_device *bdev)put_dev_sector (sect);return 0 ;/* not a MacOS disk */ } -printk (" [mac]" ); blocks_in_map =be32_to_cpu (part->map_count); -for (blk =1 ; blk <= blocks_in_map; ++blk) { -int pos = blk * secsize; +if (blocks_in_map <0 || blocks_in_map >=MAX_PART ) { +put_dev_sector (sect); +return 0 ; + } +printk (" [mac]" ); +for (slot =1 ; slot <= blocks_in_map; ++slot) { +int pos = slot * secsize;put_dev_sector (sect); data =read_dev_sector (bdev, pos/512 , §);if (!data)
@@ -113,13 +116,11 @@ int mac_partition(struct parsed_partitions *state, struct block_device *bdev) }if (goodness > found_root_goodness) { - found_root = blk; + found_root = slot; found_root_goodness = goodness; } }#endif /* CONFIG_PPC_PMAC */ - - ++slot; }#ifdef CONFIG_PPC_PMAC if (found_root_goodness)
fs/proc/array.c +2 -5
@@ -331,9 +331,6 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,task_sig (m, task);task_cap (m, task);cpuset_task_status_allowed (m, task); -#if defined(CONFIG_S390 ) -task_show_regs (m, task); -#endif task_context_switch_counts (m, task);return 0 ; }
@@ -474,8 +471,8 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, vsize, mm ?get_mm_rss (mm) :0 , rsslim, - mm ? mm->start_code :0 , - mm ? mm->end_code :0 , + mm ? (permitted ? mm->start_code :1 ) :0 , + mm ? (permitted ? mm->end_code :1 ) :0 , (permitted && mm) ? mm->start_stack :0 , esp, eip,
fs/proc/base.c +7 -2
@@ -2734,11 +2734,16 @@ static int proc_pid_fill_cache(struct file *filp, void *dirent, filldir_t filldi/* for the /proc/ directory itself, after non-process stuff has been done */ int proc_pid_readdir (struct file * filp,void * dirent,filldir_t filldir) { -unsigned int nr = filp->f_pos -FIRST_PROCESS_ENTRY ; -struct task_struct *reaper =get_proc_task (filp->f_path.dentry->d_inode); +unsigned int nr; +struct task_struct *reaper;struct tgid_iter iter;struct pid_namespace *ns; +if (filp->f_pos >=PID_MAX_LIMIT +TGID_OFFSET ) + goto out_no_task; + nr = filp->f_pos -FIRST_PROCESS_ENTRY ; + + reaper =get_proc_task (filp->f_path.dentry->d_inode);if (!reaper) goto out_no_task;
fs/proc/task_mmu.c +2 -2
@@ -241,8 +241,8 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)const char *name =arch_vma_name (vma);if (!name) {if (mm) { -if (vma->vm_start <= mm->start_brk && - vma->vm_end >= mm->brk) { +if (vma->vm_start <= mm->brk && + vma->vm_end >= mm->start_brk) { name ="[heap]" ; }else if (vma->vm_start <= mm->start_stack && vma->vm_end >= mm->start_stack) {
fs/ramfs/file-nommu.c +3 -0
@@ -114,6 +114,9 @@ int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize)if (!pagevec_add (&lru_pvec, page))__pagevec_lru_add (&lru_pvec); +/* prevent the page from being discarded on memory pressure */ +SetPageDirty (page); +unlock_page (page); }
fs/ubifs/commit.c +1 -1
@@ -517,7 +517,7 @@ int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot)size_t sz;if (!(ubifs_chk_flags &UBIFS_CHK_OLD_IDX )) - goto out; +return 0 ;INIT_LIST_HEAD (&list);
fs/ubifs/file.c +3 -0
@@ -1009,6 +1009,9 @@ int ubifs_fsync(struct file *file, struct dentry *dentry, int datasync)dbg_gen ("syncing inode %lu" , inode->i_ino); +if (inode->i_sb->s_flags &MS_RDONLY ) +return 0 ; +/* * VFS has already synchronized dirty pages for this inode. Synchronize * the inode unless this is a 'datasync()' call.
fs/ubifs/lpt.c +3 -4
@@ -1240,10 +1240,9 @@ static int read_pnode(struct ubifs_info *c, struct ubifs_nnode *parent, int iip) lnum = branch->lnum; offs = branch->offs; pnode =kzalloc (sizeof (struct ubifs_pnode ),GFP_NOFS ); -if (!pnode) { - err = -ENOMEM ; - goto out; - } +if (!pnode) +return -ENOMEM ; +if (lnum ==0 ) {/* * This pnode was not written which just means that the LEB
fs/xfs/linux-2.6/xfs_ioctl.c +8 -3
@@ -762,14 +762,19 @@ xfs_ioc_fsgeometry_v1( xfs_mount_t *mp, void __user *arg) { -xfs_fsop_geom_v1_t fsgeo; +xfs_fsop_geom_t fsgeo;int error; - error =xfs_fs_geometry (mp, (xfs_fsop_geom_t *)&fsgeo,3 ); + error =xfs_fs_geometry (mp, &fsgeo,3 );if (error)return -error; -if (copy_to_user (arg, &fsgeo,sizeof (fsgeo))) +/* +* Caller should have passed an argument of type +* xfs_fsop_geom_v1_t. This is a proper subset of the +* xfs_fsop_geom_t that xfs_fs_geometry() fills in. +*/ +if (copy_to_user (arg, &fsgeo,sizeof (xfs_fsop_geom_v1_t)))return -XFS_ERROR (EFAULT );return 0 ; }
fs/xfs/xfs_fsops.c +3 -0
@@ -56,6 +56,9 @@ xfs_fs_geometry(xfs_fsop_geom_t *geo, int new_version) { + + memset(geo, 0, sizeof(*geo)); + geo->blocksize = mp->m_sb.sb_blocksize; geo->rtextsize = mp->m_sb.sb_rextsize; geo->agblocks = mp->m_sb.sb_agblocks;
include/asm-x86/mach-default/smpboot_hooks.h +1 -1
@@ -32,7 +32,7 @@ static inline void smpboot_restore_warm_reset_vector(void)*/ CMOS_WRITE (0 ,0xf ); - *((volatile long *)phys_to_virt (0x467 )) =0 ; + *((volatile u32 *)phys_to_virt (0x467 )) =0 ; }static inline void __init smpboot_setup_io_apic (void )
include/asm-x86/mmu_context_32.h +3 -2
@@ -17,8 +17,6 @@ static inline void switch_mm(struct mm_struct *prev,int cpu =smp_processor_id ();if (likely (prev != next)) { -/* stop flush ipis for the previous mm */ -cpu_clear (cpu, prev->cpu_vm_mask);#ifdef CONFIG_SMP per_cpu (cpu_tlbstate, cpu).state =TLBSTATE_OK ;per_cpu (cpu_tlbstate, cpu).active_mm = next;
@@ -28,6 +26,9 @@ static inline void switch_mm(struct mm_struct *prev,/* Re-load page tables */ load_cr3 (next->pgd); +/* stop flush ipis for the previous mm */ +cpu_clear (cpu, prev->cpu_vm_mask); +/* * load the LDT, if the LDT is different: */
include/asm-x86/mmu_context_64.h +3 -2
@@ -16,8 +16,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, {unsigned cpu =smp_processor_id ();if (likely (prev != next)) { -/* stop flush ipis for the previous mm */ -cpu_clear (cpu, prev->cpu_vm_mask);#ifdef CONFIG_SMP write_pda (mmu_state,TLBSTATE_OK );write_pda (active_mm, next);
@@ -25,6 +23,9 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,cpu_set (cpu, next->cpu_vm_mask);load_cr3 (next->pgd); +/* stop flush ipis for the previous mm */ +cpu_clear (cpu, prev->cpu_vm_mask); +if (unlikely (next->context.ldt != prev->context.ldt))load_LDT_nolock (&next->context); }
include/asm-x86/pgtable-3level.h +3 -8
@@ -101,8 +101,6 @@ static inline void native_pmd_clear(pmd_t *pmd)static inline void pud_clear (pud_t *pudp) { -unsigned long pgd; -set_pud (pudp,__pud (0 ));/*
@@ -111,13 +109,10 @@ static inline void pud_clear(pud_t *pudp)* section 8.1: in PAE mode we explicitly have to flush the * TLB via cr3 if the top-level pgd is changed... * -* Make sure the pud entry we're updating is within the -* current pgd to avoid unnecessary TLB flushes. +* Currently all places where pud_clear() is called either have +* flush_tlb_mm() followed or don't need TLB flush (x86_64 code or +* pud_clear_bad()), so we don't need TLB flush here. */ - pgd =read_cr3 (); -if (__pa (pudp) >= pgd &&__pa (pudp) < - (pgd +sizeof (pgd_t)*PTRS_PER_PGD )) -write_cr3 (pgd); }#define pud_page (pud) ((struct page *) __va(pud_val(pud) & PTE_PFN_MASK))
include/drm/drm_pciids.h +0 -1
@@ -27,7 +27,6 @@ {0x1002, 0x4156, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV350}, \ {0x1002, 0x4237, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS200|RADEON_IS_IGP}, \ {0x1002, 0x4242, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \ - {0x1002, 0x4243, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \ {0x1002, 0x4336, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS100|RADEON_IS_IGP|RADEON_IS_MOBILITY}, \ {0x1002, 0x4337, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS200|RADEON_IS_IGP|RADEON_IS_MOBILITY}, \ {0x1002, 0x4437, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS200|RADEON_IS_IGP|RADEON_IS_MOBILITY}, \
include/linux/binfmts.h +5 -0
@@ -28,6 +28,7 @@ struct linux_binprm{char buf[BINPRM_BUF_SIZE ];#ifdef CONFIG_MMU struct vm_area_struct *vma; +unsigned long vma_pages;#else # define MAX_ARG_PAGES 32struct page *page[MAX_ARG_PAGES ];
@@ -52,6 +53,10 @@ struct linux_binprm{unsigned long loader, exec; }; +extern void acct_arg_size (struct linux_binprm *bprm,unsigned long pages); +extern struct page *get_arg_page (struct linux_binprm *bprm,unsigned long pos, +int write); +#define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0#define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT)
include/linux/pid.h +1 -1
@@ -117,7 +117,7 @@ extern struct pid *find_vpid(int nr);*/ extern struct pid *find_get_pid (int nr);extern struct pid *find_ge_pid (int nr,struct pid_namespace *); -int next_pidmap (struct pid_namespace *pid_ns,int last); +int next_pidmap (struct pid_namespace *pid_ns,unsigned int last);extern struct pid *alloc_pid (struct pid_namespace *ns);extern void free_pid (struct pid *pid);
include/net/sctp/command.h +1 -0
@@ -105,6 +105,7 @@ typedef enum {SCTP_CMD_ASSOC_SHKEY ,/* generate the association shared keys */ SCTP_CMD_T1_RETRAN ,/* Mark for retransmission after T1 timeout */ SCTP_CMD_UPDATE_INITTAG ,/* Update peer inittag */ +SCTP_CMD_SEND_NEXT_ASCONF ,/* Send the next ASCONF after ACK */ SCTP_CMD_LAST } sctp_verb_t;
include/scsi/scsi_device.h +1 -1
@@ -422,7 +422,7 @@ static inline int scsi_device_qas(struct scsi_device *sdev) }static inline int scsi_device_enclosure (struct scsi_device *sdev) { -return sdev->inquiry[6 ] & (1 <<6 ); +return sdev->inquiry ? (sdev->inquiry[6 ] & (1 <<6 )) :1 ; }static inline int scsi_device_protection (struct scsi_device *sdev)
include/sound/soc-dapm.h +8 -8
@@ -46,25 +46,25 @@/* platform domain */ #define SND_SOC_DAPM_INPUT (wname) \ { .id = snd_soc_dapm_input, .name = wname, .kcontrols = NULL, \ - .num_kcontrols = 0} + .num_kcontrols = 0, .reg = SND_SOC_NOPM }#define SND_SOC_DAPM_OUTPUT (wname) \ { .id = snd_soc_dapm_output, .name = wname, .kcontrols = NULL, \ - .num_kcontrols = 0} + .num_kcontrols = 0, .reg = SND_SOC_NOPM }#define SND_SOC_DAPM_MIC (wname, wevent) \ { .id = snd_soc_dapm_mic, .name = wname, .kcontrols = NULL, \ - .num_kcontrols = 0, .event = wevent, \ + .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD}#define SND_SOC_DAPM_HP (wname, wevent) \ { .id = snd_soc_dapm_hp, .name = wname, .kcontrols = NULL, \ - .num_kcontrols = 0, .event = wevent, \ + .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD}#define SND_SOC_DAPM_SPK (wname, wevent) \ { .id = snd_soc_dapm_spk, .name = wname, .kcontrols = NULL, \ - .num_kcontrols = 0, .event = wevent, \ + .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD}#define SND_SOC_DAPM_LINE (wname, wevent) \ { .id = snd_soc_dapm_line, .name = wname, .kcontrols = NULL, \ - .num_kcontrols = 0, .event = wevent, \ + .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD}/* path domain */
@@ -115,11 +115,11 @@/* events that are pre and post DAPM */ #define SND_SOC_DAPM_PRE (wname, wevent) \ { .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \ - .num_kcontrols = 0, .event = wevent, \ + .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD}#define SND_SOC_DAPM_POST (wname, wevent) \ { .id = snd_soc_dapm_post, .name = wname, .kcontrols = NULL, \ - .num_kcontrols = 0, .event = wevent, \ + .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD}/* stream domain */
init/calibrate.c +3 -3
@@ -66,7 +66,7 @@ static unsigned long __cpuinit calibrate_delay_direct(void) pre_start =0 ;read_current_timer (&start); start_jiffies = jiffies; -while (jiffies <= (start_jiffies +1 )) { +while (time_before_eq (jiffies, start_jiffies +1 )) { pre_start = start;read_current_timer (&start); }
@@ -74,8 +74,8 @@ static unsigned long __cpuinit calibrate_delay_direct(void) pre_end =0 ; end = post_start; -while (jiffies <= - (start_jiffies +1 +DELAY_CALIBRATION_TICKS )) { +while (time_before_eq (jiffies, start_jiffies +1 + +DELAY_CALIBRATION_TICKS )) { pre_end = end;read_current_timer (&end); }
kernel/irq/manage.c +1 -1
@@ -629,7 +629,7 @@ int request_irq(unsigned int irq, irq_handler_t handler, action->next =NULL ; action->dev_id = dev_id; -#ifdef CONFIG_DEBUG_SHIRQ +#ifdef CONFIG_DEBUG_SHIRQ_FIXME if (irqflags &IRQF_SHARED ) {/* * It's a shared IRQ -- the driver ought to be prepared for it
kernel/kgdb.c +3 -6
@@ -1001,10 +1001,8 @@ static void gdb_cmd_query(struct kgdb_state *ks)switch (remcom_in_buffer[1 ]) {case 's' :case 'f' : -if (memcmp (remcom_in_buffer +2 ,"ThreadInfo" ,10 )) { -error_packet (remcom_out_buffer, -EINVAL ); +if (memcmp (remcom_in_buffer +2 ,"ThreadInfo" ,10 ))break ; - } i =0 ; remcom_out_buffer[0 ] ='m' ;
@@ -1045,10 +1043,9 @@ static void gdb_cmd_query(struct kgdb_state *ks)pack_threadid (remcom_out_buffer +2 , thref);break ;case 'T' : -if (memcmp (remcom_in_buffer +1 ,"ThreadExtraInfo," ,16 )) { -error_packet (remcom_out_buffer, -EINVAL ); +if (memcmp (remcom_in_buffer +1 ,"ThreadExtraInfo," ,16 ))break ; - } + ks->threadid =0 ; ptr = remcom_in_buffer +17 ;kgdb_hex2long (&ptr, &ks->threadid);
kernel/pid.c +4 -1
@@ -182,11 +182,14 @@ static int alloc_pidmap(struct pid_namespace *pid_ns)return -1 ; } -int next_pidmap (struct pid_namespace *pid_ns,int last) +int next_pidmap (struct pid_namespace *pid_ns,unsigned int last) {int offset;struct pidmap *map, *end; +if (last >=PID_MAX_LIMIT ) +return -1 ; + offset = (last +1 ) &BITS_PER_PAGE_MASK ; map = &pid_ns->pidmap[(last +1 )/BITS_PER_PAGE ]; end = &pid_ns->pidmap[PIDMAP_ENTRIES ];
kernel/ptrace.c +1 -1
@@ -213,7 +213,7 @@ static inline void __ptrace_detach(struct task_struct *child, unsigned int data)__ptrace_unlink (child);/* .. and wake it up. */ if (child->exit_state !=EXIT_ZOMBIE ) -wake_up_process (child); +wake_up_state (child,TASK_TRACED |TASK_STOPPED ); }int ptrace_detach (struct task_struct *child,unsigned int data)
kernel/signal.c +6 -2
@@ -2294,9 +2294,13 @@ SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig,return -EFAULT ;/* Not even root can pretend to send signals from the kernel. -Nor can they impersonate a kill(), which adds source info. */ -if (info.si_code >=0 ) +* Nor can they impersonate a kill()/tgkill(), which adds source info. +*/ +if (info.si_code >=0 || info.si_code ==SI_TKILL ) { +/* We used to allow any < 0 si_code */ +WARN_ON_ONCE (info.si_code <0 );return -EPERM ; + } info.si_signo = sig;/* POSIX.1b doesn't mention process groups. */
mm/mremap.c +14 -5
@@ -89,9 +89,7 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,*/ mapping = vma->vm_file->f_mapping;spin_lock (&mapping->i_mmap_lock); -if (new_vma->vm_truncate_count && - new_vma->vm_truncate_count != vma->vm_truncate_count) - new_vma->vm_truncate_count =0 ; + new_vma->vm_truncate_count =0 ; }/*
@@ -335,10 +333,21 @@ unsigned long do_mremap(unsigned long addr,/* We can't remap across vm area boundaries */ if (old_len > vma->vm_end - addr) goto out; -if (vma->vm_flags & (VM_DONTEXPAND |VM_PFNMAP )) { -if (new_len > old_len) + +/* Need to be careful about a growing mapping */ +if (new_len > old_len) { +unsigned long pgoff; + +if (vma->vm_flags & (VM_DONTEXPAND |VM_PFNMAP )) goto out; + pgoff = (addr - vma->vm_start) >>PAGE_SHIFT ; + pgoff += vma->vm_pgoff; +if (pgoff + (new_len >>PAGE_SHIFT ) < pgoff) { + ret = -EINVAL ; + goto out; + } } +if (vma->vm_flags &VM_LOCKED ) {unsigned long locked, lock_limit; locked = mm->locked_vm <<PAGE_SHIFT ;
mm/shmem.c +1 -0
@@ -2600,5 +2600,6 @@ int shmem_zero_setup(struct vm_area_struct *vma)fput (vma->vm_file); vma->vm_file = file; vma->vm_ops = &shmem_vm_ops; + vma->vm_flags |=VM_CAN_NONLINEAR ;return 0 ; }
net/ax25/af_ax25.c +1 -1
@@ -1384,6 +1384,7 @@ static int ax25_getname(struct socket *sock, struct sockaddr *uaddr,ax25_cb *ax25;int err =0 ; +memset (fsa,0 ,sizeof (*fsa));lock_sock (sk); ax25 =ax25_sk (sk);
@@ -1395,7 +1396,6 @@ static int ax25_getname(struct socket *sock, struct sockaddr *uaddr, fsa->fsa_ax25.sax25_family =AF_AX25 ; fsa->fsa_ax25.sax25_call = ax25->dest_addr; - fsa->fsa_ax25.sax25_ndigis =0 ;if (ax25->digipeat !=NULL ) { ndigi = ax25->digipeat->ndigi;
net/bluetooth/bnep/sock.c +1 -0
@@ -93,6 +93,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned longsockfd_put (nsock);return -EBADFD ; } + ca.device[sizeof (ca.device)-1 ] =0 ; err =bnep_add_connection (&ca, nsock);if (!err) {
net/bluetooth/sco.c +1 -0
@@ -710,6 +710,7 @@ static int sco_sock_getsockopt(struct socket *sock, int level, int optname, charbreak ; } +memset (&cinfo,0 ,sizeof (cinfo)); cinfo.hci_handle =sco_pi (sk)->conn->hcon->handle;memcpy (cinfo.dev_class,sco_pi (sk)->conn->hcon->dev_class,3 );
net/bridge/netfilter/ebtables.c +2 -0
@@ -944,6 +944,8 @@ static int do_replace(void __user *user, unsigned int len)if (tmp.num_counters >=INT_MAX /sizeof (struct ebt_counter ))return -ENOMEM ; + tmp.name[sizeof (tmp.name) -1 ] =0 ; + countersize =COUNTER_OFFSET (tmp.nentries) * nr_cpu_ids; newinfo =vmalloc (sizeof (*newinfo) + countersize);if (!newinfo)
net/can/bcm.c +2 -2
@@ -121,7 +121,7 @@ struct bcm_sock {struct list_head tx_ops;unsigned long dropped_usr_msgs;struct proc_dir_entry *bcm_proc_read; -char procname [20 ];/* pointer printed in ASCII with \0 */ +char procname [32 ];/* inode number in decimal with \0 */ };static inline struct bcm_sock *bcm_sk (const struct sock *sk)
@@ -1479,7 +1479,7 @@ static int bcm_connect(struct socket *sock, struct sockaddr *uaddr, int len,if (proc_dir) {/* unique socket address as filename */ -sprintf (bo->procname,"%p" , sock); +sprintf (bo->procname,"%lu" ,sock_i_ino (sk)); bo->bcm_proc_read =create_proc_read_entry (bo->procname,0644 , proc_dir, bcm_read_proc, sk);
net/core/filter.c +35 -29
176 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.