safe/jmp/linux-2.6
18 years ago[SK_BUFF] kernel-doc: fix skbuff warnings
Randy Dunlap [Wed, 19 Oct 2005 05:07:41 +0000 (22:07 -0700)]
[SK_BUFF] kernel-doc: fix skbuff warnings

Add kernel-doc to skbuff.h, skbuff.c to eliminate kernel-doc warnings.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[IPV4]: Remove dead code from ip_output.c
Jayachandran C [Thu, 13 Oct 2005 18:43:02 +0000 (11:43 -0700)]
[IPV4]: Remove dead code from ip_output.c

skb_prev is assigned from skb, which cannot be NULL. This patch removes the
unnecessary NULL check.

Signed-off-by: Jayachandran C. <c.jayachandran at gmail.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[NETLINK]: Remove dead code in af_netlink.c
Jayachandran C [Thu, 13 Oct 2005 18:43:05 +0000 (11:43 -0700)]
[NETLINK]: Remove dead code in af_netlink.c

Remove the variable nlk & call to nlk_sk as it does not have any side effect.

Signed-off-by: Jayachandran C. <c.jayachandran at gmail.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[IPSEC]: Kill obsolete get_mss function
Herbert Xu [Sat, 15 Oct 2005 00:58:30 +0000 (10:58 +1000)]
[IPSEC]: Kill obsolete get_mss function

Now that we've switched over to storing MTUs in the xfrm_dst entries,
we no longer need the dst's get_mss methods.  This patch gets rid of
them.

It also documents the fact that our MTU calculation is not optimal
for ESP.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[IPV4]: Kill redundant rcu_dereference on fa_info
Herbert Xu [Fri, 14 Oct 2005 23:42:39 +0000 (09:42 +1000)]
[IPV4]: Kill redundant rcu_dereference on fa_info

This patch kills a redundant rcu_dereference on fa->fa_info in fib_trie.c.
As this dereference directly follows a list_for_each_entry_rcu line, we
have already taken a read barrier with respect to getting an entry from
the list.

This read barrier guarantees that all values read out of fa are valid.
In particular, the contents of structure pointed to by fa->fa_info is
initialised before fa->fa_info is actually set (see fn_trie_insert);
the setting of fa->fa_info itself is further separated with a write
barrier from the insertion of fa into the list.

Therefore by taking a read barrier after obtaining fa from the list
(which is given by list_for_each_entry_rcu), we can be sure that
fa->fa_info contains a valid pointer, as well as the fact that the
data pointed to by fa->fa_info is itself valid.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[NETFILTER] ip_conntrack: Make "hashsize" conntrack parameter writable
Harald Welte [Sun, 16 Oct 2005 12:22:59 +0000 (14:22 +0200)]
[NETFILTER] ip_conntrack: Make "hashsize" conntrack parameter writable

It's fairly simple to resize the hash table, but currently you need to
remove and reinsert the module.  That's bad (we lose connection
state).  Harald has even offered to write a daemon which sets this
based on load.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[PKTGEN]: proc interface revision
Stephen Hemminger [Fri, 14 Oct 2005 22:42:33 +0000 (15:42 -0700)]
[PKTGEN]: proc interface revision

The code to handle the /proc interface can be cleaned up in several places:
* use seq_file for read
* don't need to remember all the filenames separately
* use for_online_cpu's
* don't vmalloc a buffer for small command from user.

Committer note:
This patch clashed with John Hawkes's "[NET]: Wider use of for_each_*cpu()",
so I fixed it up manually.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[PKTGEN]: Spelling and white space
Stephen Hemminger [Fri, 14 Oct 2005 22:32:22 +0000 (15:32 -0700)]
[PKTGEN]: Spelling and white space

Fix some cosmetic issues. Indentation, spelling errors, and some whitespace.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[PKTGEN]: Use kzalloc
Stephen Hemminger [Fri, 14 Oct 2005 22:29:48 +0000 (15:29 -0700)]
[PKTGEN]: Use kzalloc

These are cleanup patches for pktgen that can go in 2.6.15
Can use kzalloc in a couple of places.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[PKTGEN]: Sleeping function called under lock
Stephen Hemminger [Fri, 14 Oct 2005 22:26:34 +0000 (15:26 -0700)]
[PKTGEN]: Sleeping function called under lock

pktgen is calling kmalloc GFP_KERNEL and vmalloc with lock held.
The simplest fix is to turn the lock into a semaphore, since the
thread lock is only used for admin control from user context.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[NET]: Wider use of for_each_*cpu()
John Hawkes [Thu, 13 Oct 2005 16:30:31 +0000 (09:30 -0700)]
[NET]: Wider use of for_each_*cpu()

In 'net' change the explicit use of for-loops and NR_CPUS into the
general for_each_cpu() or for_each_online_cpu() constructs, as
appropriate.  This widens the scope of potential future optimizations
of the general constructs, as well as takes advantage of the existing
optimizations of first_cpu() and next_cpu(), which is advantageous
when the true CPU count is much smaller than NR_CPUS.

Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[DECNET]: Remove some redundant ifdeffed code
Patrick Caulfield [Tue, 11 Oct 2005 07:22:33 +0000 (08:22 +0100)]
[DECNET]: Remove some redundant ifdeffed code

Signed-off-by: Patrick Caulfield <patrick@tykepenguin.com>
Signed-off-by: Steven Whitehouse <steve@chygwyn.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[LLC]: Strip RIF flag from source MAC address
Jochen Friedrich [Sun, 23 Oct 2005 08:33:52 +0000 (10:33 +0200)]
[LLC]: Strip RIF flag from source MAC address

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[TR]: Preserve RIF flag even for 2 byte RIF fields.
Jochen Friedrich [Sun, 23 Oct 2005 08:31:45 +0000 (10:31 +0200)]
[TR]: Preserve RIF flag even for 2 byte RIF fields.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[IPV6]: Fix refcnt of struct ip6_flowlabel
Yan Zheng [Mon, 24 Oct 2005 11:55:23 +0000 (19:55 +0800)]
[IPV6]: Fix refcnt of struct ip6_flowlabel

Signed-off-by: Yan Zheng <yanzheng@21cn.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[PATCH] qlogic lockup fix
Andrew Morton [Tue, 25 Oct 2005 18:00:56 +0000 (11:00 -0700)]
[PATCH] qlogic lockup fix

