[S390] cio: allow 0 and 1 as input for channel path status attribute

2007-03-19 Thread Martin Schwidefsky
From: Peter Oberparleiter <[EMAIL PROTECTED]> [S390] cio: allow 0 and 1 as input for channel path status attribute Channel path status can now be modified by writing '0' and '1' to the sysfs status attribute in addition to 'offline' and 'online' respectively. Signed-off-by: Peter Oberparleiter <

[S390] minor fault path optimization.

2007-03-19 Thread Martin Schwidefsky
From: Martin Schwidefsky <[EMAIL PROTECTED]> [S390] minor fault path optimization. The minor fault path has grown a lot in terms of cycles. In particular the kprobes hook is very costly. Optimize the path to save a couple of cycles. If kprobes is enabled more than 300 cycles can be avoided if kp

[S390] zcrypt: fix possible race when unloading zcrypt driver modules

2007-03-19 Thread Martin Schwidefsky
From: Ralph Wuerthner <[EMAIL PROTECTED]> [S390] zcrypt: fix possible race when unloading zcrypt driver modules Move try_module_get() call into spin protected block to prevent zcrypt driver module unload while submitting a request to driver. Signed-off-by: Ralph Wuerthner <[EMAIL PROTECTED]> Sig

[S390] zcrypt: fix possible dead lock in AP bus module

2007-03-19 Thread Martin Schwidefsky
From: Ralph Wuerthner <[EMAIL PROTECTED]> [S390] zcrypt: fix possible dead lock in AP bus module AP bus module uses bus_for_each_dev() in software interrupt context to poll for completed requests which might cause dead locks. Solution: use private AP device list for polling in software interrupt

Re: [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #2]

2007-03-19 Thread David Howells
Alan Cox <[EMAIL PROTECTED]> wrote: > > message transmission. You yourself defined RDM to be a datagram service. > > RxRPC is not, in my opinion, a datagram service, and neither is it a stream > > service. > > Message is what I should have said. socket(2) also says datagram... > Which is just

Re: [2.6 patch] drivers/video/s3fb.c: fix a use-before-check

2007-03-19 Thread Ondrej Zajicek
On Mon, Mar 19, 2007 at 10:25:52AM +0100, Adrian Bunk wrote: > NULL checks should be before the first dereference. > > Spotted by the Coverity checker. > > Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Acked-by: Ondrej Zajicek <[EMAIL PROTECTED]> -- Elen sila lumenn' omentielvo Ondrej 'SanTi

axp question 'bout uname voodoo

2007-03-19 Thread Oliver Falk
Hi! We have a discussion on alpha mailinglist at the moment, because of uname -mpi. AFAIK, uname -m should do some glibc call, which calls kernel, right? However, I have two machines: AS1000A: [EMAIL PROTECTED] ~]# uname -mpi && cat /proc/cpuinfo | grep model alpha alpha alpha cpu model

Re: Scheduling in interrupt and call trace

2007-03-19 Thread Russell King
On Mon, Mar 19, 2007 at 08:37:57PM +0800, railroad seeker wrote: > After that, the program counter must located in BUG(), that is something > like > "(void *)0 = 0" if we really do scheduling in interrupt contxt, and > should cause > the kernel to panic. However, what i got is that the latest prog

Scheduling in interrupt and call trace

2007-03-19 Thread railroad seeker
Hi all: I am tracking a driver bug in arm linux when I got a scheduling in interrupt context panic. I traced into kernel schedule() function, and found that "schedulingin interrupt" is a check point when the process scheduler is invoked, and the callstack reveals that the scheduler is invoked du

Re: [PATCH 2.6.22] Add LED trigger to libata core

2007-03-19 Thread Tony Vroon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Alan Cox wrote: > Gak. I'd rather it stayed out of ata_qc_issue() which is a critical path > for performance. Our command issu is already too heavy and not all > controllers have queueing to absorb that. How many controllers actually > need this hook

Re: [PATCH 1 of 2] block_page_mkwrite() Implementation V2

2007-03-19 Thread Christoph Hellwig
On Mon, Mar 19, 2007 at 09:11:31PM +1100, Nick Piggin wrote: > I've got the patches in -mm now. I hope they will get merged when the > the next window opens. > > I didn't submit the ->page_mkwrite conversion yet, because I didn't > have any callers to look at. It is is slightly less trivial than f

Re: [BUG 2.6.21-rc3-git9] SATA NCQ failure with Samsum HD401LJ

