Linux 2.6.25.16
Subsystems (22)
We (the -stable team) are announcing the release of the 2.6.25.16 kernel.
It contains lots of bugfixes, all over the map. Any users of the 2.6.25 kernel series should upgrade to this version. For details on the fixes, see the changelog entries and the diffstat below.
I'll also be replying to this message with a copy of the patch between 2.6.25.15 and 2.6.25.16
The updated 2.6.25.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.25.y.git
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.25.y.git;a=summarythanks,
greg k-h
-------------
Makefile | 2 - arch/sparc64/kernel/signal.c | 6 ++- arch/um/Makefile | 1 arch/um/Makefile-i386 | 7 +++ arch/um/Makefile-x86_64 | 3 + arch/um/drivers/chan_user.c | 1 arch/um/drivers/cow_sys.h | 2 - arch/um/drivers/daemon_user.c | 4 +- arch/um/drivers/fd.c | 2 - arch/um/drivers/mcast_user.c | 3 + arch/um/drivers/net_user.c | 2 - arch/um/drivers/pcap_user.c | 2 - arch/um/drivers/port_user.c | 2 - arch/um/drivers/pty.c | 2 - arch/um/drivers/slip_user.c | 2 - arch/um/drivers/tty.c | 2 - arch/um/drivers/xterm.c | 2 - arch/um/include/init.h | 8 ++++ arch/um/include/os.h | 2 - arch/um/include/process.h | 4 +- arch/um/include/um_malloc.h | 9 +--- arch/um/kernel/mem.c | 5 ++ arch/um/kernel/time.c | 4 +- arch/um/kernel/um_arch.c | 7 ++- arch/um/os-Linux/drivers/ethertap_user.c | 4 +- arch/um/os-Linux/helper.c | 5 +- arch/um/os-Linux/main.c | 2 - arch/um/os-Linux/sigio.c | 4 +- arch/um/os-Linux/signal.c | 1 arch/um/os-Linux/skas/process.c | 2 - arch/um/os-Linux/start_up.c | 25 ++++++++---- arch/um/os-Linux/sys-i386/task_size.c | 38 ++++++++++++++----- arch/um/os-Linux/sys-x86_64/task_size.c | 2 - arch/um/os-Linux/time.c | 61 ++++++++++++++++++++++++++++--- arch/um/sys-x86_64/ksyms.c | 5 ++ arch/x86/boot/boot.h | 8 ++++ arch/x86/boot/cpucheck.c | 8 ---- arch/x86/boot/main.c | 4 ++ block/scsi_ioctl.c | 2 - drivers/i2c/i2c-core.c | 4 +- drivers/ide/ide-cd.c | 18 +++++---- drivers/misc/acer-wmi.c | 19 +++++++++ drivers/net/r8169.c | 6 ++- drivers/scsi/hptiop.c | 7 +++ drivers/scsi/qla2xxx/qla_attr.c | 43 ++++++++++++++------- drivers/scsi/qla2xxx/qla_def.h | 1 drivers/scsi/qla2xxx/qla_gbl.h | 2 + drivers/scsi/qla2xxx/qla_init.c | 16 ++------ drivers/scsi/qla2xxx/qla_os.c | 55 ++++++++++++++++++++------- drivers/scsi/scsi_transport_spi.c | 8 ++-- drivers/scsi/ses.c | 18 +++++++-- drivers/usb/serial/ftdi_sio.c | 5 ++ drivers/usb/serial/ftdi_sio.h | 6 +++ drivers/usb/serial/pl2303.c | 1 drivers/usb/serial/pl2303.h | 4 -- drivers/usb/serial/usb-serial.c | 7 +-- drivers/usb/storage/unusual_devs.h | 18 ++++++++- drivers/video/aty/radeon_accel.c | 12 +++++- drivers/video/matrox/matroxfb_maven.c | 2 - fs/cifs/asn1.c | 2 - fs/cifs/cifsfs.c | 2 + fs/cifs/inode.c | 1 include/asm-sparc64/futex.h | 2 - include/asm-x86/spinlock.h | 4 +- include/linux/usb/serial.h | 3 + include/video/radeon.h | 9 +++- kernel/posix-timers.c | 19 +++++++-- kernel/relay.c | 12 +++++- kernel/signal.c | 1 lib/random32.c | 48 +++++++++++++----------- mm/memory.c | 16 ++++++-- mm/mlock.c | 2 - net/dccp/proto.c | 5 ++ net/ipv4/ipvs/ip_vs_est.c | 7 ++- net/ipv4/netfilter/nf_nat_snmp_basic.c | 2 - net/ipv6/ip6_output.c | 4 ++ 76 files changed, 464 insertions(+), 182 deletions(-)
Al Viro (2):
uml: missed kmalloc() in pcap_user.c
uml: missing export of csum_partial() on uml/amd64
Alan Stern (2):
usb-storage: unusual_devs entries for iRiver T10 and Datafab CF+SM reader
usb-serial: don't release unregistered minors
Andre Schenk (1):
USB: ftdi_sio: Add USB Product Id for ELV HS485
Andrew Vasquez (1):
qla2xxx: Set an rport's dev_loss_tmo value in a consistent manner.
Arnaldo Carvalho de Melo (1):
dccp: change L/R must have at least one byte in the dccpsf_val field
Carlos Corbacho (1):
acer-wmi: Fix wireless and bluetooth on early AMW0 v2 laptops
Dave Jones (1):
USB: usb-storage: quirk around v1.11 firmware on Nikon D4
David Howells (1):
netfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP
David Miller (2):
radeonfb: fix accel engine hangs
radeon: misc corrections
David S. Miller (1):
sparc64: Do not clobber %g7 in setcontext() trap.
Frederik Kriewitz (1):
USB: ftdi_sio: add support for Luminance Stellaris Evaluation/Development Kits
Greg Kroah-Hartman (1):
Linux 2.6.25.16
Hans Verkuil (1):
i2c: Fix NULL pointer dereference in i2c_new_probed_device
HighPoint Linux Team (1):
SCSI: hptiop: add more PCI device IDs
Ingo Molnar (1):
uml: PATH_MAX needs limits.h
James Bottomley (2):
SCSI: ses: fix VPD inquiry overrun
SCSI: scsi_transport_spi: fix oops in revalidate
Jan Beulich (2):
CIFS: Fix compiler warning on 64-bit
x86: fix spin_is_contended()
Jean Delvare (1):
matrox maven: fix a broken error path
Jeff Dike (10):
uml: fix build when SLOB is enabled
uml: fix bad NTP interaction with clock
uml: physical memory shouldn't include initial stack
uml: track and make up lost ticks
uml: deal with host time going backwards
uml: memcpy export needs to follow host declaration
uml: stub needs to tolerate SIGWINCH
uml: work around broken host PTRACE_SYSEMU
uml: fix gcc ICEs and unresolved externs
uml: Fix boot crash
Joerg Roedel (1):
x86: fix setup code crashes on my old 486 box
KOSAKI Motohiro (1):
mlock() fix return values
Marcus Sundberg (1):
r8169: avoid thrashing PCI conf space above RTL_GIGA_MAC_VER_06
Mikael Pettersson (1):
sparc64: FUTEX_OP_ANDN fix
Oleg Nesterov (2):
posix-timers: fix posix_timer_event() vs dequeue_signal() race
posix-timers: do_schedule_next_timer: fix the setting of ->si_overrun
Petr Tesarik (1):
ide-cd: fix endianity for the error message in cdrom_read_capacity
Seokmann Ju (1):
qla2xxx: Add dev_loss_tmo_callbk/terminate_rport_io callback support.
Stephen Hemminger (1):
random32: seeding improvement
Steve French (2):
CIFS: mount of IPC$ breaks with iget patch
CIFS: if get root inode fails during mount, cleanup tree connection
Sven Wegener (1):
ipvs: Fix possible deadlock in estimator code
Tim Wright (1):
SCSI: block: Fix miscalculation of sg_io timeout in CDROM_SEND_PACKET handler.
Tollef Fog Heen (1):
USB: pl2023: Remove USB id (4348:5523) handled by ch341
Tom Spink (1):
uml: deal with inaccessible address space start
Tom Zanussi (1):
relay: fix "full buffer with exactly full last subbuffer" accounting problem
Wei Yongjun (1):
ipv6: Fix ip6_xmit to send fragments if ipfragok is true
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 25 -EXTRAVERSION = .15 +EXTRAVERSION = .16 NAME = Funky Weasel is Jiggy wit it # *DOCUMENTATION*
arch/sparc64/kernel/signal.c +4 -2
@@ -2,7 +2,7 @@* arch/sparc64/kernel/signal.c * * Copyright (C) 1991, 1992 Linus Torvalds -* Copyright (C) 1995 David S. Miller ([email protected]) +* Copyright (C) 1995, 2008 David S. Miller ([email protected]) * Copyright (C) 1996 Miguel de Icaza ([email protected]) * Copyright (C) 1997 Eddie C. Dost ([email protected]) * Copyright (C) 1997,1998 Jakub Jelinek ([email protected])
@@ -90,7 +90,9 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs) err |=__get_user (regs->u_regs[UREG_G4 ], (&(*grp)[MC_G4 ])); err |=__get_user (regs->u_regs[UREG_G5 ], (&(*grp)[MC_G5 ])); err |=__get_user (regs->u_regs[UREG_G6 ], (&(*grp)[MC_G6 ])); - err |=__get_user (regs->u_regs[UREG_G7 ], (&(*grp)[MC_G7 ])); + +/* Skip %g7 as that's the thread register in userspace. */ + err |=__get_user (regs->u_regs[UREG_I0 ], (&(*grp)[MC_O0 ])); err |=__get_user (regs->u_regs[UREG_I1 ], (&(*grp)[MC_O1 ])); err |=__get_user (regs->u_regs[UREG_I2 ], (&(*grp)[MC_O2 ]));
arch/um/Makefile +0 -1
@@ -77,7 +77,6 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)) KBUILD_CFLAGS += $(KERNEL_DEFINES) -KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,) PHONY += linux
arch/um/Makefile-i386 +7 -0
@@ -32,4 +32,11 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) # an unresolved reference. cflags-y += -ffreestanding +# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use +# a lot more stack due to the lack of sharing of stacklots. Also, gcc +# 4.3.0 needs -funit-at-a-time for extern inline functions. +KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then \ + echo $(call cc-option,-fno-unit-at-a-time); \ + else echo $(call cc-option,-funit-at-a-time); fi ;) + KBUILD_CFLAGS += $(cflags-y)
arch/um/Makefile-x86_64 +3 -0
@@ -21,3 +21,6 @@ HEADER_ARCH := x86 LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64 LINK-y += -m64 + +# Do unit-at-a-time unconditionally on x86_64, following the host +KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
arch/um/drivers/chan_user.c +1 -0
@@ -11,6 +11,7 @@#include <termios.h> #include <sys/ioctl.h> #include "chan_user.h" +#include "kern_constants.h" #include "os.h" #include "um_malloc.h" #include "user.h"
arch/um/drivers/cow_sys.h +1 -1
@@ -8,7 +8,7 @@static inline void *cow_malloc (int size) { -return kmalloc (size,UM_GFP_KERNEL ); +return uml_kmalloc (size,UM_GFP_KERNEL ); }static inline void cow_free (void *ptr)
arch/um/drivers/daemon_user.c +2 -2
@@ -34,7 +34,7 @@ static struct sockaddr_un *new_addr(void *name, int len) {struct sockaddr_un *sun; - sun =kmalloc (sizeof (struct sockaddr_un ),UM_GFP_KERNEL ); + sun =uml_kmalloc (sizeof (struct sockaddr_un ),UM_GFP_KERNEL );if (sun ==NULL ) {printk (UM_KERN_ERR "new_addr: allocation of sockaddr_un " "failed\n" );
@@ -83,7 +83,7 @@ static int connect_to_switch(struct daemon_data *pri) goto out_close; } - sun =kmalloc (sizeof (struct sockaddr_un ),UM_GFP_KERNEL ); + sun =uml_kmalloc (sizeof (struct sockaddr_un ),UM_GFP_KERNEL );if (sun ==NULL ) {printk (UM_KERN_ERR "new_addr: allocation of sockaddr_un " "failed\n" );
arch/um/drivers/fd.c +1 -1
@@ -40,7 +40,7 @@ static void *fd_init(char *str, int device, const struct chan_opts *opts)return NULL ; } - data =kmalloc (sizeof (*data),UM_GFP_KERNEL ); + data =uml_kmalloc (sizeof (*data),UM_GFP_KERNEL );if (data ==NULL )return NULL ;
arch/um/drivers/mcast_user.c +2 -1
@@ -15,6 +15,7 @@#include <unistd.h> #include <errno.h> #include <netinet/in.h> +#include "kern_constants.h" #include "mcast.h" #include "net_user.h" #include "um_malloc.h"
@@ -24,7 +25,7 @@ static struct sockaddr_in *new_addr(char *addr, unsigned short port) {struct sockaddr_in *sin; - sin =kmalloc (sizeof (struct sockaddr_in ),UM_GFP_KERNEL ); + sin =uml_kmalloc (sizeof (struct sockaddr_in ),UM_GFP_KERNEL );if (sin ==NULL ) {printk (UM_KERN_ERR "new_addr: allocation of sockaddr_in " "failed\n" );
arch/um/drivers/net_user.c +1 -1
@@ -222,7 +222,7 @@ static void change(char *dev, char *what, unsigned char *addr, netmask[2], netmask[3]); output_len =UM_KERN_PAGE_SIZE ; - output =kmalloc (output_len,UM_GFP_KERNEL ); + output =uml_kmalloc (output_len,UM_GFP_KERNEL );if (output ==NULL )printk (UM_KERN_ERR "change : failed to allocate output " "buffer\n" );
arch/um/drivers/pcap_user.c +1 -1
@@ -50,7 +50,7 @@ static int pcap_open(void *data)return -EIO ; } - pri->compiled =kmalloc (sizeof (struct bpf_program ), + pri->compiled =uml_kmalloc (sizeof (struct bpf_program ),UM_GFP_KERNEL );if (pri->compiled ==NULL ) {printk (UM_KERN_ERR "pcap_open : kmalloc failed\n" );
arch/um/drivers/port_user.c +1 -1
@@ -47,7 +47,7 @@ static void *port_init(char *str, int device, const struct chan_opts *opts)if (kern_data ==NULL )return NULL ; - data =kmalloc (sizeof (*data),UM_GFP_KERNEL ); + data =uml_kmalloc (sizeof (*data),UM_GFP_KERNEL );if (data ==NULL ) goto err;
arch/um/drivers/pty.c +1 -1
@@ -29,7 +29,7 @@ static void *pty_chan_init(char *str, int device, const struct chan_opts *opts) {struct pty_chan *data; - data =kmalloc (sizeof (*data),UM_GFP_KERNEL ); + data =uml_kmalloc (sizeof (*data),UM_GFP_KERNEL );if (data ==NULL )return NULL ;
arch/um/drivers/slip_user.c +1 -1
@@ -96,7 +96,7 @@ static int slip_tramp(char **argv, int fd) pid = err; output_len =UM_KERN_PAGE_SIZE ; - output =kmalloc (output_len,UM_GFP_KERNEL ); + output =uml_kmalloc (output_len,UM_GFP_KERNEL );if (output ==NULL ) {printk (UM_KERN_ERR "slip_tramp : failed to allocate output " "buffer\n" );
arch/um/drivers/tty.c +1 -1
@@ -29,7 +29,7 @@ static void *tty_chan_init(char *str, int device, const struct chan_opts *opts) } str++; - data =kmalloc (sizeof (*data),UM_GFP_KERNEL ); + data =uml_kmalloc (sizeof (*data),UM_GFP_KERNEL );if (data ==NULL )return NULL ; *data = ((struct tty_chan) { .dev = str,
arch/um/drivers/xterm.c +1 -1
@@ -30,7 +30,7 @@ static void *xterm_init(char *str, int device, const struct chan_opts *opts) {struct xterm_chan *data; - data =kmalloc (sizeof (*data),UM_GFP_KERNEL ); + data =uml_kmalloc (sizeof (*data),UM_GFP_KERNEL );if (data ==NULL )return NULL ; *data = ((struct xterm_chan) { .pid = -1,
arch/um/include/init.h +8 -0
@@ -45,6 +45,8 @@ typedef void (*exitcall_t)(void);# define __section (S ) __attribute__ ((__section__(#S)))#endif +#if __GNUC__ ==3 +#if __GNUC_MINOR__ >=3 # define __used __attribute__((__used__))#else
@@ -52,6 +54,12 @@ typedef void (*exitcall_t)(void);#endif #else +#if __GNUC__ ==4 +# define __used __attribute__((__used__)) +#endif +#endif + +#else #include <linux/compiler.h> #endif /* These are for everybody (although not all archs will actually
arch/um/include/os.h +1 -1
@@ -298,6 +298,6 @@ extern int os_arch_prctl(int pid, int code, unsigned long *addr);extern int get_pty (void );/* sys-$ARCH/task_size.c */ -extern unsigned long os_get_task_size (void ); +extern unsigned long os_get_top_address (void );#endif
arch/um/include/process.h +2 -2
@@ -8,8 +8,8 @@#include <signal.h> -extern void sig_handler (int sig,struct sigcontext sc); -extern void alarm_handler (int sig,struct sigcontext sc); +extern void sig_handler (int sig,struct sigcontext *sc); +extern void alarm_handler (int sig,struct sigcontext *sc);#endif
arch/um/include/um_malloc.h +3 -6
@@ -8,15 +8,12 @@#include "kern_constants.h" -extern void *__kmalloc (int size,int flags); -static inline void *kmalloc (int size,int flags) -{ -return __kmalloc (size, flags); -} - +extern void *uml_kmalloc (int size,int flags);extern void kfree (const void *ptr);extern void *vmalloc (unsigned long size);extern void vfree (void *ptr);#endif /* __UM_MALLOC_H__ */ + +
arch/um/kernel/mem.c +5 -0
@@ -375,3 +375,8 @@ pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) return pmd; }#endif + +void *uml_kmalloc (int size,int flags) +{ +return kmalloc (size, flags); +}
arch/um/kernel/time.c +2 -2
@@ -74,7 +74,7 @@ static irqreturn_t um_timer(int irq, void *dev)static cycle_t itimer_read (void ) { -return os_nsecs (); +return os_nsecs () /1000 ; }static struct clocksource itimer_clocksource = {
@@ -82,7 +82,7 @@ static struct clocksource itimer_clocksource = { .rating = 300, .read = itimer_read, .mask = CLOCKSOURCE_MASK(64), - .mult = 1, + .mult = 1000, .shift = 0, .flags = CLOCK_SOURCE_IS_CONTINUOUS, };
arch/um/kernel/um_arch.c +5 -2
@@ -259,6 +259,7 @@ int __init linux_main(int argc, char **argv)unsigned long avail, diff;unsigned long virtmem_size, max_physmem;unsigned int i, add; +unsigned long stack;char * mode;for (i =1 ; i < argc; i++) {
@@ -272,7 +273,7 @@ int __init linux_main(int argc, char **argv)if (have_root ==0 )add_arg (DEFAULT_COMMAND_LINE ); - host_task_size =os_get_task_size (); + host_task_size =os_get_top_address ();/* * TASK_SIZE needs to be PGDIR_SIZE aligned or else exit_mmap craps * out
@@ -347,7 +348,9 @@ int __init linux_main(int argc, char **argv) } virtmem_size = physmem_size; - avail =TASK_SIZE - start_vm; + stack = (unsigned long ) argv; + stack &= ~(1024 *1024 -1 ); + avail = stack - start_vm;if (physmem_size > avail) virtmem_size = avail; end_vm = start_vm + virtmem_size;
arch/um/os-Linux/drivers/ethertap_user.c +2 -2
@@ -52,7 +52,7 @@ static void etap_change(int op, unsigned char *addr, unsigned char *netmask,return ; } - output =kmalloc (UM_KERN_PAGE_SIZE ,UM_GFP_KERNEL ); + output =uml_kmalloc (UM_KERN_PAGE_SIZE ,UM_GFP_KERNEL );if (output ==NULL )printk (UM_KERN_ERR "etap_change : Failed to allocate output " "buffer\n" );
@@ -165,7 +165,7 @@ static int etap_open(void *data) err =etap_tramp (pri->dev_name, pri->gate_addr, control_fds[0 ], control_fds[1 ], data_fds[0 ], data_fds[1 ]); output_len =UM_KERN_PAGE_SIZE ; - output =kmalloc (output_len,UM_GFP_KERNEL ); + output =uml_kmalloc (output_len,UM_GFP_KERNEL );read_output (control_fds[0 ], output, output_len);if (output ==NULL )
arch/um/os-Linux/helper.c +3 -2
@@ -7,6 +7,7 @@#include <unistd.h> #include <errno.h> #include <sched.h> +#include <linux/limits.h> #include <sys/socket.h> #include <sys/wait.h> #include "kern_constants.h"
@@ -70,8 +71,8 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv) data.pre_data = pre_data; data.argv = argv; data.fd = fds[1 ]; - data.buf =__cant_sleep () ?kmalloc (PATH_MAX ,UM_GFP_ATOMIC ) : -kmalloc (PATH_MAX ,UM_GFP_KERNEL ); + data.buf =__cant_sleep () ?uml_kmalloc (PATH_MAX ,UM_GFP_ATOMIC ) : +uml_kmalloc (PATH_MAX ,UM_GFP_KERNEL ); pid =clone (helper_child, (void *) sp,CLONE_VM , &data);if (pid <0 ) { ret = -errno;
arch/um/os-Linux/main.c +1 -1
@@ -199,7 +199,7 @@ void *__wrap_malloc(int size)return __real_malloc (size); else if (size <= UM_KERN_PAGE_SIZE)/* finding contiguous pages can be hard*/ - ret =kmalloc (size,UM_GFP_KERNEL ); + ret =uml_kmalloc (size,UM_GFP_KERNEL ); else ret = vmalloc(size);/*
arch/um/os-Linux/sigio.c +2 -2
@@ -109,7 +109,7 @@ static int need_poll(struct pollfds *polls, int n)if (n <= polls->size)return 0 ; - new =kmalloc (n *sizeof (struct pollfd ),UM_GFP_ATOMIC ); + new =uml_kmalloc (n *sizeof (struct pollfd ),UM_GFP_ATOMIC );if (new ==NULL ) {printk (UM_KERN_ERR "need_poll : failed to allocate new " "pollfds\n" );
@@ -243,7 +243,7 @@ static struct pollfd *setup_initial_poll(int fd) {struct pollfd *p; - p =kmalloc (sizeof (struct pollfd ),UM_GFP_KERNEL ); + p =uml_kmalloc (sizeof (struct pollfd ),UM_GFP_KERNEL );if (p ==NULL ) {printk (UM_KERN_ERR "setup_initial_poll : failed to allocate " "poll\n" );
arch/um/os-Linux/signal.c +1 -0
@@ -12,6 +12,7 @@#include "as-layout.h" #include "kern_util.h" #include "os.h" +#include "process.h" #include "sysdep/barrier.h" #include "sysdep/sigcontext.h" #include "user.h"
arch/um/os-Linux/skas/process.c +1 -1
@@ -55,7 +55,7 @@ static int ptrace_dump_regs(int pid)* Signals that are OK to receive in the stub - we'll just continue it. * SIGWINCH will happen when UML is inside a detached screen. */ -#define STUB_SIG_MASK (1 << SIGVTALRM) +#define STUB_SIG_MASK ((1 << SIGVTALRM) | (1 << SIGWINCH))/* Signals that the stub will finish with - anything else is an error */ #define STUB_DONE_MASK (1 << SIGTRAP)
arch/um/os-Linux/start_up.c +16 -9
@@ -122,8 +122,10 @@ static int stop_ptraced_child(int pid, int exitcode, int mustexit) {int status, n, ret =0 ; -if (ptrace (PTRACE_CONT , pid,0 ,0 ) <0 ) -fatal_perror ("stop_ptraced_child : ptrace failed" ); +if (ptrace (PTRACE_CONT , pid,0 ,0 ) <0 ) { +perror ("stop_ptraced_child : ptrace failed" ); +return -1 ; + }CATCH_EINTR (n =waitpid (pid, &status,0 ));if (!WIFEXITED (status) || (WEXITSTATUS (status) != exitcode)) {int exit_with =WEXITSTATUS (status);
@@ -203,7 +205,7 @@ static void __init check_sysemu(void)if (n <0 )fatal_perror ("check_sysemu : wait failed" );if (!WIFSTOPPED (status) || (WSTOPSIG (status) !=SIGTRAP )) -fatal ("check_sysemu : expected SIGTRAP, got status = %d" , +fatal ("check_sysemu : expected SIGTRAP, got status = %d\n" , status);if (ptrace (PTRACE_GETREGS , pid,0 , regs) <0 )
@@ -245,9 +247,11 @@ static void __init check_sysemu(void)if (WIFSTOPPED (status) && (WSTOPSIG (status) == (SIGTRAP |0x80 ))) { -if (!count) -fatal ("check_ptrace : SYSEMU_SINGLESTEP " -"doesn't singlestep" ); +if (!count) { +non_fatal ("check_ptrace : SYSEMU_SINGLESTEP " +"doesn't singlestep" ); + goto fail; + } n =ptrace (PTRACE_POKEUSR , pid,PT_SYSCALL_RET_OFFSET ,os_getpid ());if (n <0 )
@@ -257,9 +261,12 @@ static void __init check_sysemu(void) }else if (WIFSTOPPED (status) && (WSTOPSIG (status) ==SIGTRAP )) count++; -else -fatal ("check_ptrace : expected SIGTRAP or " -"(SIGTRAP | 0x80), got status = %d" , status); +else { +non_fatal ("check_ptrace : expected SIGTRAP or " +"(SIGTRAP | 0x80), got status = %d\n" , + status); + goto fail; + } }if (stop_ptraced_child (pid,0 ,0 ) <0 ) goto fail_stopped;
arch/um/os-Linux/sys-i386/task_size.c +29 -9
@@ -63,7 +63,7 @@ static int page_ok(unsigned long page)return ok; } -unsigned long os_get_task_size (void ) +unsigned long os_get_top_address (void ) {struct sigaction sa, old;unsigned long bottom =0 ;
@@ -76,9 +76,9 @@ unsigned long os_get_task_size(void)* hosts, but shouldn't hurt otherwise. */ unsigned long top =0xffffd000 >>UM_KERN_PAGE_SHIFT ; -unsigned long test; +unsigned long test, original; -printf ("Locating the top of the address space ... " ); +printf ("Locating the bottom of the address space ... " );fflush (stdout);/*
@@ -88,14 +88,32 @@ unsigned long os_get_task_size(void) sa.sa_handler = segfault;sigemptyset (&sa.sa_mask); sa.sa_flags =SA_NODEFER ; -sigaction (SIGSEGV , &sa, &old); +if (sigaction (SIGSEGV , &sa, &old)) { +perror ("os_get_top_address" ); +exit (1 ); + } -if (!page_ok (bottom)) { -fprintf (stderr,"Address 0x%x no good?\n" , - bottom <<UM_KERN_PAGE_SHIFT ); +/* Manually scan the address space, bottom-up, until we find +* the first valid page (or run out of them). +*/ +for (bottom =0 ; bottom < top; bottom++) { +if (page_ok (bottom)) +break ; + } + +/* If we've got this far, we ran out of pages. */ +if (bottom == top) { +fprintf (stderr,"Unable to determine bottom of address " +"space.\n" );exit (1 ); } +printf ("0x%x\n" , bottom <<UM_KERN_PAGE_SHIFT ); +printf ("Locating the top of the address space ... " ); +fflush (stdout); + + original = bottom; +/* This could happen with a 4G/4G split */ if (page_ok (top)) goto out;
@@ -110,8 +128,10 @@ unsigned long os_get_task_size(void) out:/* Restore the old SIGSEGV handling */ -sigaction (SIGSEGV , &old,NULL ); - +if (sigaction (SIGSEGV , &old,NULL )) { +perror ("os_get_top_address" ); +exit (1 ); + } top <<=UM_KERN_PAGE_SHIFT ;printf ("0x%x\n" , top);fflush (stdout);
arch/um/os-Linux/sys-x86_64/task_size.c +1 -1
@@ -1,4 +1,4 @@ -unsigned long os_get_task_size (unsigned long shift) +unsigned long os_get_top_address (unsigned long shift) {/* The old value of CONFIG_TOP_ADDR */ return 0x7fc0000000 ;
arch/um/os-Linux/time.c +57 -4
107 lines not on this page · raw message
arch/um/sys-x86_64/ksyms.c +5 -0
@@ -13,4 +13,9 @@ EXPORT_SYMBOL(__down_failed_trylock);EXPORT_SYMBOL (__up_wakeup);/*XXX: we need them because they would be exported by x86_64 */ +#if (__GNUC__ ==4 && __GNUC_MINOR__ >=3 ) || __GNUC__ >4 +EXPORT_SYMBOL (memcpy); +#else EXPORT_SYMBOL (__memcpy); +#endif +EXPORT_SYMBOL (csum_partial);
arch/x86/boot/boot.h +8 -0
@@ -27,6 +27,8 @@#include <asm/boot.h> #include <asm/setup.h> +#define NCAPINTS 8 +/* Useful macros */ #define BUILD_BUG_ON (condition) ((void)sizeof(char[1 - 2*!!(condition)]))
@@ -244,6 +246,12 @@ int cmdline_find_option(const char *option, char *buffer, int bufsize);int cmdline_find_option_bool (const char *option);/* cpu.c, cpucheck.c */ +struct cpu_features { +int level;/* Family, or 64 for x86-64 */ +int model; +u32 flags[NCAPINTS ]; +}; +extern struct cpu_features cpu;int check_cpu (int *cpu_level_ptr,int *req_level_ptr,u32 **err_flags_ptr);int validate_cpu (void );
arch/x86/boot/cpucheck.c +1 -7
@@ -32,13 +32,7 @@#include <asm/required-features.h> #include <asm/msr-index.h> -struct cpu_features { -int level;/* Family, or 64 for x86-64 */ -int model; -u32 flags[NCAPINTS ]; -}; - -static struct cpu_features cpu; +struct cpu_features cpu;static u32 cpu_vendor[3 ];static u32 err_flags[NCAPINTS ];
arch/x86/boot/main.c +4 -0
@@ -75,6 +75,10 @@ static void keyboard_set_repeat(void)*/ static void query_ist (void ) { +/* Some 486 BIOSes apparently crash on this call */ +if (cpu.level <6 ) +return ; + asm("int $0x15" : "=a" (boot_params.ist_info.signature), "=b" (boot_params.ist_info.command),
block/scsi_ioctl.c +1 -1
@@ -633,7 +633,7 @@ int scsi_cmd_ioctl(struct file *file, struct request_queue *q, hdr.sbp = cgc.sense;if (hdr.sbp) hdr.mx_sb_len =sizeof (struct request_sense ); - hdr.timeout = cgc.timeout; + hdr.timeout =jiffies_to_msecs (cgc.timeout); hdr.cmdp = ((struct cdrom_generic_command __user *) arg)->cmd; hdr.cmd_len =sizeof (cgc.cmd);
drivers/i2c/i2c-core.c +3 -1
@@ -1173,9 +1173,11 @@ i2c_new_probed_device(struct i2c_adapter *adap,if ((addr_list[i] & ~0x07 ) ==0x30 || (addr_list[i] & ~0x0f ) ==0x50 || !i2c_check_functionality (adap,I2C_FUNC_SMBUS_QUICK )) { +union i2c_smbus_data data; +if (i2c_smbus_xfer (adap, addr_list[i],0 ,I2C_SMBUS_READ ,0 , -I2C_SMBUS_BYTE ,NULL ) >=0 ) +I2C_SMBUS_BYTE , &data) >=0 )break ; }else { if (i2c_smbus_xfer(adap, addr_list[i], 0,
drivers/ide/ide-cd.c +10 -8
@@ -1411,6 +1411,7 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,int stat;struct request req; +u32 blocklen;ide_cd_init_rq (drive, &req);
@@ -1427,23 +1428,24 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,/* * Sanity check the given block size */ -switch (capbuf.blocklen) { -case __constant_cpu_to_be32 (512 ): -case __constant_cpu_to_be32 (1024 ): -case __constant_cpu_to_be32 (2048 ): -case __constant_cpu_to_be32 (4096 ): + blocklen =be32_to_cpu (capbuf.blocklen); +switch (blocklen) { +case 512 : +case 1024 : +case 2048 : +case 4096 :break ;default :printk (KERN_ERR "%s: weird block size %u\n" , - drive->name, capbuf.blocklen); + drive->name, blocklen);printk (KERN_ERR "%s: default to 2kb block size\n" , drive->name); - capbuf.blocklen =__constant_cpu_to_be32 (2048 ); + blocklen =2048 ;break ; } *capacity =1 +be32_to_cpu (capbuf.lba); - *sectors_per_frame =be32_to_cpu (capbuf.blocklen) >>SECTOR_BITS ; + *sectors_per_frame = blocklen >>SECTOR_BITS ;return 0 ; }
drivers/misc/acer-wmi.c +19 -0
@@ -742,11 +742,30 @@ static acpi_status get_u32(u32 *value, u32 cap)static acpi_status set_u32 (u32 value,u32 cap) { +acpi_status status; +if (interface->capability & cap) {switch (interface->type) {case ACER_AMW0 :return AMW0_set_u32 (value, cap, interface);case ACER_AMW0_V2 : +if (cap ==ACER_CAP_MAILLED ) +return AMW0_set_u32 (value, cap, interface); + +/* +* On some models, some WMID methods don't toggle +* properly. For those cases, we want to run the AMW0 +* method afterwards to be certain we've really toggled +* the device state. +*/ +if (cap ==ACER_CAP_WIRELESS || + cap ==ACER_CAP_BLUETOOTH ) { + status =WMID_set_u32 (value, cap, interface); +if (ACPI_FAILURE (status)) +return status; + +return AMW0_set_u32 (value, cap, interface); + }case ACER_WMID :return WMID_set_u32 (value, cap, interface);default :
drivers/net/r8169.c +4 -2
@@ -1438,8 +1438,10 @@ static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp)rtl_hw_phy_config (dev); -dprintk ("Set MAC Reg C+CR Offset 0x82h = 0x01h\n" ); -RTL_W8 (0x82 ,0x01 ); +if (tp->mac_version <=RTL_GIGA_MAC_VER_06 ) { +dprintk ("Set MAC Reg C+CR Offset 0x82h = 0x01h\n" ); +RTL_W8 (0x82 ,0x01 ); + }pci_write_config_byte (tp->pci_dev,PCI_LATENCY_TIMER ,0x40 );
drivers/scsi/hptiop.c +7 -0
@@ -1246,6 +1246,13 @@ static struct pci_device_id hptiop_id_table[] = { { PCI_VDEVICE(TTI, 0x3522), (kernel_ulong_t)&hptiop_itl_ops }, { PCI_VDEVICE(TTI, 0x3410), (kernel_ulong_t)&hptiop_itl_ops }, { PCI_VDEVICE(TTI, 0x3540), (kernel_ulong_t)&hptiop_itl_ops }, + { PCI_VDEVICE(TTI, 0x3530), (kernel_ulong_t)&hptiop_itl_ops }, + { PCI_VDEVICE(TTI, 0x3560), (kernel_ulong_t)&hptiop_itl_ops }, + { PCI_VDEVICE(TTI, 0x4322), (kernel_ulong_t)&hptiop_itl_ops }, + { PCI_VDEVICE(TTI, 0x4210), (kernel_ulong_t)&hptiop_itl_ops }, + { PCI_VDEVICE(TTI, 0x4211), (kernel_ulong_t)&hptiop_itl_ops }, + { PCI_VDEVICE(TTI, 0x4310), (kernel_ulong_t)&hptiop_itl_ops }, + { PCI_VDEVICE(TTI, 0x4311), (kernel_ulong_t)&hptiop_itl_ops }, { PCI_VDEVICE(TTI, 0x3120), (kernel_ulong_t)&hptiop_mv_ops }, { PCI_VDEVICE(TTI, 0x3122), (kernel_ulong_t)&hptiop_mv_ops }, { PCI_VDEVICE(TTI, 0x3020), (kernel_ulong_t)&hptiop_mv_ops },
drivers/scsi/qla2xxx/qla_attr.c +29 -14
77 lines not on this page · raw message
drivers/scsi/qla2xxx/qla_def.h +0 -1
@@ -1548,7 +1548,6 @@ typedef struct fc_port {int login_retry;atomic_t port_down_timer; -spinlock_t rport_lock;struct fc_rport *rport, *drport;u32 supported_classes;
drivers/scsi/qla2xxx/qla_gbl.h +2 -0
@@ -68,6 +68,8 @@ extern int num_hosts;extern int qla2x00_loop_reset (scsi_qla_host_t *);extern void qla2x00_abort_all_cmds (scsi_qla_host_t *,int ); +extern void qla2x00_abort_fcport_cmds (fc_port_t *); +/* * Global Functions in qla_mid.c source file. */
drivers/scsi/qla2xxx/qla_init.c +5 -11
@@ -1827,12 +1827,11 @@ qla2x00_rport_del(void *data) {fc_port_t *fcport = data;struct fc_rport *rport; -unsigned long flags; -spin_lock_irqsave (&fcport->rport_lock, flags); +spin_lock_irq (fcport->ha->host->host_lock); rport = fcport->drport; fcport->drport =NULL ; -spin_unlock_irqrestore (&fcport->rport_lock, flags); +spin_unlock_irq (fcport->ha->host->host_lock);if (rport)fc_remote_port_delete (rport); }
@@ -1861,7 +1860,6 @@ qla2x00_alloc_fcport(scsi_qla_host_t *ha, gfp_t flags)atomic_set (&fcport->state,FCS_UNCONFIGURED ); fcport->flags =FCF_RLC_SUPPORT ; fcport->supported_classes =FC_COS_UNSPECIFIED ; -spin_lock_init (&fcport->rport_lock);return fcport; }
@@ -2220,28 +2218,24 @@ qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport) {struct fc_rport_identifiers rport_ids;struct fc_rport *rport; -unsigned long flags;if (fcport->drport)qla2x00_rport_del (fcport); -if (fcport->rport) -return ; rport_ids.node_name =wwn_to_u64 (fcport->node_name); rport_ids.port_name =wwn_to_u64 (fcport->port_name); rport_ids.port_id = fcport->d_id.b.domain <<16 | fcport->d_id.b.area <<8 | fcport->d_id.b.al_pa; rport_ids.roles =FC_RPORT_ROLE_UNKNOWN ; - rport =fc_remote_port_add (ha->host,0 , &rport_ids); + fcport->rport = rport =fc_remote_port_add (ha->host,0 , &rport_ids);if (!rport) {qla_printk (KERN_WARNING , ha,"Unable to allocate fc remote port!\n" );return ; } -spin_lock_irqsave (&fcport->rport_lock, flags); - fcport->rport = rport; +spin_lock_irq (fcport->ha->host->host_lock); *((fc_port_t **)rport->dd_data) = fcport; -spin_unlock_irqrestore (&fcport->rport_lock, flags); +spin_unlock_irq (fcport->ha->host->host_lock); rport->supported_classes = fcport->supported_classes;
drivers/scsi/qla2xxx/qla_os.c +41 -14
94 lines not on this page · raw message
drivers/scsi/scsi_transport_spi.c +5 -3
@@ -360,12 +360,14 @@ spi_transport_rd_attr(rti, "%d\n");spi_transport_rd_attr (pcomp_en,"%d\n" );spi_transport_rd_attr (hold_mcs,"%d\n" ); -/* we only care about the first child device so we return 1 */ +/* we only care about the first child device that's a real SCSI device +* so we return 1 to terminate the iteration when we find it */ static int child_iter (struct device *dev,void *data) { -struct scsi_device *sdev =to_scsi_device (dev); +if (!scsi_is_sdev_device (dev)) +return 0 ; -spi_dv_device (sdev); +spi_dv_device (to_scsi_device (dev));return 1 ; }
drivers/scsi/ses.c +14 -4
@@ -345,14 +345,14 @@ static int ses_enclosure_find_by_addr(struct enclosure_device *edev,return 0 ; } -#define VPD_INQUIRY_SIZE 512 +#define VPD_INQUIRY_SIZE 36static void ses_match_to_enclosure (struct enclosure_device *edev,struct scsi_device *sdev) {unsigned char *buf =kmalloc (VPD_INQUIRY_SIZE ,GFP_KERNEL );unsigned char *desc; -int len; +u16 vpd_len;struct efd efd = { .addr =0 , };
@@ -372,9 +372,19 @@ static void ses_match_to_enclosure(struct enclosure_device *edev, VPD_INQUIRY_SIZE, NULL, SES_TIMEOUT, SES_RETRIES)) goto free; - len = (buf[2 ] <<8 ) + buf[3 ]; + vpd_len = (buf[2 ] <<8 ) + buf[3 ]; +kfree (buf); + buf =kmalloc (vpd_len,GFP_KERNEL ); +if (!buf) +return ; + cmd[3 ] = vpd_len >>8 ; + cmd[4 ] = vpd_len &0xff ; +if (scsi_execute_req (sdev, cmd,DMA_FROM_DEVICE , buf, + vpd_len,NULL ,SES_TIMEOUT ,SES_RETRIES )) + goto free; + desc = buf +4 ; -while (desc < buf + len) { +while (desc < buf + vpd_len) {enum scsi_protocol proto = desc[0 ] >>4 ;u8 code_set = desc[0 ] &0x0f ;u8 piv = desc[1 ] &0x80 ;
drivers/usb/serial/ftdi_sio.c +5 -0
@@ -283,6 +283,7 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, FTDI_ELV_FHZ1300PC_PID) }, { USB_DEVICE(FTDI_VID, FTDI_ELV_EM1010PC_PID) }, { USB_DEVICE(FTDI_VID, FTDI_ELV_WS500_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_ELV_HS485_PID) }, { USB_DEVICE(FTDI_VID, LINX_SDMUSBQSS_PID) }, { USB_DEVICE(FTDI_VID, LINX_MASTERDEVEL2_PID) }, { USB_DEVICE(FTDI_VID, LINX_FUTURE_0_PID) },
@@ -366,6 +367,10 @@ static struct usb_device_id id_table_combined [] = { .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { USB_DEVICE(FTDI_VID, FTDI_OOCDLINK_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(FTDI_VID, LMI_LM3S_DEVEL_BOARD_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(FTDI_VID, LMI_LM3S_EVAL_BOARD_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, { }, /* Optional parameter entry */ { } /* Terminating entry */
drivers/usb/serial/ftdi_sio.h +6 -0
@@ -256,6 +256,7 @@#define FTDI_ELV_WS300PC_PID 0xE0F6/* PC-Wetterstation (WS 300 PC) */ #define FTDI_ELV_FHZ1300PC_PID 0xE0E8/* FHZ 1300 PC */ #define FTDI_ELV_WS500_PID 0xE0E9/* PC-Wetterstation (WS 500) */ +#define FTDI_ELV_HS485_PID 0xE0EA/* USB to RS-485 adapter */ #define FTDI_ELV_EM1010PC_PID 0xE0EF/* Engery monitor EM 1010 PC */ /*
@@ -547,6 +548,11 @@#define OLIMEX_VID 0x15BA#define OLIMEX_ARM_USB_OCD_PID 0x0003 +/* Luminary Micro Stellaris Boards, VID = FTDI_VID */ +/* FTDI 2332C Dual channel device, side A=245 FIFO (JTAG), Side B=RS232 UART */ +#define LMI_LM3S_DEVEL_BOARD_PID 0xbcd8 +#define LMI_LM3S_EVAL_BOARD_PID 0xbcd9 +/* www.elsterelectricity.com Elster Unicom III Optical Probe */ #define FTDI_ELSTER_UNICOM_PID 0xE700/* Product Id */
drivers/usb/serial/pl2303.c +0 -1
@@ -87,7 +87,6 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(ALCOR_VENDOR_ID, ALCOR_PRODUCT_ID) }, { USB_DEVICE(WS002IN_VENDOR_ID, WS002IN_PRODUCT_ID) }, { USB_DEVICE(COREGA_VENDOR_ID, COREGA_PRODUCT_ID) }, - { USB_DEVICE(HL340_VENDOR_ID, HL340_PRODUCT_ID) }, { USB_DEVICE(YCCABLE_VENDOR_ID, YCCABLE_PRODUCT_ID) }, { } /* Terminating entry */ };
drivers/usb/serial/pl2303.h +0 -4
@@ -105,10 +105,6 @@#define COREGA_VENDOR_ID 0x07aa#define COREGA_PRODUCT_ID 0x002a -/* HL HL-340 (ID: 4348:5523) */ -#define HL340_VENDOR_ID 0x4348 -#define HL340_PRODUCT_ID 0x5523 -/* Y.C. Cable U.S.A., Inc - USB to RS-232 */ #define YCCABLE_VENDOR_ID 0x05ad#define YCCABLE_PRODUCT_ID 0x0fba
drivers/usb/serial/usb-serial.c +3 -4
@@ -119,9 +119,6 @@ static void return_serial(struct usb_serial *serial)dbg ("%s" , __FUNCTION__); -if (serial ==NULL ) -return ; -for (i =0 ; i < serial->num_ports; ++i) { serial_table[serial->minor + i] =NULL ; }
@@ -140,7 +137,8 @@ static void destroy_serial(struct kref *kref) serial->type->shutdown (serial);/* return the minor range that this device had */ -return_serial (serial); +if (serial->minor !=SERIAL_TTY_NO_MINOR ) +return_serial (serial);for (i =0 ; i < serial->num_ports; ++i) serial->port[i]->open_count =0 ;
@@ -635,6 +633,7 @@ static struct usb_serial * create_serial (struct usb_device *dev, serial->interface = interface;kref_init (&serial->kref);mutex_init (&serial->disc_mutex); + serial->minor =SERIAL_TTY_NO_MINOR ;return serial; }
drivers/usb/storage/unusual_devs.h +16 -2
@@ -357,14 +357,14 @@ UNUSUAL_DEV( 0x04b0, 0x040f, 0x0100, 0x0200, US_FL_FIX_CAPACITY),/* Reported by Emil Larsson <[email protected]> */ -UNUSUAL_DEV (0x04b0 ,0x0411 ,0x0100 ,0x0110 , +UNUSUAL_DEV (0x04b0 ,0x0411 ,0x0100 ,0x0111 ,"NIKON" ,"NIKON DSC D80" ,US_SC_DEVICE ,US_PR_DEVICE ,NULL ,US_FL_FIX_CAPACITY ),/* Reported by Ortwin Glueck <[email protected]> */ -UNUSUAL_DEV( 0x04b0, 0x0413, 0x0110, 0x0110, +UNUSUAL_DEV( 0x04b0, 0x0413, 0x0110, 0x0111, "NIKON", "NIKON DSC D40", US_SC_DEVICE, US_PR_DEVICE, NULL,
@@ -1164,6 +1164,13 @@ UNUSUAL_DEV( 0x07c4, 0xa400, 0x0000, 0xffff, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), +/* Reported by Rauch Wolke <[email protected]> */ +UNUSUAL_DEV (0x07c4 ,0xa4a5 ,0x0000 ,0xffff , +"Simple Tech/Datafab" , +"CF+SM Reader" , +US_SC_DEVICE ,US_PR_DEVICE ,NULL , + US_FL_IGNORE_RESIDUE ), +/* Casio QV 2x00/3x00/4000/8000 digital still cameras are not conformant * to the USB storage specification in two ways: * - They tell us they are using transport protocol CBI. In reality they
@@ -1705,6 +1712,13 @@ UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_GO_SLOW ), +/* Reported by Andrey Rahmatullin <[email protected]> */ +UNUSUAL_DEV (0x4102 ,0x1020 ,0x0100 ,0x0100 , +"iRiver" , +"MP3 T10" , +US_SC_DEVICE ,US_PR_DEVICE ,NULL , + US_FL_IGNORE_RESIDUE ), +/* * David Härdeman <[email protected]> * The key makes the SCSI stack print confusing (but harmless) messages
drivers/video/aty/radeon_accel.c +10 -2
@@ -55,6 +55,10 @@ static void radeonfb_prim_fillrect(struct radeonfb_info *rinfo,OUTREG (DP_WRITE_MSK ,0xffffffff );OUTREG (DP_CNTL , (DST_X_LEFT_TO_RIGHT |DST_Y_TOP_TO_BOTTOM )); +radeon_fifo_wait (2 ); +OUTREG (DSTCACHE_CTLSTAT ,RB2D_DC_FLUSH_ALL ); +OUTREG (WAIT_UNTIL , (WAIT_2D_IDLECLEAN |WAIT_DMA_GUI_IDLE )); +radeon_fifo_wait (2 );OUTREG (DST_Y_X , (region->dy <<16 ) | region->dx);OUTREG (DST_WIDTH_HEIGHT , (region->width <<16 ) | region->height);
@@ -116,6 +120,10 @@ static void radeonfb_prim_copyarea(struct radeonfb_info *rinfo,OUTREG (DP_CNTL , (xdir>=0 ?DST_X_LEFT_TO_RIGHT :0 ) | (ydir>=0 ?DST_Y_TOP_TO_BOTTOM :0 )); +radeon_fifo_wait (2 ); +OUTREG (DSTCACHE_CTLSTAT ,RB2D_DC_FLUSH_ALL ); +OUTREG (WAIT_UNTIL , (WAIT_2D_IDLECLEAN |WAIT_DMA_GUI_IDLE )); +radeon_fifo_wait (3 );OUTREG (SRC_Y_X , (sy <<16 ) | sx);OUTREG (DST_Y_X , (dy <<16 ) | dx);
@@ -241,8 +249,8 @@ void radeonfb_engine_reset(struct radeonfb_info *rinfo)INREG (HOST_PATH_CNTL );OUTREG (HOST_PATH_CNTL , host_path_cntl); -if (rinfo->family !=CHIP_FAMILY_R300 || - rinfo->family !=CHIP_FAMILY_R350 || +if (rinfo->family !=CHIP_FAMILY_R300 && + rinfo->family !=CHIP_FAMILY_R350 && rinfo->family !=CHIP_FAMILY_RV350 )OUTREG (RBBM_SOFT_RESET , rbbm_soft_reset);
drivers/video/matrox/matroxfb_maven.c +1 -1
@@ -1266,7 +1266,7 @@ static int maven_detect_client(struct i2c_adapter* adapter, int address, int kin ERROR4:;i2c_detach_client (new_client); ERROR3:; -kfree (new_client); +kfree (data); ERROR0:;return err; }
fs/cifs/asn1.c +1 -1
@@ -400,7 +400,7 @@ asn1_oid_decode(struct asn1_ctx *ctx, size = eoc - ctx->pointer +1 ;/* first subid actually encodes first two subids */ -if (size <2 || size >ULONG_MAX /sizeof (unsigned long )) +if (size <2 || size >UINT_MAX /sizeof (unsigned long ))return 0 ; *oid =kmalloc (size *sizeof (unsigned long ),GFP_ATOMIC );
fs/cifs/cifsfs.c +2 -0
@@ -175,6 +175,8 @@ out_no_root:if (inode)iput (inode); +cifs_umount (sb, cifs_sb); + out_mount_failed:if (cifs_sb) {#ifdef CONFIG_CIFS_DFS_UPCALL
fs/cifs/inode.c +1 -0
@@ -639,6 +639,7 @@ struct inode *cifs_iget(struct super_block *sb, unsigned long ino) inode->i_fop = &simple_dir_operations; inode->i_uid = cifs_sb->mnt_uid; inode->i_gid = cifs_sb->mnt_gid; + }else if (rc) {_FreeXid (xid);iget_failed (inode);return ERR_PTR (rc);
include/asm-sparc64/futex.h +1 -1
@@ -59,7 +59,7 @@ static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr)__futex_cas_op ("or\t%2, %4, %1" , ret, oldval, uaddr, oparg);break ;case FUTEX_OP_ANDN : -__futex_cas_op ("and\t%2, %4, %1" , ret, oldval, uaddr, oparg); +__futex_cas_op ("andn\t%2, %4, %1" , ret, oldval, uaddr, oparg);break ;case FUTEX_OP_XOR :__futex_cas_op ("xor\t%2, %4, %1" , ret, oldval, uaddr, oparg);
include/asm-x86/spinlock.h +2 -2
@@ -75,7 +75,7 @@ static inline int __raw_spin_is_contended(raw_spinlock_t *lock) {int tmp = *(volatile signed int *)(&(lock)->slock); -return (((tmp >>8 ) &0xff ) - (tmp &0xff )) >1 ; +return (((tmp >>8 ) - tmp) &0xff ) >1 ; }static inline void __raw_spin_lock (raw_spinlock_t *lock)
@@ -141,7 +141,7 @@ static inline int __raw_spin_is_contended(raw_spinlock_t *lock) {int tmp = *(volatile signed int *)(&(lock)->slock); -return (((tmp >>16 ) &0xffff ) - (tmp &0xffff )) >1 ; +return (((tmp >>16 ) - tmp) &0xffff ) >1 ; }static inline void __raw_spin_lock (raw_spinlock_t *lock)
include/linux/usb/serial.h +2 -1
@@ -18,7 +18,8 @@#include <linux/mutex.h> #define SERIAL_TTY_MAJOR 188/* Nice legal number now */ -#define SERIAL_TTY_MINORS 255/* loads of devices :) */ +#define SERIAL_TTY_MINORS 254/* loads of devices :) */ +#define SERIAL_TTY_NO_MINOR 255/* No minor was assigned */ /* The maximum number of ports one device can grab at once */ #define MAX_NUM_PORTS 8
include/video/radeon.h +7 -2
@@ -527,8 +527,9 @@/* DSTCACHE_CTLSTAT bit constants */ -#define RB2D_DC_FLUSH (3 << 0) -#define RB2D_DC_FLUSH_ALL 0xf +#define RB2D_DC_FLUSH_2D (1 << 0) +#define RB2D_DC_FREE_2D (1 << 2) +#define RB2D_DC_FLUSH_ALL (RB2D_DC_FLUSH_2D | RB2D_DC_FREE_2D)#define RB2D_DC_BUSY (1 << 31)
@@ -741,6 +742,10 @@#define SOFT_RESET_RB (1 << 6)#define SOFT_RESET_HDP (1 << 7) +/* WAIT_UNTIL bit constants */ +#define WAIT_DMA_GUI_IDLE (1 << 9) +#define WAIT_2D_IDLECLEAN (1 << 16) +/* SURFACE_CNTL bit consants */ #define SURF_TRANSLATION_DIS (1 << 8)#define NONSURF_AP0_SWP_16BPP (1 << 20)
kernel/posix-timers.c +14 -5
@@ -290,21 +290,29 @@ void do_schedule_next_timer(struct siginfo *info)else schedule_next_timer (timr); - info->si_overrun = timr->it_overrun_last; + info->si_overrun += timr->it_overrun_last; }if (timr)unlock_timer (timr, flags); } -int posix_timer_event (struct k_itimer *timr,int si_private) +int posix_timer_event (struct k_itimer *timr,int si_private) { -memset (&timr->sigq->info,0 ,sizeof (siginfo_t)); +/* +* FIXME: if ->sigq is queued we can race with +* dequeue_signal()->do_schedule_next_timer(). +* +* If dequeue_signal() sees the "right" value of +* si_sys_private it calls do_schedule_next_timer(). +* We re-queue ->sigq and drop ->it_lock(). +* do_schedule_next_timer() locks the timer +* and re-schedules it while ->sigq is pending. +* Not really bad, but not that we want. +*/ timr->sigq->info.si_sys_private = si_private; -/* Send signal to the process that owns this timer.*/ timr->sigq->info.si_signo = timr->it_sigev_signo; - timr->sigq->info.si_errno =0 ; timr->sigq->info.si_code =SI_TIMER ; timr->sigq->info.si_tid = timr->it_id; timr->sigq->info.si_value = timr->it_sigev_value;
@@ -438,6 +446,7 @@ static struct k_itimer * alloc_posix_timer(void)kmem_cache_free (posix_timers_cache, tmr); tmr =NULL ; } +memset (&tmr->sigq->info,0 ,sizeof (siginfo_t));return tmr; }
kernel/relay.c +11 -1
@@ -803,6 +803,10 @@ static void relay_file_read_consume(struct rchan_buf *buf,size_t n_subbufs = buf->chan->n_subbufs;size_t read_subbuf; +if (buf->subbufs_produced == buf->subbufs_consumed && + buf->offset == buf->bytes_consumed) +return ; +if (buf->bytes_consumed + bytes_consumed > subbuf_size) {relay_subbufs_consumed (buf->chan, buf->cpu,1 ); buf->bytes_consumed =0 ;
@@ -834,6 +838,8 @@ static int relay_file_read_avail(struct rchan_buf *buf, size_t read_pos)relay_file_read_consume (buf, read_pos,0 ); + consumed = buf->subbufs_consumed; +if (unlikely (buf->offset > subbuf_size)) {if (produced == consumed)return 0 ;
@@ -852,8 +858,12 @@ static int relay_file_read_avail(struct rchan_buf *buf, size_t read_pos)if (consumed > produced) produced += n_subbufs * subbuf_size; -if (consumed == produced) +if (consumed == produced) { +if (buf->offset == subbuf_size && + buf->subbufs_produced > buf->subbufs_consumed) +return 1 ;return 0 ; + }return 1 ; }
kernel/signal.c +1 -0
@@ -1312,6 +1312,7 @@ int send_sigqueue(int sig, struct sigqueue *q, struct task_struct *p) ret =-1 ; goto out_err; } + q->info.si_overrun =0 ;if (unlikely (!list_empty (&q->list))) {/*
lib/random32.c +27 -21
77 lines not on this page · raw message
mm/memory.c +13 -3
@@ -2618,16 +2618,26 @@ int make_pages_present(unsigned long addr, unsigned long end) vma =find_vma (current->mm, addr);if (!vma) -return -1 ; +return -ENOMEM ; write = (vma->vm_flags &VM_WRITE ) !=0 ;BUG_ON (addr >= end);BUG_ON (end > vma->vm_end); len =DIV_ROUND_UP (end,PAGE_SIZE ) - addr/PAGE_SIZE ; ret =get_user_pages (current, current->mm, addr, len, write,0 ,NULL ,NULL ); -if (ret <0 ) +if (ret <0 ) { +/* +SUS require strange return value to mlock +- invalid addr generate to ENOMEM. +- out of memory should generate EAGAIN. +*/ +if (ret == -EFAULT ) + ret = -ENOMEM ; +else if (ret == -ENOMEM ) + ret = -EAGAIN ;return ret; -return ret == len ?0 :-1 ; + } +return ret == len ?0 : -ENOMEM ; }#if !defined(__HAVE_ARCH_GATE_AREA)
mm/mlock.c +0 -2
@@ -78,8 +78,6 @@ success: mm->locked_vm -= pages; out: -if (ret == -ENOMEM ) - ret = -EAGAIN ;return ret; }
net/dccp/proto.c +5 -0
@@ -477,6 +477,11 @@ static int dccp_setsockopt_change(struct sock *sk, int type,if (copy_from_user (&opt, optval,sizeof (opt)))return -EFAULT ; +/* +* rfc4340: 6.1. Change Options +*/ +if (opt.dccpsf_len <1 ) +return -EINVAL ; val =kmalloc (opt.dccpsf_len,GFP_KERNEL );if (!val)
net/ipv4/ipvs/ip_vs_est.c +5 -2
@@ -172,8 +172,11 @@ void ip_vs_kill_estimator(struct ip_vs_stats *stats)kfree (est); killed++; } -if (killed && est_list ==NULL ) -del_timer_sync (&est_timer); +while (killed && !est_list &&try_to_del_timer_sync (&est_timer) <0 ) { +write_unlock_bh (&est_lock); +cpu_relax (); +write_lock_bh (&est_lock); + }write_unlock_bh (&est_lock); }
net/ipv4/netfilter/nf_nat_snmp_basic.c +1 -1
@@ -438,8 +438,8 @@ static unsigned char asn1_oid_decode(struct asn1_ctx *ctx, unsigned int *len) {unsigned long subid; -unsigned int size;unsigned long *optr; +size_t size; size = eoc - ctx->pointer +1 ;
net/ipv6/ip6_output.c +4 -0
@@ -229,6 +229,10 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,skb_reset_network_header (skb); hdr =ipv6_hdr (skb); +/* Allow local fragmentation. */ +if (ipfragok) + skb->local_df =1 ; +/* * Fill in the IPv6 header */