If qla2x00_probe_one()'s call to qla2x00_iospace_config() fails, we call
qla2x00_free_device() to clean up.  But because ha->dpc_pid hasn't been set
yet, qla2x00_free_device() tries to stop a kernel thread which hasn't started
yet.  It does wait_for_completion() against an uninitialised completion struct
and the kernel hangs up.

Fix it by initialising ha->dpc_pid a bit earlier.

Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] alpha: atomic dependency fix
Andrew Morton [Tue, 25 Oct 2005 06:05:58 +0000 (23:05 -0700)]
[PATCH] alpha: atomic dependency fix

My alpha build is exploding because asm/atomic.h now needs smb_mb(), which is
over in the (not included) system.h.

I fear what will happen if I include system.h into atomic.h, so let's put the
barriers into their own header file.

Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Return the line length via sysfs for fbdev
James Simmons [Mon, 24 Oct 2005 20:46:21 +0000 (21:46 +0100)]
[PATCH] Return the line length via sysfs for fbdev

This small patch returns the stride/line length of the framebuffer via
sysfs.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ALSA: Fix Oops of suspend/resume with generic drivers
Takashi Iwai [Mon, 24 Oct 2005 16:16:50 +0000 (18:16 +0200)]
[PATCH] ALSA: Fix Oops of suspend/resume with generic drivers

The patch fixes Oops from sound drivers using generic platform device
but have no suspend/resume callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix compile failure for TT mode
Miklos Szeredi [Mon, 24 Oct 2005 15:49:34 +0000 (17:49 +0200)]
[PATCH] uml: fix compile failure for TT mode

Without this patch, uml compile fails with:

  LD      .tmp_vmlinux1
arch/um/kernel/built-in.o: In function `config_gdb_cb':
arch/um/kernel/tt/gdb.c:129: undefined reference to `TASK_EXTERN_PID'

Tested on i386, but fix needed on x86_64 too AFAICS.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] posix-timers: fix posix_cpu_timer_set() vs run_posix_cpu_timers() race
Oleg Nesterov [Mon, 24 Oct 2005 14:29:58 +0000 (18:29 +0400)]
[PATCH] posix-timers: fix posix_cpu_timer_set() vs run_posix_cpu_timers() race

This might be harmless, but looks like a race from code inspection (I
was unable to trigger it).  I must admit, I don't understand why we
can't return TIMER_RETRY after 'spin_unlock(&p->sighand->siglock)'
without doing bump_cpu_timer(), but this is what original code does.

posix_cpu_timer_set:

read_lock(&tasklist_lock);

spin_lock(&p->sighand->siglock);
list_del_init(&timer->it.cpu.entry);
spin_unlock(&p->sighand->siglock);

We are probaly deleting the timer from run_posix_cpu_timers's 'firing'
local list_head while run_posix_cpu_timers() does list_for_each_safe.

Various bad things can happen, for example we can just delete this timer
so that list_for_each() will not notice it and run_posix_cpu_timers()
will not reset '->firing' flag. In that case,

....

if (timer->it.cpu.firing) {
read_unlock(&tasklist_lock);
timer->it.cpu.firing = -1;
return TIMER_RETRY;
}

sys_timer_settime() goes to 'retry:', calls posix_cpu_timer_set() again,
it returns TIMER_RETRY ...

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] posix-timers: exit path cleanup
Oleg Nesterov [Mon, 24 Oct 2005 10:36:28 +0000 (14:36 +0400)]
[PATCH] posix-timers: exit path cleanup

No need to rebalance when task exited

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] posix-timers: remove false BUG_ON() from run_posix_cpu_timers()
Oleg Nesterov [Mon, 24 Oct 2005 10:34:03 +0000 (14:34 +0400)]
[PATCH] posix-timers: remove false BUG_ON() from run_posix_cpu_timers()

do_exit() clears ->it_##clock##_expires, but nothing prevents
another cpu to attach the timer to exiting process after that.

After exit_notify() does 'write_unlock_irq(&tasklist_lock)' and
before do_exit() calls 'schedule() local timer interrupt can find
tsk->exit_state != 0. If that state was EXIT_DEAD (or another cpu
does sys_wait4) interrupted task has ->signal == NULL.

At this moment exiting task has no pending cpu timers, they were cleaned
up in __exit_signal()->posix_cpu_timers_exit{,_group}(), so we can just
return from irq.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] posix-timers: fix cleanup_timers() and run_posix_cpu_timers() races
Oleg Nesterov [Sun, 23 Oct 2005 16:25:39 +0000 (20:25 +0400)]
[PATCH] posix-timers: fix cleanup_timers() and run_posix_cpu_timers() races

1. cleanup_timers() sets timer->task = NULL under tasklist + ->sighand locks.
   That means that this code in posix_cpu_timer_del() and posix_cpu_timer_set()

    lock_timer(timer);
if (timer->task == NULL)
return;
read_lock(tasklist);
put_task_struct(timer->task)

   is racy. With this patch timer->task modified and accounted only under
   timer->it_lock. Sadly, this means that dead task_struct won't be freed
   until timer deleted or armed.

2. run_posix_cpu_timers() collects expired timers into local list under
   tasklist + ->sighand again. That means that posix_cpu_timer_del()
   should check timer->it.cpu.firing under these locks too.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6
Linus Torvalds [Mon, 24 Oct 2005 00:13:14 +0000 (17:13 -0700)]
Merge /linux/kernel/git/jejb/scsi-for-linus-2.6

18 years ago[PATCH] ib: mthca: Always re-arm EQs in mthca_tavor_interrupt()
Roland Dreier [Sun, 23 Oct 2005 19:57:19 +0000 (12:57 -0700)]
[PATCH] ib: mthca: Always re-arm EQs in mthca_tavor_interrupt()

We should always re-arm an event queue's interrupt in
mthca_tavor_interrupt() if the corresponding bit is set in the event cause
register (ECR), even if we didn't find any entries in the EQ.  If we don't,
then there's a window where we miss an EQ entry and then get stuck because
we don't get another EQ event.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] inotify/idr leak fix
Andrew Morton [Sun, 23 Oct 2005 19:57:18 +0000 (12:57 -0700)]
[PATCH] inotify/idr leak fix