2007-03-19 Thread Pablo Sebastian Greco
Christian wrote: On Sunday 18 March 2007 06:43:09 you wrote: Christian wrote: This does indeed look like a drive side issue to me (the controller is reporting CPBs with response flags 2 which as far as I can tell indicates it's still waiting for the drive to complete the request).

Re: [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3

2007-03-19 Thread William Lee Irwin III
Ingo Molnar wrote: >> what do you think about the idea i suggested: to do an x32_/x64_ prefix >> (or _32/_64 postfix), in a brute-force way, _right away_. I.e. do not >> have any overlap of having both arch/i386/ and arch/x86_64/ and >> arch/x86/ - move everything to arch/x86/ right now. On Sun

Re: [PATCH 2.6.22] Add LED trigger to libata core

2007-03-19 Thread Tejun Heo
Alan Cox wrote: On Mon, 19 Mar 2007 13:42:37 +0900 Tejun Heo <[EMAIL PROTECTED]> wrote: Tony Vroon wrote: This duplicates the IDE core LED trigger in the libata core. I plan to use this by allowing PMU LED control on G5 towers. My test platform is a PowerMac 7,3 (Dual G5 2.0GHz, June 2004) wi

Re: dst_ifdown breaks infiniband?

2007-03-19 Thread Michael S. Tsirkin
> Quoting Alexey Kuznetsov <[EMAIL PROTECTED]>: > Subject: Re: dst_ifdown breaks infiniband? > > Hello! > > > If a device driver sets neigh_destructor in neigh_params, this could > > get called after the device has been unregistered and the driver module > > removed. > > It is the same problem:

Re: dst_ifdown breaks infiniband?

2007-03-19 Thread Michael S. Tsirkin
> Quoting Alexey Kuznetsov <[EMAIL PROTECTED]>: > Subject: Re: dst_ifdown breaks infiniband? > > Hello! > > > If a device driver sets neigh_destructor in neigh_params, this could > > get called after the device has been unregistered and the driver module > > removed. > > It is the same problem:

Re: [PATCH 2.6.22] Add LED trigger to libata core

2007-03-19 Thread Mikael Pettersson
On Mon, 19 Mar 2007 12:46:16 +, Alan Cox wrote: > > > This duplicates the IDE core LED trigger in the libata core. > > > I plan to use this by allowing PMU LED control on G5 towers. My test > > > platform > > > is a PowerMac 7,3 (Dual G5 2.0GHz, June 2004) with a K2 (sata_svw) > > > controll

Re: [BUG 2.6.21-rc3-git9] SATA NCQ failure with Samsum HD401LJ

2007-03-19 Thread Jeff Garzik
Christian wrote: On Monday 19 March 2007 03:48:14 you wrote: Christian wrote: On Sunday 18 March 2007 06:43:09 you wrote: Christian wrote: This does indeed look like a drive side issue to me (the controller is reporting CPBs with response flags 2 which as far as I can tell indicates it's stil

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-19 Thread Bill Irwin
On Sun, Mar 18, 2007 at 03:50:10AM +0100, Nick Piggin wrote: > Yes, that should be the case. So would this mean that nonlinear protections > don't work on regular files? I guess that's OK if Oracle and UML both use > tmpfs/shm? Sometimes ramfs is also used in the Oracle case. I presume that's even

Re: dst_ifdown breaks infiniband?

2007-03-19 Thread Alexey Kuznetsov
Hello! > If a device driver sets neigh_destructor in neigh_params, this could > get called after the device has been unregistered and the driver module > removed. It is the same problem: if dst->neighbour holds neighbour, it should not hold device. parms->dev is not supposed to be used after neig

[PATCH 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-19 Thread Tasos Parisinos
From: Tasos Parisinos <[EMAIL PROTECTED]> This patch changes the crypto/Kconfig and crypto/Makefile and adds crypto/rsa.c and crypto/rsa.h in the source tree. These files add module rsa.o (or rsa.ko) in the kernel (built-in or as a kernel module) and offer an API to do fast modular exponentiat

[PATCH, take3] getrusage() : Fill ru_inblock and ru_oublock fields if possible

2007-03-19 Thread Eric Dumazet
Hi Andrew Here is the third version of this patch. Could you please update mm with it ? As noticed by Oleg, previous versions were wrong, reporting three times SELF values, and no support for RUSAGE_CHILDREN. RUSAGE_CHILDREN support imply we add four fields in signal_struct, to be able to accumu

Re: [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #2]

2007-03-19 Thread Alan Cox
> message transmission. You yourself defined RDM to be a datagram service. > RxRPC is not, in my opinion, a datagram service, and neither is it a stream > service. Message is what I should have said. > Interestingly, searching for SOCK_RDM definitions with google shows there's > some disagreemen

Re: [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #2]

2007-03-19 Thread David Howells
Alan Cox <[EMAIL PROTECTED]> wrote: > > IMHO the problem with classifying RxRPC as a "reliable datagram" > > socket is that even an atomic unidirectional communication isn't a > > single datagram, it's at least 3; there is shared connection state > > Thats fine. Any *reliable* protocol send

Re: [PATCH 2.6.22] Add LED trigger to libata core

2007-03-19 Thread Alan Cox
On Mon, 19 Mar 2007 13:42:37 +0900 Tejun Heo <[EMAIL PROTECTED]> wrote: > Tony Vroon wrote: > > This duplicates the IDE core LED trigger in the libata core. > > I plan to use this by allowing PMU LED control on G5 towers. My test > > platform > > is a PowerMac 7,3 (Dual G5 2.0GHz, June 2004) wit

Re: [PATCH] slab: deal with NULL pointers passed to kmem_cache_free

2007-03-19 Thread Pekka J Enberg
Hi, On Mon, 19 Mar 2007, Andrew Morton wrote: > err, we don't want to do this, do we? It adds overhead for something which > we've carefully taught all our programmers to not do. The only known code > which will benefit from this is buggy. Well, I actually disagree with that. It makes little se

[PATCH] fat/vfat: optionally ignore system timezone offset when reading/writing timestamps

2007-03-19 Thread Paul Collins
Hello, Here is a patch that adds a mount option named "posixtime" that, when enabled, causes the fat/vfat code to not adjust timestamps as they are read/written to/from disk. The intent of the adjustment as performed by the existing code appears to be to present correct timestamps to Windows and

Re: [PATCH] slab: deal with NULL pointers passed to kmem_cache_free

2007-03-19 Thread Andrew Morton
On Mon, 19 Mar 2007 10:27:18 +0200 (EET) Pekka J Enberg <[EMAIL PROTECTED]> wrote: > From: Pekka Enberg <[EMAIL PROTECTED]> > > This changes kmem_cache_free() to deal with NULL objects passed to it. The > current behavior is inconsistent with kfree() so there are callers > passing NULL to kmem

Re: [RFC][PATCH] sys_fallocate() system call

2007-03-19 Thread Heiko Carstens
On Mon, Mar 19, 2007 at 02:54:04PM +0530, Amit K. Arora wrote: > On Fri, Mar 16, 2007 at 04:21:03PM +0100, Heiko Carstens wrote: > > On Fri, Mar 16, 2007 at 08:01:01PM +0530, Amit K. Arora wrote: > > > asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t > > > len) > > > > > > C

Re: i386: Why putting __USER_DS in kernel threads stack initialization?

2007-03-19 Thread linux-os \(Dick Johnson\)
On Sun, 18 Mar 2007, Ahmed S. Darwish wrote: > Hi list, > > Reading the kernel threads initialization code I see: > > int kernel_thread(...) { > > struct pt_regs regs; > memset(®s, 0, sizeof(regs)); > [...] > **regs.xds = __USER_DS; > **regs.xes = __USER_DS; > [...

Re: [PATCH, take2] getrusage() : Fill ru_inblock and ru_oublock fields if possible

2007-03-19 Thread Eric Dumazet
On Monday 19 March 2007 11:53, Oleg Nesterov wrote: > On 03/19, Eric Dumazet wrote: > > +static inline unsigned long task_io_get_inblock(const struct task_struct > > *p) +{ > > + return p->ioac.read_bytes >> 9; > > +} > > > > [...snip...] > > > > @@ -2021,6 +2022,8 @@ static void k_getrusage(stru

Re: [PATCH 00/18] Make common x86 arch area for i386 and x86_64 - Take 2

2007-03-19 Thread Andi Kleen
> And those machines are basically identical to perfectly regular i386 > platforms. For modern (2001+) i386 platforms sure. The problem is the old and the weird. > > So the whole argument that it would "diverge" is total crap. It obviously > won't diverge, simply because the support for old se

Re: [git patches] libata fixes

2007-03-19 Thread Alan Cox
On Mon, Mar 19, 2007 at 08:48:00AM +0100, Paul Rolland wrote: > Would you agree to a patch to add a kernel boot parameter to skip some > ata ports ? It should in theory not be neccessary > I found some archives refering to some "ataX=noprobe", but it seems > to have no effect, and I'd like to res

Re: [patch 13/26] Xen-paravirt_ops: Consistently wrap paravirt ops callsites to make them patchable

2007-03-19 Thread Andi Kleen
On Monday 19 March 2007 00:46, Jeremy Fitzhardinge wrote: > Andi Kleen wrote: > > Yes. All inline assembly tells gcc what registers are clobbered > > and it fills in the tables. Hand clobbering in inline assembly cannot > > be expressed with the current toolchain, so we moved all those > > out of l

Re: [PATCH, take2] getrusage() : Fill ru_inblock and ru_oublock fields if possible

2007-03-19 Thread Oleg Nesterov
On 03/19, Eric Dumazet wrote: > > +static inline unsigned long task_io_get_inblock(const struct task_struct *p) > +{ > + return p->ioac.read_bytes >> 9; > +} > > [...snip...] > > @@ -2021,6 +2022,8 @@ static void k_getrusage(struct task_stru > r->ru_nivcsw = p->signal->cni

Re: [ck] Re: [ANNOUNCE] RSDL completely fair starvation free interactive cpu scheduler

2007-03-19 Thread Helge Hafting
Antonio Vargas wrote: IIRC, about 2 or three years ago (or maybe on the 2.6.10 timeframe), there was a patch which managed to pass the interactive from one app to another when there was a pipe or udp connection between them. This meant that a marked-as-interactive xterm would, when blocked waiti

[RFC] HID bus design overview.

2007-03-19 Thread Li Yu
-- HID bus design overview. -- A. Terms. The device of an driver: this mean the device that this driver matched. B. Design. As we discussed before, The entire HID subsystem is divided into three layers:

[PATCH, take2] getrusage() : Fill ru_inblock and ru_oublock fields if possible

2007-03-19 Thread Eric Dumazet
Hi Andrew Here is the new version of this patch. Could you please update mm with it ? As noticed by Oleg, first version was wrong, reporting three times SELF values, and no support for RUSAGE_CHILDREN. RUSAGE_CHILDREN support imply we add cinblock and  coublock in signal_struct, to be able to ac

[PATCH]Re: [linux-usb-devel] drivers/usb/misc/iowarrior.c: NULL dereference

2007-03-19 Thread Oliver Neukum
Am Montag, 19. März 2007 10:25 schrieb Adrian Bunk: > The Coverity checker spotted the following NULL dereference: And this fixes an oops upon allocation failures. Regards Oliver Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]> - --- linux-2.6.21-rc4/drivers/usb/misc

Re: I can't compile with success because ueagle-atm.ko undefined

2007-03-19 Thread Thibaud Hulin
Sorry, I tried the kernel 2.6.19 and patched it with suspend2 for 2.6.19 For 2.6.20, suspend2 is on development, so I can't use it Adrian Bunk a écrit : On Sun, Mar 18, 2007 at 12:07:51AM +0100, Thibaud Hulin wrote: Hi, I can't compile with success my kernel, i've got this error message :

Re: [RFC: 2.6.21 patch] fix sound/pci/ice1712/wtm.c:wtm_init()

2007-03-19 Thread Takashi Iwai
At Mon, 19 Mar 2007 10:24:38 +0100, Adrian Bunk wrote: > > The Coverity checker spotted this bogus for() loop that produces an > array overrun. Hmm, I'm dense now before a caffee, but how can it overrun...? > > It seems what actually should be done is quite simple? Yes... unless someone wants

Re: [PATCH 1 of 2] block_page_mkwrite() Implementation V2

2007-03-19 Thread Nick Piggin
Nick Piggin wrote: David Chinner wrote: On Mon, Mar 19, 2007 at 05:37:03PM +1100, Nick Piggin wrote: David Chinner wrote: +block_page_mkwrite(struct vm_area_struct *vma, struct page *page, + get_block_t get_block) +{ +struct inode *inode = vma->vm_file->f_path.dentry->d_inod

Re: [linux-usb-devel] drivers/usb/misc/iowarrior.c: NULL dereference

2007-03-19 Thread Oliver Neukum
Am Montag, 19. März 2007 10:25 schrieb Adrian Bunk: > static ssize_t iowarrior_write(struct file *file, >const char __user *user_buffer, >size_t count, loff_t *ppos) > { > ... > if (!int_out_urb) { >

Re: [PATCH RESEND 2/2] Fix some kallsyms_lookup() vs rmmod races

2007-03-19 Thread Alexey Dobriyan
On Sat, Mar 17, 2007 at 08:37:18PM +1100, Rusty Russell wrote: > On Fri, 2007-03-16 at 12:51 +0100, Ingo Molnar wrote: > > * Alexey Dobriyan <[EMAIL PROTECTED]> wrote: > > > > > [cc'ing folks whose proc files are affected] > > > > > > kallsyms_lookup() can call module_address_lookup() which iterate

Re: [PATCH 1 of 2] block_page_mkwrite() Implementation V2

2007-03-19 Thread Nick Piggin
Christoph Hellwig wrote: On Mon, Mar 19, 2007 at 10:30:08AM +1100, David Chinner wrote: Generic page_mkwrite functionality. Filesystems that make use of the VM ->page_mkwrite() callout will generally use the same core code to implement it. There are several tricky truncate-related issues that

Re: sysfs_drop_dentry(): possible NULL dereference

2007-03-19 Thread Oliver Neukum
Am Montag, 19. März 2007 10:22 schrieb Adrian Bunk: > void sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent) > { > struct dentry * dentry = sd->s_dentry; > + struct inode *inode; > > if (dentry) { > spin_lock(&dcache_lock); >

Re: [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #2]

2007-03-19 Thread Alan Cox
> IMHO the problem with classifying RxRPC as a "reliable datagram" > socket is that even an atomic unidirectional communication isn't a > single datagram, it's at least 3; there is shared connection state Thats fine. Any *reliable* protocol sends more than one packet per message you send. RD

Re: [PATCH 1 of 2] block_page_mkwrite() Implementation V2

2007-03-19 Thread Nick Piggin
David Chinner wrote: On Mon, Mar 19, 2007 at 05:37:03PM +1100, Nick Piggin wrote: David Chinner wrote: +block_page_mkwrite(struct vm_area_struct *vma, struct page *page, + get_block_t get_block) +{ + struct inode *inode = vma->vm_file->f_path.dentry->d_inode; +

Re: [PATCH 3/4] tty: Introduce no_tty and use it in selinux

2007-03-19 Thread Alan Cox
On Sun, 18 Mar 2007 13:08:34 -0600 [EMAIL PROTECTED] (Eric W. Biederman) wrote: > > While researching the tty layer pid leaks I found a weird case in > selinux when we drop a controlling tty because of inadequate > permissions we don't do the normal hangup processing. Which is a > problem if it

Re: dst_ifdown breaks infiniband?

2007-03-19 Thread Michael S. Tsirkin
> Quoting Michael S. Tsirkin <[EMAIL PROTECTED]>: > Subject: Re: dst_ifdown breaks infiniband? > > > > Any simpler ideas? > > > > Well, if inifiniband destructor really needs to take that lock... no. > > Right now I do not see. > > OK, this is actually not hard to fix - for infiniband, we can ju

Re: [PATCH RESEND 2/2] Fix some kallsyms_lookup() vs rmmod races

2007-03-19 Thread Alexey Dobriyan
On Fri, Mar 16, 2007 at 08:27:29PM +, Paulo Marques wrote: > Andrew Morton wrote: > >On Fri, 16 Mar 2007 17:16:39 + Paulo Marques <[EMAIL PROTECTED]> > >wrote: > > > >>Does freeze_processes() / unfreeze_processes() solve this by only > >>freezing processes that have voluntarily scheduled

Re: [ofa-general] drivers/infiniband/ulp/ipoib/ipoib_main.c: use-after-free

2007-03-19 Thread Michael S. Tsirkin
> Quoting Adrian Bunk <[EMAIL PROTECTED]>: > Subject: [ofa-general] drivers/infiniband/ulp/ipoib/ipoib_main.c: > use-after-free > > The Coverity checker spotted the following code introduced by > commit 839fcaba355abaffb7b44f0f4504093acb0b11cf: > > <-- snip --> > > ... > static void path_rec_

Re: dst_ifdown breaks infiniband?

2007-03-19 Thread Michael S. Tsirkin
> > Any simpler ideas? > > Well, if inifiniband destructor really needs to take that lock... no. > Right now I do not see. OK, this is actually not hard to fix - for infiniband, we can just look at neighbour->dev->type or compare neighbour->dev and neighbour->parms->dev - if they are different, d

Re: [ofa-general] Re: dst_ifdown breaks infiniband?

2007-03-19 Thread Alexey Kuznetsov
Hello! > I think the thing to do is to just leave the loopback references > in place, try to unregister the per-namespace loopback device, > and that will safely wait for all the references to go away. Yes, it is exactly how it works in openvz. All the sockets are killed, queues are cleared, nobo

[2.6.21 patch] net/sunrpc/svcsock.c: fix a check

2007-03-19 Thread Adrian Bunk
The return value of kernel_recvmsg() should be assigned to "err", not compared with the random value of a never initialized "err" (and the "< 0" check wrongly always returned false since == comparisons never have a result < 0). Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <[EMAIL

Re: [ofa-general] Re: dst_ifdown breaks infiniband?

2007-03-19 Thread Michael S. Tsirkin
> Quoting Alexey Kuznetsov <[EMAIL PROTECTED]>: > Subject: Re: [ofa-general] Re: dst_ifdown breaks infiniband? > > > Does this look sane (untested)? > > It does not, unfortunately. > > Instead of regular crash in infiniband you will get numerous > random NULL pointer dereferences both due to dst

drivers/infiniband/hw/cxgb3/iwch_provider.c: uninitialized variable used

2007-03-19 Thread Adrian Bunk
The Coverity checker spotted that "npages" will be used uninitialized in the following code if !(mr_rereg_mask & IB_MR_REREG_TRANS): <-- snip --> ... static int iwch_reregister_phys_mem(struct ib_mr *mr, int mr_rereg_mask,

Re: [RFC][PATCH] sys_fallocate() system call

2007-03-19 Thread Amit K. Arora
On Sat, Mar 17, 2007 at 04:33:50PM +1100, Stephen Rothwell wrote: > On Fri, 16 Mar 2007 20:01:01 +0530 "Amit K. Arora" <[EMAIL PROTECTED]> wrote: > > > > > +asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len); > > > > --- linux-2.6.20.1.orig/include/asm-powerpc/systbl.h > >

Re: [PATCH 1/2] fs: remove duplicated iovec checking code v8

2007-03-19 Thread Christoph Hellwig
On Mon, Mar 19, 2007 at 10:49:01AM +0300, Dmitriy Monakhov wrote: > > Where are several places where the same code used for iovec checks. > This patch just move this code to separate helper function, and replace > duplicated code with it. IMHO it is better because these are checks that > we want f

[RFC: 2.6.21 patch] fix sound/pci/ice1712/wtm.c:wtm_init()

2007-03-19 Thread Adrian Bunk
The Coverity checker spotted this bogus for() loop that produces an array overrun. It seems what actually should be done is quite simple? Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> --- sound/pci/ice1712/wtm.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) --- lin

[2.6 patch] drivers/video/s3fb.c: fix a use-before-check

2007-03-19 Thread Adrian Bunk
NULL checks should be before the first dereference. Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> --- --- linux-2.6.21-rc3-mm2/drivers/video/s3fb.c.old 2007-03-19 09:20:22.0 +0100 +++ linux-2.6.21-rc3-mm2/drivers/video/s3fb.c 2007-03-19 09:21:07

[2.6 patch] drivers/mfd/sm501.c: fix an off-by-one

2007-03-19 Thread Adrian Bunk
This patch fixes an off-by-one spotted by the Coverity checker. Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> --- --- linux-2.6.21-rc3-mm2/drivers/mfd/sm501.c.old2007-03-19 09:09:57.0 +0100 +++ linux-2.6.21-rc3-mm2/drivers/mfd/sm501.c2007-03-19 09:15:12.0 +0100 @@ -

drivers/usb/misc/iowarrior.c: NULL dereference

2007-03-19 Thread Adrian Bunk
The Coverity checker spotted the following NULL dereference: <-- snip --> ... static ssize_t iowarrior_write(struct file *file, const char __user *user_buffer, size_t count, loff_t *ppos) { ... if (!int_out_urb) {

[2.6 patch] drivers/usb/input/gtco.c: fix a use-before-check

2007-03-19 Thread Adrian Bunk
NULL checks should be before the first dereference. Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> --- --- linux-2.6.21-rc3-mm2/drivers/usb/input/gtco.c.old 2007-03-19 09:29:44.0 +0100 +++ linux-2.6.21-rc3-mm2/drivers/usb/input/gtco.c 2007-03-19

drivers/message/fusion/mptsas.c: inconsequent NULL checking

2007-03-19 Thread Adrian Bunk
The Coverity checker spotted the following inconsequent NULL checking in drivers/message/fusion/mptsas.c: <-- snip --> ... static void mptsas_delete_expander_phys(MPT_ADAPTER *ioc) { ... if (port_info->phy_info && (!(port_info->phy_info[0].identify.device_inf

Re: [ofa-general] Re: dst_ifdown breaks infiniband?

2007-03-19 Thread Alexey Kuznetsov
Hello! > Does this look sane (untested)? It does not, unfortunately. Instead of regular crash in infiniband you will get numerous random NULL pointer dereferences both due to dst->neighbour and due to dst->dev. Alexey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

Re: [RFC][PATCH] sys_fallocate() system call

2007-03-19 Thread Amit K. Arora
On Fri, Mar 16, 2007 at 04:21:03PM +0100, Heiko Carstens wrote: > On Fri, Mar 16, 2007 at 08:01:01PM +0530, Amit K. Arora wrote: > > First of all, thanks for the overwhelming response! > > > > Based on the suggestions received, I have added a new parameter to the > > sys_fallocate() system call -

drivers/video/aty/atyfb_base.c: array overruns

2007-03-19 Thread Adrian Bunk
The Coverity checker spotted the following two array overruns in drivers/video/aty/atyfb_base.c: <-- snip --> ... static const u32 lt_lcd_regs[] = { CONFIG_PANEL_LG, LCD_GEN_CNTL_LG, DSTN_CONTROL_LG, HFB_PITCH_ADDR_LG, HORZ_STRETCHING_LG, VERT_ST

drivers/infiniband/ulp/ipoib/ipoib_main.c: use-after-free

2007-03-19 Thread Adrian Bunk
The Coverity checker spotted the following code introduced by commit 839fcaba355abaffb7b44f0f4504093acb0b11cf: <-- snip --> ... static void path_rec_completion(int status, struct ib_sa_path_rec *pathrec, void *path_ptr) { ...

[2.6 patch] x25_forward_call(): fix NULL dereferences

2007-03-19 Thread Adrian Bunk
This patch fixes two NULL dereferences spotted by the Coverity checker. For a better understanding, the "diff -uwp" output (that ignores the indentation changes) is: --- linux-2.6.21-rc3-mm2/net/x25/x25_forward.c.old 2007-03-19 02:28:34.0 +0100 +++ linux-2.6.21-rc3-mm2/net/x25/x25_

sysfs_drop_dentry(): possible NULL dereference

2007-03-19 Thread Adrian Bunk
The Coverity checker spotted the following incorrect part of commit 94bebf4d1b8e7719f0f3944c037a21cfd99a4af7: <-- snip --> ... void sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent) { struct dentry * dentry = sd->s_dentry; + struct inode *inode; if (d

drivers/message/fusion/mptscsih.c: inconsequent NULL checking

2007-03-19 Thread Adrian Bunk
The Coverity checker spotted the following inconsequent NULL checking in drivers/message/fusion/mptscsih.c: <-- snip --> ... int mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) { ... if (vdev && (vdev->vtarget->tflags & MPT_TARGET_FLAGS_Q_YES)

Re: [PATCH 1 of 2] block_page_mkwrite() Implementation V2

2007-03-19 Thread Christoph Hellwig
On Mon, Mar 19, 2007 at 10:30:08AM +1100, David Chinner wrote: > > Generic page_mkwrite functionality. > > Filesystems that make use of the VM ->page_mkwrite() callout will generally > use > the same core code to implement it. There are several tricky truncate-related > issues that we need to de

[-mm patch] remove mmc_deselect_cards()

2007-03-19 Thread Adrian Bunk
On Thu, Mar 08, 2007 at 06:47:48AM +0100, Pierre Ossman wrote: > Adrian Bunk wrote: > > On Tue, Mar 06, 2007 at 12:44:08AM -0800, Andrew Morton wrote: > >> ... > >> Changes since 2.6.20-rc2-mm1: > >> ... > >> git-mmc.patch > >> ... > >> git trees > >> ... > > > > mmc_deselect_cards() is no longe

fs/dlm/lowcomms-tcp.c: error handling bug

2007-03-19 Thread Adrian Bunk
The Coverity checker spotted that the following part of commit bd44e2b007bc9024bce3357c185b38c73f87c3dd is obviously bogus: <-- snip --> --- a/fs/dlm/lowcomms-tcp.c +++ b/fs/dlm/lowcomms-tcp.c @@ -327,6 +327,9 @@ static int receive_from_sock(struct connection *con) if (ret <= 0)

Re: [ofa-general] Re: dst_ifdown breaks infiniband?

2007-03-19 Thread Alexey Kuznetsov
Hello! > Well I don't think the loopback device is currently but as soon > as we get network namespace support we will have multiple loopback > devices and they will get unregistered when we remove the network > namespace. There is no logical difference. At the moment when namespace is gone there

Re: 2.6.20-rt8 patch tweaked for 2.6.20.3

2007-03-19 Thread John
John wrote: I've tweaked patch-2.6.20-rt8 so that it applies to 2.6.20.3 The unified diff is attached to this message. I'd be happy to hear comments on what I've done wrong! Would anybody care to comment on the patch? :-) I made 4 simple edits. linux/Makefile trivial fix for EXTRAVERSION

Re: 2.6.20.3: kernel BUG at mm/slab.c:597 try#2

2007-03-19 Thread Pekka Enberg
On 3/19/07, Pekka Enberg <[EMAIL PROTECTED]> wrote: You can see that mempool_free is passing a NULL pointer to kmem_cache_free() which doesn't handle it properly. The NULL pointer comes from bio_free() where ->bi_io_vec is NULL because nr_iovecs passed to bio_alloc_bioset() was zero. The questi

Re: 2.6.20.3: kernel BUG at mm/slab.c:597 try#2

2007-03-19 Thread Pekka Enberg
On 3/19/07, Pekka Enberg <[EMAIL PROTECTED]> wrote: EIP is at kmem_cache_free+0x29/0x5a eax: c180 ebx: f0ae12c0 ecx: c18f73c0 edx: c180 esi: c1919de0 edi: ebp: 1000 esp: f1fe7e14 ds: 007b es: 007b ss: 0068 But somehow eax and edx have the same value 0xc18

[PATCH] slab: deal with NULL pointers passed to kmem_cache_free

2007-03-19 Thread Pekka J Enberg
From: Pekka Enberg <[EMAIL PROTECTED]> This changes kmem_cache_free() to deal with NULL objects passed to it. The current behavior is inconsistent with kfree() so there are callers passing NULL to kmem_cache_free(). Andreas, can you please confirm this fixes the oops you reported on linux-scsi

Re: 2.6.20*: PATA DMA timeout, hangs (2)

2007-03-19 Thread Tejun Heo
Alistair John Strachan wrote: On Monday 12 March 2007 13:25, Frank van Maarseveen wrote: [snip] So, are /dev/hd* going to disappear in a few years? iow, does it make sense to _slowly_ start to migrate to /dev/sd*? How would you propose doing this? I'm sure modern distros with an initrd/initra

Re: yes --help (was: [PATCH] Sanitize filesystem NLS handling)

2007-03-19 Thread Alexander E. Patrakov
Bernd Eckenfels wrote: > In article <[EMAIL PROTECTED]> you wrote: > > 2) Output of "yes --help" from the same terminal > > Question: what do you expect? A Japanese version of the help text. Unfortunately, LKML rejected it as SPAM, so I'll redirect you to the graphical rendering of it: http://ww

Re: [PATCH 1 of 2] block_page_mkwrite() Implementation V2

2007-03-19 Thread David Chinner
On Mon, Mar 19, 2007 at 05:37:03PM +1100, Nick Piggin wrote: > David Chinner wrote: > > > >+/* > >+ * block_page_mkwrite() is not allowed to change the file size as it gets > >+ * called from a page fault handler when a page is first dirtied. Hence > >we must > >+ * be careful to check for EOF co

Re: 2.6.20.3: kernel BUG at mm/slab.c:597 try#2

2007-03-19 Thread Pekka Enberg
On 3/19/07, Andrew Morton <[EMAIL PROTECTED]> wrote: BUG_ON(!PageSlab(page)); that's seriously screwed up. Do you have CONFIG_DEBUG_SLAB enabled? If not, please enable it and retest. This is scary. Looking at disassembly of the OOPS: Disassembly of section .text: <.text>:

<    1   2   3   4   5