Andrew Morton [Sun, 21 Sep 2003 08:37:10 +0000 (01:37 -0700)]
[PATCH] Fix setpgid and threads
From: Jeremy Fitzhardinge <jeremy@goop.org>
I'm resending my patch to fix this problem. To recap: every task_struct
has its own copy of the thread group's pgrp. Only the thread group
leader is allowed to change the tgrp's pgrp, but it only updates its own
copy of pgrp, while all the other threads in the tgrp use the old value
they inherited on creation.
This patch simply updates all the other thread's pgrp when the tgrp
leader changes pgrp. Ulrich has already expressed reservations about
this patch since it is (1) incomplete (it doesn't cover the case of
other ids which have similar problems), (2) racy (it doesn't synchronize
with other threads looking at the task pgrp, so they could see an
inconsistent view) and (3) slow (it takes linear time with respect to
the number of threads in the tgrp).
My reaction is that (1) it fixes the actual bug I'm encountering in a
real program. (2) doesn't really matter for pgrp, since it is mostly an
issue with respect to the terminal job-control code (which is even more
broken without this patch. Regarding (3), I think there are very few
programs which have a large number of threads which change process group
id on a regular basis (a heavily multi-threaded job-control shell?).
Ulrich also said he has a (proposed?) much better fix, which I've been
looking forward to. I'm submitting this patch as a stop-gap fix for a
real bug, and perhaps to prompt the improved patch.
An alternative fix, at least for pgrp, is to change all references to
->pgrp to group_leader->pgrp. This may be sufficient on its own, but it
would be a reasonably intrusive patch (I count 95 instances in 32 files
in the 2.6.0-test3-mm3 tree).
Andrew Morton [Sun, 21 Sep 2003 08:37:01 +0000 (01:37 -0700)]
[PATCH] real-time enhanced page allocator and throttling
From: Robert Love <rml@tech9.net>
- Let real-time tasks dip further into the reserves than usual in
__alloc_pages(). There are a lot of ways to special case this. This
patch just cuts z->pages_low in half, before doing the incremental min
thing, for real-time tasks. I do not do anything in the low memory slow
path. We can be a _lot_ more aggressive if we want. Right now, we just
give real-time tasks a little help.
- Never ever call balance_dirty_pages() on a real-time task. Where and
how exactly we handle this is up for debate. We could, for example,
special case real-time tasks inside balance_dirty_pages(). This would
allow us to perform some of the work (say, waking up pdflush) but not
other work (say, the active throttling). As it stands now, we do the
per-processor accounting in balance_dirty_pages_ratelimited() but we
never call balance_dirty_pages(). Lots of approaches work. What we want
to do is never engage the real-time task in forced writeback.
Russell King [Sun, 21 Sep 2003 22:05:12 +0000 (23:05 +0100)]
[PCMCIA] Fix deadlocks caused between PCMCIA card fix and device model
The problem was that the semaphore which prevents ds interfering with
the sleepy card initialisation (skt_sem in pccardd) is blocking insmod
of the socket driver. However, the socket driver is being called with
the PCI bus semaphore held by the driver model.
pccardd in turn discovered a cardbus card (with skt_sem held), so it
is trying to add the PCI devices to the PCI bus, and this requires the
driver model to grab the PCI bus semaphore, but its already locked.
We move the class device register into pccardd so we get a natural
ordering between the ds socket initialisation and pccardd trying to
detect inserted cards.
We also fix a potential use-after-free caused by rmmod'ing the socket
driver before ds has shut down.
Albert Cahalan [Sun, 21 Sep 2003 05:16:28 +0000 (22:16 -0700)]
[PATCH] fix for hidden-task problem
It's bad to make (CLONE_THREAD | CLONE_DETACHED) tasks
be _completely_ hidden. Resource consumption is hard
to track down if a user can hide a task from /bin/ps.
This patch, supported by the procps-3.1.13 release,
gives admins the ability to search for such tasks.
The top-level /proc directory remains uncontaminated.
Matthew Wilcox [Sun, 21 Sep 2003 03:20:02 +0000 (20:20 -0700)]
[PATCH] Move EISA_bus
When I change the setting of CONFIG_EISA, everything rebuilds. This is
because EISA_bus is declared in <asm/processor.h> which is implicitly
included by just about everything. This is a silly place to declare it,
so this patch moves it to include/linux/eisa.h.
While I'm at it, I also move the variable definition to
drivers/eisa/eisa-bus.c. The rest of this patch is fixing up the fallout
from having to include <linux/eisa.h> if you use EISA_bus.
Jeff Garzik [Sat, 20 Sep 2003 16:39:42 +0000 (12:39 -0400)]
[sound/oss i810_audio] sync with 2.4
* increase length of wait for analog-ready
* fix printk prefix (cosmetic)
* bail out for pure MMIO interfaces, instead of attempting to use it
via PIO and hanging the system.
Jochen Friedrich [Sat, 20 Sep 2003 11:03:43 +0000 (07:03 -0400)]
[tokenring] fix breakage in proteon, skisa
this one fixes both drivers. They have been broken since the
reorganization in June. Unfortunately, my major build platform (alpha) had
some issues with later 2.5.X kernels (cache problems causing all kind of
funny behaviour), so i waited until these problems had been resolved by
the alpha gurus :-/...
In the mean time i also upgraded pine. I hope the patch corruption issue
is resolved by now.
Amir Noam [Sat, 20 Sep 2003 10:49:10 +0000 (06:49 -0400)]
[PATCH] [bonding] Convert /proc to seq_file
This patch converts /proc/net/bondX/info into /proc/net/bonding/bondX
using the seq_file interface.
This is based on Stephen's recent patch, but slightly modified to work
with the propagation patch set and with some locking changes to make it
simpler.
The patch applies both on 2.4 (after the sync set from earlier today)
and on 2.6 (after the propagation set from 2003/11/9).
Adrian Bunk [Sat, 20 Sep 2003 10:49:01 +0000 (06:49 -0400)]
[PATCH] fix sbni.c compile with gcc 3.3
sbni.c in 2.6.0-test5 fails to compile with gcc 3.3 with the following
error:
<-- snip -->
...
CC drivers/net/wan/sbni.o
...
drivers/net/wan/sbni.c: In function `calc_crc32':
drivers/net/wan/sbni.c:1568: error: asm-specifier for variable `_crc'
conflicts with asm clobber list
make[3]: *** [drivers/net/wan/sbni.o] Error 1
<-- snip -->
Below is the patch by Margit Schubert-White to fix this issue (it is
already in 2.4).
Andrew Morton [Sat, 20 Sep 2003 10:48:53 +0000 (06:48 -0400)]
[PATCH] e1000 bug
Rick Lindsley <ricklind@us.ibm.com> wrote:
>
> since it's been out for a while you probably already know, but the patch
> for e1000_main.c has a bug in it. Looks like it will fail at line 1550 if
> compiled with NETIF_F_TSO defined.
>
Update sealevel driver to match current net_device interface:
- dynamically allocate netdevice and private data.
- get rid of MOD_INC/DEC
- if_ptr not used
- bugfix: not all of board structure was being zeroed.
Note: this driver still doesn't probe() correctly since it just assumes that
if loaded the hardware is there!
Since I don't have one of these boards...
tested it by #ifdef'ing out all the bits that touch actual hardware.
Marc Zyngier [Sat, 20 Sep 2003 09:55:06 +0000 (05:55 -0400)]
[PATCH] depca update
I finally found some time to hack the depca driver, in basically the
same way I did with the de4x5 driver. The patch is quite big (shuffles
a lot of code around, removes lots of global variables), mainly in
order to use the driver model on every bus supported by this driver.
I also removed the probing from Space.c, so the usual warning about
device renumbering applies.
Tested on alpha (DE422, EISA) and i386 (two DE201, ISA), built-in and
modular. The MCA part is completly untested, since I lack the hardware
(no, I do not own every single piece of junk hardware out
there... ;-).
David T. Hollis [Fri, 19 Sep 2003 09:28:31 +0000 (02:28 -0700)]
[PATCH] USB: ethtool_ops and ax8817x fixes for usbnet
This is a resend of all of my recent usbnet additions which
center on adding ethtool_ops support. All have been re-diffed
against the latest usbnet from BK.
Changes:
* Add ethtool_ops support to usbnet
* Add GPIO bit toggling upon initialization of ax8817x devices
so that xmit works properly
* Add Wake-On-Lan and eeprom dump support for ax8817x devices
(this only adds the config support for WOL, actual operation
is more of a USB/Power Management function)
* Change ax8817x_set_multicast to not kmalloc for the filter
since there was no clean way to free the memory after URB submit.
Instead, we make use of the 20 byte dev->data.
Russell King [Fri, 19 Sep 2003 17:20:22 +0000 (18:20 +0100)]
[ARM] Fix AMBA keyboard/mouse driver.
Fix the AMBA kmi driver which got broken when the name field was
removed from struct device. Change the name used to claim resources
to "kmi-pl050". Fix resume method.
Dave Jones [Thu, 18 Sep 2003 21:55:41 +0000 (22:55 +0100)]
[CPUFREQ] Explicitly disable scaling we don't need in powernow-k7
The VIDC/FIDC controls could have been left at 1 from a previous call to
one of the scaling routines. Make sure we set them back to 0 to avoid
writing garbage into the scaling registers.
Dave Jones [Thu, 18 Sep 2003 21:47:26 +0000 (22:47 +0100)]
[CPUFREQ] Powernow-k7 latency timer needs to be in values of 10ns.
We were 'slightly' off in our calculations. This increased settling
time might actually increase the stability of some setups.