Fix a bug which was reported and diagnosed by
Stefan Jones <stefan.jones@churchillrandoms.co.uk>

IDR trees include a cache of idr_layer objects.  There's no way to destroy
this cache, so when we discard an overall idr tree we end up leaking some
memory.

Add and use idr_destroy() for this.  v9fs and infiniband also need to use
idr_destroy() to avoid leaks.

Or, we make the cache global, like radix_tree_preload().  Which is probably
better.  Later.

Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Robert Love <rml@novell.com>
Cc: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Kconfig: saa7134-dvb should not select cx22702
Mike Krufky [Sun, 23 Oct 2005 19:57:17 +0000 (12:57 -0700)]
[PATCH] Kconfig: saa7134-dvb should not select cx22702

On 2005-05-01, Gerd Knorr sent in a patch to add cx22702 to cx88-dvb:

 [PATCH] dvb: cx22702 frontend driver update
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9990d744bea7d28e83c420e2c9d524c7a8a2d136

...but as we can see, the Kconfig portion of his patch was incorrectly
applied to saa7134-dvb instead of cx88-dvb.

On 2005-06-24, Adrian bunk fixed cx88-dvb:

 [PATCH] VIDEO_CX88_DVB must select DVB_CX22702
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d6988588e13616587aa879c2e0bd7cd811705e5d

...but we never removed the original patch from Gerd.

This patch sets things straight:

saa7134-dvb should not select cx22702

Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] SELinux: handle sel_make_bools() failure in selinuxfs
Davi Arnaut [Sun, 23 Oct 2005 19:57:16 +0000 (12:57 -0700)]
[PATCH] SELinux: handle sel_make_bools() failure in selinuxfs

This patch fixes error handling in sel_make_bools(), where currently we'd
get a memory leak via security_get_bools() and try to kfree() the wrong
pointer if called again.

Signed-off-by: James Morris <jmorris@namei.org>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] selinux: Fix NULL deref in policydb_destroy
Stephen Smalley [Sun, 23 Oct 2005 19:57:15 +0000 (12:57 -0700)]
[PATCH] selinux: Fix NULL deref in policydb_destroy

This patch fixes a possible NULL dereference in policydb_destroy, where
p->type_attr_map can be NULL if policydb_destroy is called to clean up a
partially loaded policy upon an error during policy load.  Please apply.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] aio syscalls are not checked by lsm
Kostik Belousov [Sun, 23 Oct 2005 19:57:13 +0000 (12:57 -0700)]
[PATCH] aio syscalls are not checked by lsm

Another case of missing call to security_file_permission: aio functions
(namely, io_submit) does not check credentials with security modules.

Below is the simple patch to the problem.  It seems that it is enough to
check for rights at the request submission time.

Signed-off-by: Kostik Belousov <kostikbel@gmail.com>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] kernel-parameters cleanup
Randy Dunlap [Sun, 23 Oct 2005 19:57:11 +0000 (12:57 -0700)]
[PATCH] kernel-parameters cleanup

Fix typos & trailing whitespace.
Add blank lines in a few places.
Remove "AM53C974=" option:  driver does not exist.
Restrict to < 80 columns in most places (but don't split formatted
  command-line arguments).
Add a few option arguments for completeness.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agocardbus: limit IO windows to 256 bytes
Linus Torvalds [Sun, 23 Oct 2005 23:31:16 +0000 (16:31 -0700)]
cardbus: limit IO windows to 256 bytes

That's what we've always historically done, and bigger windows seem to
confuse some cardbus bridges. Or something.

Alan reports that this makes the ThinkPad 600x series work properly
again: the 4kB IO window for some reason made IDE DMA not work, which
makes IDE painfully slow even if it works after DMA timeouts.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6
Linus Torvalds [Sun, 23 Oct 2005 17:10:37 +0000 (10:10 -0700)]
Merge /pub/scm/linux/kernel/git/acme/net-2.6

18 years agoPosix timers: limit number of timers firing at once
Linus Torvalds [Sun, 23 Oct 2005 17:02:50 +0000 (10:02 -0700)]
Posix timers: limit number of timers firing at once

Bursty timers aren't good for anybody, very much including latency for
other programs when we trigger lots of timers in interrupt context.  So
set a random limit, after which we'll handle the rest on the next timer
tick.

Noted by Oleg Nesterov <oleg@tv-sign.ru>

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[NEIGH] Fix timer leak in neigh_changeaddr
Herbert Xu [Sun, 23 Oct 2005 07:18:00 +0000 (17:18 +1000)]
[NEIGH] Fix timer leak in neigh_changeaddr

neigh_changeaddr attempts to delete neighbour timers without setting
nud_state.  This doesn't work because the timer may have already fired
when we acquire the write lock in neigh_changeaddr.  The result is that
the timer may keep firing for quite a while until the entry reaches
NEIGH_FAILED.

It should be setting the nud_state straight away so that if the timer
has already fired it can simply exit once we relinquish the lock.

In fact, this whole function is simply duplicating the logic in
neigh_ifdown which in turn is already doing the right thing when
it comes to deleting timers and setting nud_state.

So all we have to do is take that code out and put it into a common
function and make both neigh_changeaddr and neigh_ifdown call it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
18 years ago[NEIGH] Fix add_timer race in neigh_add_timer
Herbert Xu [Sun, 23 Oct 2005 06:37:48 +0000 (16:37 +1000)]
[NEIGH] Fix add_timer race in neigh_add_timer

neigh_add_timer cannot use add_timer unconditionally.  The reason is that
by the time it has obtained the write lock someone else (e.g., neigh_update)
could have already added a new timer.

So it should only use mod_timer and deal with its return value accordingly.

This bug would have led to rare neighbour cache entry leaks.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
18 years ago[NEIGH] Print stack trace in neigh_add_timer
Herbert Xu [Sun, 23 Oct 2005 06:11:39 +0000 (16:11 +1000)]
[NEIGH] Print stack trace in neigh_add_timer

Stack traces are very helpful in determining the exact nature of a bug.
So let's print a stack trace when the timer is added twice.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
18 years ago[PATCH] alpha: additional smp barriers
Ivan Kokshaysky [Fri, 21 Oct 2005 18:06:15 +0000 (22:06 +0400)]
[PATCH] alpha: additional smp barriers

As stated in Documentation/atomic_ops.txt, atomic functions
returning values must have the memory barriers both before and after
the operation.

Thanks to DaveM for pointing that out.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[AX.25]: Fix signed char bug
Ralf Baechle [Fri, 14 Oct 2005 20:29:56 +0000 (21:29 +0100)]
[AX.25]: Fix signed char bug

On architectures where the char type defaults to unsigned some of the
arithmetic in the AX.25 stack to fail, resulting in some packets being dropped
on receive.

Credits for tracking this down and the original patch to
Bob Brose N0QBJ <linuxhams@n0qbj-11.ampr.org>.

Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[SK_BUFF]: ipvs_property field must be copied
Julian Anastasov [Sat, 22 Oct 2005 10:39:21 +0000 (13:39 +0300)]
[SK_BUFF]: ipvs_property field must be copied

IPVS used flag NFC_IPVS_PROPERTY in nfcache but as now nfcache was removed the
new flag 'ipvs_property' still needs to be copied. This patch should be
included in 2.6.14.

Further comments from Harald Welte:

Sorry, seems like the bug was introduced by me.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[PATCH] typo fix in last cpufreq powernow patch
Chris Wright [Fri, 21 Oct 2005 23:56:08 +0000 (16:56 -0700)]
[PATCH] typo fix in last cpufreq powernow patch

Not sure how it slipped by, but here's a trivial typo fix for powernow.

Signed-off-by: Chris Wright <chrisw@osdl.org>
[ It's "nurter" backwards.. Maybe we have a hillbilly The Shining fan? ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Call exit_itimers from do_exit, not __exit_signal
Roland McGrath [Fri, 21 Oct 2005 22:03:29 +0000 (15:03 -0700)]
[PATCH] Call exit_itimers from do_exit, not __exit_signal

When I originally moved exit_itimers into __exit_signal, that was the only
place where we could reliably know it was the last thread in the group
dying, without races.  Since then we've gotten the signal_struct.live
counter, and do_exit can reliably do group-wide cleanup work.

This patch moves the call to do_exit, where it's made without locks.  This
avoids the deadlock issues that the old __exit_signal code's comment talks
about, and the one that Oleg found recently with process CPU timers.

[ This replaces e03d13e985d48ac4885382c9e3b1510c78bd047f, which is why
  it was just reverted. ]

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoRevert "Fix cpu timers exit deadlock and races"
Linus Torvalds [Fri, 21 Oct 2005 22:36:00 +0000 (15:36 -0700)]
Revert "Fix cpu timers exit deadlock and races"

Revert commit e03d13e985d48ac4885382c9e3b1510c78bd047f, to be replaced
by a much nicer fix from Roland.

18 years ago[PATCH] cpufreq: fix pending powernow timer stuck condition
Dave Jones [Fri, 21 Oct 2005 21:21:03 +0000 (17:21 -0400)]
[PATCH] cpufreq: fix pending powernow timer stuck condition

AMD recently discovered that on some hardware, there is a race condition
possible when a C-state change request goes onto the bus at the same
time as a P-state change request.

Both requests happen, but the southbridge hardware only acknowledges the
C-state change.  The PowerNow! driver is then stuck in a loop, waiting
for the P-state change acknowledgement.  The driver eventually times
out, but can no longer perform P-state changes.

It turns out the solution is to resend the P-state change, which the
southbridge will acknowledge normally.

Thanks to Johannes Winkelmann for reporting this and testing the fix.

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ppc64: Fix typo bug in iSeries hash code
David Gibson [Fri, 21 Oct 2005 03:41:19 +0000 (13:41 +1000)]
[PATCH] ppc64: Fix typo bug in iSeries hash code

This fixes a stupid typo bug in the iSeries hash table code.

When we place a hash PTE in the secondary bucket, instead of setting the
SECONDARY flag bit, as we should, we (redundantly) set the VALID flag.

This was introduced with the patch abolishing bitfields from the hash
table code.  Mea culpa, oops.  It hasn't been noticed until now because
in practice we don't hit the secondary bucket terribly often.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Fri, 21 Oct 2005 19:23:07 +0000 (12:23 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6
Linus Torvalds [Fri, 21 Oct 2005 19:22:33 +0000 (12:22 -0700)]
Merge /pub/scm/linux/kernel/git/acme/net-2.6

18 years ago[PATCH] drm: another mga bug
Dave Airlie [Thu, 20 Oct 2005 22:49:00 +0000 (23:49 +0100)]
[PATCH] drm: another mga bug

The wrong state emission routines were being called for G550, and
consistent maps weren't correctly mapped...

Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ppc64: Fix pages marked dirty abusively
Benjamin Herrenschmidt [Fri, 21 Oct 2005 04:12:51 +0000 (14:12 +1000)]
[PATCH] ppc64: Fix pages marked dirty abusively

While working on 64K pages, I found this little buglet in our
update_mmu_cache() implementation.

The code calls __hash_page() passing it an "access" parameter (the type
of access that triggers the hash) containing the bits _PAGE_RW and
_PAGE_USER of the linux PTE.  The latter is useless in this case and the
former is wrong.  In fact, if we have a writeable PTE and we pass
_PAGE_RW to hash_page(), it will set _PAGE_DIRTY (since we track dirty
that way, by hash faulting !dirty) which is not what we want.

In fact, the correct fix is to always pass 0. That means that only
read-only or already dirty read write PTEs will be preloaded. The
(hopefully rare) case of a non dirty read write PTE can't be preloaded
this way, it will have to fault in hash_page on the actual access.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ppc64: Fix typo in time calculations
Paul Mackerras [Fri, 21 Oct 2005 12:39:36 +0000 (22:39 +1000)]
[PATCH] ppc64: Fix typo in time calculations

This fixes a typo in the div128_by_32 function used in the timekeeping
calculations on ppc64.  If you look at the code it's quite obvious
that we need (rb + c) rather than (rb + b).  The "b" is clearly just a
typo.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] mptsas: fix phy identifiers
Eric Moore [Fri, 21 Oct 2005 18:56:36 +0000 (20:56 +0200)]
[PATCH] mptsas: fix phy identifiers

This fixes handling of the phy identifiers in mptsas.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
[ split it a pre-2.6.14 portion from Eric's bigger patch ]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[ARM] Fix Integrator IM/PD-1 support
Russell King [Fri, 21 Oct 2005 09:17:37 +0000 (10:17 +0100)]
[ARM] Fix Integrator IM/PD-1 support

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3028/1: S3C2410 - add DCLK mask definitions
Ben Dooks [Thu, 20 Oct 2005 22:21:20 +0000 (23:21 +0100)]
[ARM] 3028/1: S3C2410 - add DCLK mask definitions

Patch from Ben Dooks

From: Guillaume Gourat <guillaume.gourat@nexvision.fr>

Add MASK definitions for DCLK0 and DCLK1

Signed-off-by: Guillaume Gourat <guillaume.gourat@nexvision.fr>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3027/1: BAST - reduce NAND timings slightly
Ben Dooks [Thu, 20 Oct 2005 22:21:19 +0000 (23:21 +0100)]
[ARM] 3027/1: BAST - reduce NAND timings slightly

Patch from Ben Dooks

The current Simtec BAST nand area timings are a little
too slow to be obtained by a 2410 running at 266MHz,
so reduce the timings slightly to bring them into the
acceptable range.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3026/1: S3C2410 - avoid possible overflow in pll calculations
Ben Dooks [Thu, 20 Oct 2005 22:21:18 +0000 (23:21 +0100)]
[ARM] 3026/1: S3C2410 - avoid possible overflow in pll calculations

Patch from Ben Dooks

Avoid the possiblity that if the board is using
a 16.9334 or higher crystal with a high PLL
multiplier, then the pll value could overflow
the capability of an int.

Also fix the value types of the intermediate
variables to unsigned int.

Rewrite of patch from Guillaume Gourat

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3025/1: Add I2S platform device for PXA
Matt Reimer [Thu, 20 Oct 2005 22:21:18 +0000 (23:21 +0100)]
[ARM] 3025/1: Add I2S platform device for PXA

Patch from Matt Reimer

Adds an I2S platform_device for PXA. I2S is used to interface
with sound chips on systems like iPAQ h1910/h2200/hx4700 and
Asus 716.

Signed-off-by: mreimer@vpop.net
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[TCP] Allow len == skb->len in tcp_fragment
Herbert Xu [Thu, 20 Oct 2005 19:13:13 +0000 (17:13 -0200)]
[TCP] Allow len == skb->len in tcp_fragment

It is legitimate to call tcp_fragment with len == skb->len since
that is done for FIN packets and the FIN flag counts as one byte.
So we should only check for the len > skb->len case.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[DCCP]: Clear the IPCB area
Herbert Xu [Tue, 18 Oct 2005 02:03:28 +0000 (12:03 +1000)]
[DCCP]: Clear the IPCB area

Turns out the problem has nothing to do with use-after-free or double-free.
It's just that we're not clearing the CB area and DCCP unlike TCP uses a CB
format that's incompatible with IP.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Ian McDonald <imcdnzl@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[DCCP]: Make dccp_write_xmit always free the packet
Herbert Xu [Sun, 16 Oct 2005 11:08:46 +0000 (21:08 +1000)]
[DCCP]: Make dccp_write_xmit always free the packet

icmp_send doesn't use skb->sk at all so even if skb->sk has already
been freed it can't cause crash there (it would've crashed somewhere
else first, e.g., ip_queue_xmit).

I found a double-free on an skb that could explain this though.
dccp_sendmsg and dccp_write_xmit are a little confused as to what
should free the packet when something goes wrong.  Sometimes they
both go for the ball and end up in each other's way.

This patch makes dccp_write_xmit always free the packet no matter
what.  This makes sense since dccp_transmit_skb which in turn comes
from the fact that ip_queue_xmit always frees the packet.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[DCCP]: Use skb_set_owner_w in dccp_transmit_skb when skb->sk is NULL
Herbert Xu [Fri, 14 Oct 2005 06:38:49 +0000 (16:38 +1000)]
[DCCP]: Use skb_set_owner_w in dccp_transmit_skb when skb->sk is NULL

David S. Miller <davem@davemloft.net> wrote:
> One thing you can probably do for this bug is to mark data packets
> explicitly somehow, perhaps in the SKB control block DCCP already
> uses for other data.  Put some boolean in there, set it true for
> data packets.  Then change the test in dccp_transmit_skb() as
> appropriate to test the boolean flag instead of "skb_cloned(skb)".

I agree.  In fact we already have that flag, it's called skb->sk.
So here is patch to test that instead of skb_cloned().

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Ian McDonald <imcdnzl@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[PATCH] Fix handling spurious page fault for hugetlb region
Hugh Dickins [Thu, 20 Oct 2005 15:24:28 +0000 (16:24 +0100)]
[PATCH] Fix handling spurious page fault for hugetlb region

This reverts commit 3359b54c8c07338f3a863d1109b42eebccdcf379 and
replaces it with a cleaner version that is purely based on page table
operations, so that the synchronization between inode size and hugetlb
mappings becomes moot.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoLinux v2.6.14-rc5 v2.6.14-rc5
Linus Torvalds [Thu, 20 Oct 2005 06:23:05 +0000 (23:23 -0700)]
Linux v2.6.14-rc5

The -rc4 release was supposed to be the last -rc, but here goes.  The
RCU fixes and the swiotlb changes need an -rc for final testing.

18 years ago[PATCH] build fix for uml/amd64
Al Viro [Tue, 18 Oct 2005 21:45:17 +0000 (22:45 +0100)]
[PATCH] build fix for uml/amd64

Missing half of the [PATCH] uml: Fix sysrq-r support for skas mode
We need to remove these (UPT_[DEFG]S) from the read side as well as the
write one - otherwise it simply won't build.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] scsi_error thread exits in TASK_INTERRUPTIBLE state.
Steven Rostedt [Wed, 19 Oct 2005 12:22:13 +0000 (08:22 -0400)]
[PATCH] scsi_error thread exits in TASK_INTERRUPTIBLE state.

Found in the -rt patch set.  The scsi_error thread likely will be in the
TASK_INTERRUPTIBLE state upon exit.  This patch fixes this bug.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ppc64: update defconfigs
Paul Mackerras [Wed, 19 Oct 2005 22:34:56 +0000 (08:34 +1000)]
[PATCH] ppc64: update defconfigs

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 20 Oct 2005 06:12:03 +0000 (23:12 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

18 years ago[PATCH] swiotlb: make sure initial DMA allocations really are in DMA memory
Yasunori Goto [Wed, 19 Oct 2005 22:52:18 +0000 (15:52 -0700)]
[PATCH] swiotlb: make sure initial DMA allocations really are in DMA memory

This introduces a limit parameter to the core bootmem allocator; The new
parameter indicates that physical memory allocated by the bootmem
allocator should be within the requested limit.

We also introduce alloc_bootmem_low_pages_limit, alloc_bootmem_node_limit,
alloc_bootmem_low_pages_node_limit apis, but alloc_bootmem_low_pages_limit
is the only api used for swiotlb.

The existing alloc_bootmem_low_pages() api could instead have been
changed and made to pass right limit to the core allocator.  But that
would make the patch more intrusive for 2.6.14, as other arches use
alloc_bootmem_low_pages().  We may be done that post 2.6.14 as a
cleanup.

With this, swiotlb gets memory within 4G for both x86_64 and ia64
arches.

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Ravikiran G Thirumalai <kiran@scalex86.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] `unaligned access' in acpi get_root_bridge_busnr()
Peter Chubb [Thu, 20 Oct 2005 05:45:14 +0000 (22:45 -0700)]
[PATCH] `unaligned access' in acpi get_root_bridge_busnr()

In drivers/acpi/glue.c the address of an integer is cast to the address of
an unsigned long.  This breaks on systems where a long is larger than an
int --- for a start the int can be misaligned; for a second the assignment
through the pointer will overwrite part of the next variable.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Acked-by: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fix MGA DRM regression before 2.6.14
Dave Airlie [Thu, 20 Oct 2005 04:23:51 +0000 (21:23 -0700)]
[PATCH] fix MGA DRM regression before 2.6.14

I've gotten a report on lkml, of a possible regression in the MGA DRM in
2.6.14-rc4 (since -rc1), I haven't been able to reproduce it here, but I've
figured out some possible issues in the mga code that were definitely
wrong, some of these are from DRM CVS, the main fix is the agp enable bit
on the old code path still used by everyone.....

Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Threads shouldn't inherit PF_NOFREEZE
Alan Stern [Thu, 20 Oct 2005 04:23:51 +0000 (21:23 -0700)]
[PATCH] Threads shouldn't inherit PF_NOFREEZE

The PF_NOFREEZE process flag should not be inherited when a thread is
forked.  This patch (as585) removes the flag from the child.

This problem is starting to show up more and more as drivers turn to the
kthread API instead of using kernel_thread().  As a result, their kernel
threads are now children of the kthread worker instead of modprobe, and
they inherit the PF_NOFREEZE flag.  This can cause problems during system
suspend; the kernel threads are not getting frozen as they ought to be.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Export RCS_TAR_IGNORE for rpm targets
Tom Rini [Thu, 20 Oct 2005 04:23:49 +0000 (21:23 -0700)]
[PATCH] Export RCS_TAR_IGNORE for rpm targets

The variable RCS_TAR_IGNORE is used in scripts/packaging/Makefile, but not
exported from the main Makefile, so it's never used.

This results in the rpm targets being very unhappy in quilted trees.

Signed-off-by: Tom Rini <trini@kernel.crashing.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ppc64: Fix error in vDSO 32 bits date
Benjamin Herrenschmidt [Thu, 20 Oct 2005 04:23:49 +0000 (21:23 -0700)]
[PATCH] ppc64: Fix error in vDSO 32 bits date

The implementation of __kernel_gettimeofday() in the 32 bits vDSO has a
small bug (a typo actually) that will cause it to lose 1 bit of precision.
Not terribly bad but worth fixing.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Three one-liners in md.c
NeilBrown [Thu, 20 Oct 2005 04:23:47 +0000 (21:23 -0700)]
[PATCH] Three one-liners in md.c

The main problem fixes is that in certain situations stopping md arrays may
take longer than you expect, or may require multiple attempts.  This would
only happen when resync/recovery is happening.

This patch fixes three vaguely related bugs.

1/ The recent change to use kthreads got the setting of the
   process name wrong.  This fixes it.
2/ The recent change to use kthreads lost the ability for
   md threads to be signalled with SIG_KILL.  This restores that.
3/ There is a long standing bug in that if:
    - An array needs recovery (onto a hot-spare) and
    - The recovery is being blocked because some other array being
       recovered shares a physical device and
    - The recovery thread is killed with SIG_KILL
   Then the recovery will appear to have completed with no IO being
   done, which can cause data corruption.
   This patch makes sure that incomplete recovery will be treated as
   incomplete.

Note that any kernel affected by bug 2 will not suffer the problem of bug
3, as the signal can never be delivered.  Thus the current 2.6.14-rc
kernels are not susceptible to data corruption.  Note also that if arrays
are shutdown (with "mdadm -S" or "raidstop") then the problem doesn't
occur.  It only happens if a SIGKILL is independently delivered as done by
'init' when shutting down.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] raw1394: fix locking in the presence of SMP and interrupts
Andy Wingo [Thu, 20 Oct 2005 04:23:46 +0000 (21:23 -0700)]
[PATCH] raw1394: fix locking in the presence of SMP and interrupts

Changes all spinlocks that can be held during an irq handler to disable
interrupts while the lock is held.  Changes spin_[un]lock_irq to use the
irqsave/irqrestore variants for robustness and readability.

In raw1394.c:handle_iso_listen(), don't grab host_info_lock at all -- we're
not accessing host_info_list or host_count, and holding this lock while
trying to tasklet_kill the iso tasklet this can cause an ABBA deadlock if
ohci:dma_rcv_tasklet is running and tries to grab host_info_lock in
raw1394.c:receive_iso.  Test program attached reliably deadlocks all SMP
machines I have been able to test without this patch.

Signed-off-by: Andy Wingo <wingo@pobox.com>
Acked-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] orinoco: limit message rate
Andrew Morton [Thu, 20 Oct 2005 04:23:44 +0000 (21:23 -0700)]
[PATCH] orinoco: limit message rate

Brice Goglin <Brice.Goglin@ens-lyon.org> reports a printk storm from this
driver.  Fix.

Acked-by: David Gibson <hermes@gibson.dropbear.id.au>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] mm: hugetlb truncation fixes
Hugh Dickins [Thu, 20 Oct 2005 04:23:43 +0000 (21:23 -0700)]
[PATCH] mm: hugetlb truncation fixes

hugetlbfs allows truncation of its files (should it?), but hugetlb.c often
forgets that: crashes and misaccounting ensue.

copy_hugetlb_page_range better grab the src page_table_lock since we don't
want to guess what happens if concurrently truncated.  unmap_hugepage_range
rss accounting must not assume the full range was mapped.  follow_hugetlb_page
must guard with page_table_lock and be prepared to exit early.

Restyle copy_hugetlb_page_range with a for loop like the others there.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Fix cpu timers exit deadlock and races
Roland McGrath [Thu, 20 Oct 2005 05:21:23 +0000 (22:21 -0700)]
[PATCH] Fix cpu timers exit deadlock and races

Oleg Nesterov reported an SMP deadlock.  If there is a running timer
tracking a different process's CPU time clock when the process owning
the timer exits, we deadlock on tasklist_lock in posix_cpu_timer_del via
exit_itimers.

That code was using tasklist_lock to check for a race with __exit_signal
being called on the timer-target task and clearing its ->signal.
However, there is actually no such race.  __exit_signal will have called
posix_cpu_timers_exit and posix_cpu_timers_exit_group before it does
that.  Those will clear those k_itimer's association with the dying
task, so posix_cpu_timer_del will return early and never reach the code
in question.

In addition, posix_cpu_timer_del called from exit_itimers during execve
or directly from timer_delete in the process owning the timer can race
with an exiting timer-target task to cause a double put on timer-target
task struct.  Make sure we always access cpu_timers lists with sighand
lock held.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[ARM] 3024/1: Add cpu_v6_proc_fin
Tony Lindgren [Wed, 19 Oct 2005 22:00:56 +0000 (23:00 +0100)]
[ARM] 3024/1: Add cpu_v6_proc_fin

Patch from Tony Lindgren

Machine restart calls cpu_proc_fin() to clean and disable
cache, and turn off interrupts. This patch adds proper
cpu_v6_proc_fin.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[PATCH] Handle spurious page fault for hugetlb region
Seth, Rohit [Tue, 18 Oct 2005 21:15:12 +0000 (14:15 -0700)]
[PATCH] Handle spurious page fault for hugetlb region

The hugetlb pages are currently pre-faulted.  At the time of mmap of
hugepages, we populate the new PTEs.  It is possible that HW has already
cached some of the unused PTEs internally.  These stale entries never
get a chance to be purged in existing control flow.

This patch extends the check in page fault code for hugepages.  Check if
a faulted address falls with in size for the hugetlb file backing it.
We return VM_FAULT_MINOR for these cases (assuming that the arch
specific page-faulting code purges the stale entry for the archs that
need it).

Signed-off-by: Rohit Seth <rohit.seth@intel.com>
[ This is apparently arguably an ia64 port bug. But the code won't
  hurt, and for now it fixes a real problem on some ia64 machines ]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[SCSI] scsi_error thread exits in TASK_INTERRUPTIBLE state.
Steven Rostedt [Wed, 19 Oct 2005 12:22:13 +0000 (08:22 -0400)]
[SCSI] scsi_error thread exits in TASK_INTERRUPTIBLE state.

Found in the -rt patch set.  The scsi_error thread likely will be in the
TASK_INTERRUPTIBLE state upon exit.  This patch fixes this bug.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[ARM] 3023/1: pxa-regs: Typo in ARM pxa register definitions.
Paul Schulz [Tue, 18 Oct 2005 18:40:32 +0000 (19:40 +0100)]
[ARM] 3023/1: pxa-regs: Typo in ARM pxa register definitions.

Patch from Paul Schulz

The following trivial patch is to fix what looks like a typo in the PXA register
definitions. The correction comes directly from the definition in the
Intel Documentation.

 http://www.intel.com/design/pca/applicationsprocessors/manuals/278693.htm
 Intel(R) PXA 255 Processor - Developers Manual - Jan 2004 - Page 12-33

Neither 'UDCCS_IO_ROF' or 'UDCCS_IO_DME' are currently used elseware
in the main code (from grep of tree)... The current definitions have been
in the code since at lease 2.4.7.

Signed-off-by: Paul Schulz <paul@mawsonlakes.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[PATCH] vesafb: Fix display corruption on display blank
Antonino A. Daplas [Tue, 18 Oct 2005 07:59:52 +0000 (15:59 +0800)]
[PATCH] vesafb: Fix display corruption on display blank

Reported by: Bob Tracy <rct@gherkin.frus.com>

 "...I've got a Toshiba notebook (730XCDT -- Pentium 150MMX) for which
  I'm using the Vesa FB driver.  When the machine has been idle for some
  time and the driver attempts to powerdown the display, rather than the
  display going blank, it goes gray with several strange lines.  When I
  hit the "shift" key or other-wise wake up the display, the old video
  state is not fully restored..."

vesafb recently added a blank method which has only 2 states, powerup and
powerdown.  The powerdown state is used for all blanking levels, but in his
case, powerdown does not work correctly for higher levels of display
powersaving. Thus, for intermediate power levels, use software blanking,
and use only hardware blanking for an explicit powerdown.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Tue, 18 Oct 2005 15:41:06 +0000 (08:41 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-serial
Linus Torvalds [Tue, 18 Oct 2005 15:40:46 +0000 (08:40 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-serial

18 years agoAdd some basic .gitignore files
Linus Torvalds [Tue, 18 Oct 2005 15:26:15 +0000 (08:26 -0700)]
Add some basic .gitignore files

This still leaves driver and architecture-specific subdirectories alone,
but gets rid of the bulk of the "generic" generated files that we should
ignore.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[ARM] 3021/1: Interrupt 0 bug fix for ixp4xx
Kenneth Tan [Tue, 18 Oct 2005 06:53:35 +0000 (07:53 +0100)]
[ARM] 3021/1: Interrupt 0 bug fix for ixp4xx

Patch from Kenneth Tan

The get_irqnr_and_base subroutine of ixp4xx does not take interrupt 0 condition into account properly. We should not perform "subs" here. The Z flag will be set when interrupt 0 occur, which resulting "movne r1, sp" in the caller routine (irq_handler) not being executed.

When interrupt 0 occur:
o if CONFIG_CPU_IXP46X is not set, "subs" will set the Z flag and return
o if CONFIG_CPU_IXP46X is set, codes in upper interrupt handling will be trigerred. But since this is not supper interrupt, the "cmp" in the upper interrupt handling portion will set the Z flag and return

Signed-off-by: Kenneth Tan <chong.yin.tan@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3020/1: Fixes typo error CONFIG_CPU_IXP465, which should be CONFIG_CPU_IXP46X
Kenneth Tan [Tue, 18 Oct 2005 06:51:35 +0000 (07:51 +0100)]
[ARM] 3020/1: Fixes typo error CONFIG_CPU_IXP465, which should be CONFIG_CPU_IXP46X

Patch from Kenneth Tan

The cpu_is_ixp465 macro in include/asm-arm/arch-ixp4xx/hardware.h is always returning 0 because #ifdef CONFIG_CPU_IXP465 is always false.

Signed-off-by: Kenneth Tan <chong.yin.tan@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3019/1: fix wrong comments
Nicolas Pitre [Tue, 18 Oct 2005 06:51:34 +0000 (07:51 +0100)]
[ARM] 3019/1: fix wrong comments

Patch from Nicolas Pitre

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3018/1: S3C2410 - check de-referenced device is really a platform device
Ben Dooks [Tue, 18 Oct 2005 06:51:34 +0000 (07:51 +0100)]
[ARM] 3018/1: S3C2410 - check de-referenced device is really a platform device

Patch from Ben Dooks

Check that the device we are looking at is really
a platform device before trying to cast it to one
to find out the platform bus number.

Thanks to RMK for pointing this out.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[PATCH] kbuild: Eliminate build error when KALLSYMS not defined
Mark Rustad [Mon, 17 Oct 2005 23:43:34 +0000 (16:43 -0700)]
[PATCH] kbuild: Eliminate build error when KALLSYMS not defined

The following build error happens with 2.6.14-rc4 when CONFIG_KALLSYMS is
not defined.  The error message in a fragment of the output was:

  CC      arch/i386/lib/usercopy.o
  AR      arch/i386/lib/lib.a
/bin/sh: line 1: +@: command not found
make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
  CHK     include/linux/compile.h

Signed-off-by: Mark Rustad <mrustad@mac.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] aio: revert lock_kiocb()
Zach Brown [Mon, 17 Oct 2005 23:43:33 +0000 (16:43 -0700)]
[PATCH] aio: revert lock_kiocb()

lock_kiocb() was introduced to serialize retrying and cancellation.  In the
process of doing so it tried to sleep waiting for KIF_LOCKED while holding
the ctx_lock spinlock.  Recent fixes have ensured that multiple concurrent
retries won't be attempted for a given iocb.  Cancel has other problems and
has no significant in-tree users that have been complaining about it.  So
for the immediate future we'll revert sleeping with the lock held and will
address proper cancellation and retry serialization in the future.

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Acked-by: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uniput - fix crash on SMP
Dmitry Torokhov [Mon, 17 Oct 2005 23:43:32 +0000 (16:43 -0700)]
[PATCH] uniput - fix crash on SMP

Only signal completion after marking request slot as free, otherwise other
processor can free request structure before we finish using it.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Fix /proc/acpi/events around suspend
Pavel Machek [Mon, 17 Oct 2005 23:43:31 +0000 (16:43 -0700)]
[PATCH] Fix /proc/acpi/events around suspend

Fix -EIO on /proc/acpi/events after suspends.  This actually breaks
suspending by power button in many setups.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] n_r3964 mod_timer() fix
Stephan Brodkorb [Mon, 17 Oct 2005 23:43:30 +0000 (16:43 -0700)]
[PATCH] n_r3964 mod_timer() fix

Since Revision 1.10 was released the n_r3964 module wasn't able to receive any
data.  The reason for that behavior is because there were some wrong calls of
mod_timer(...) in the function receive_char (...).  This patch should fix this
problem and was successfully tested with talking to some kuka industrial
robots.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] output of /proc/maps on nommu systems is incomplete
David McCullough [Mon, 17 Oct 2005 23:43:29 +0000 (16:43 -0700)]
[PATCH] output of /proc/maps on nommu systems is incomplete

Currently you do not get all the map entries on nommu systems because the
start function doesn't index into the list using the value of "pos".

Signed-off-by: David McCullough <davidm@snapgear.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] rcu: keep rcu callback event counter
Eric Dumazet [Mon, 17 Oct 2005 18:01:21 +0000 (20:01 +0200)]
[PATCH] rcu: keep rcu callback event counter

This makes call_rcu() keep track of how many events there are on the RCU
list, and cause a reschedule event when the list gets too long.

This helps keep RCU event lists down.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Fix and clean up quirk_intel_ide_combined() configuration
Jeff Garzik [Mon, 17 Oct 2005 17:01:57 +0000 (13:01 -0400)]
[PATCH] Fix and clean up quirk_intel_ide_combined() configuration

This change makes quirk_intel_ide_combined() dependent on the precise
conditions under which it is needed:

* IDE is built in
* IDE SATA option is not set
* ata_piix or ahci drivers are enabled

This fixes an issue where some modular configurations would not cause
the quirk to be enabled.

Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Linus torvalds <torvalds@osdl.org>
18 years ago[PATCH] posix-timers: fix task accounting
Oleg Nesterov [Mon, 17 Oct 2005 14:49:42 +0000 (18:49 +0400)]
[PATCH] posix-timers: fix task accounting

Make sure we release the task struct properly when releasing pending
timers.

release_task() does write_lock_irq(&tasklist_lock), so it can't race
with run_posix_cpu_timers() on any cpu.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NFS: Fix Oopsable/unnecessary i_count manipulations in nfs_wait_on_inode()
Trond Myklebust [Mon, 17 Oct 2005 10:03:23 +0000 (06:03 -0400)]
[PATCH] NFS: Fix Oopsable/unnecessary i_count manipulations in nfs_wait_on_inode()

Oopsable since nfs_wait_on_inode() can get called as part of iput_final().

Unnecessary since the caller had better be damned sure that the inode won't
disappear from underneath it anyway.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>