Pekka Enberg [Fri, 23 Jun 2006 09:03:07 +0000 (02:03 -0700)]
[PATCH] slab: page mapping cleanup
Clean up slab allocator page mapping a bit. The memory allocated for a
slab is physically contiguous so it is okay to assume struct pages are too
so kill the long-standing comment. Furthermore, rename set_slab_attr to
slab_map_pages and add a comment explaining why its needed.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Fri, 23 Jun 2006 09:03:06 +0000 (02:03 -0700)]
[PATCH] PG_uncached is ia64 only
As Nick points out, only ia64 uses PG_uncached. So we can push it up into the
higher bits of the lower half of page->flags and make room for another flag on
32-bit machines.
Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Jesse Barnes <jbarnes@sgi.com> Cc: Jes Sorensen <jes@trained-monkey.org> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Page Migration: Make do_swap_page redo the fault
It is better to redo the complete fault if do_swap_page() finds that the
page is not in PageSwapCache() because the page migration code may have
replaced the swap pte already with a pte pointing to valid memory.
do_swap_page() may interpret an invalid swap entry without this patch
because we do not reload the pte if we are looping back. The page
migration code may already have reused the swap entry referenced by our
local swp_entry.
Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andy Whitcroft [Fri, 23 Jun 2006 09:03:01 +0000 (02:03 -0700)]
[PATCH] zone handle unaligned zone boundaries
The buddy allocator has a requirement that boundaries between contigious
zones occur aligned with the the MAX_ORDER ranges. Where they do not we
will incorrectly merge pages cross zone boundaries. This can lead to pages
from the wrong zone being handed out.
Originally the buddy allocator would check that buddies were in the same
zone by referencing the zone start and end page frame numbers. This was
removed as it became very expensive and the buddy allocator already made
the assumption that zones boundaries were aligned.
It is clear that not all configurations and architectures are honouring
this alignment requirement. Therefore it seems safest to reintroduce
support for non-aligned zone boundaries. This patch introduces a new check
when considering a page a buddy it compares the zone_table index for the
two pages and refuses to merge the pages where they do not match. The
zone_table index is unique for each node/zone combination when
FLATMEM/DISCONTIGMEM is enabled and for each section/zone combination when
SPARSEMEM is enabled (a SPARSEMEM section is at least a MAX_ORDER size).
Signed-off-by: Andy Whitcroft <apw@shadowen.org> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
for_each_cpu() actually iterates across all possible CPUs. We've had mistakes
in the past where people were using for_each_cpu() where they should have been
iterating across only online or present CPUs. This is inefficient and
possibly buggy.
We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the
future.
This patch replaces for_each_cpu with for_each_possible_cpu.
in xfs.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Howells [Fri, 23 Jun 2006 09:02:58 +0000 (02:02 -0700)]
[PATCH] VFS: Permit filesystem to perform statfs with a known root dentry
Give the statfs superblock operation a dentry pointer rather than a superblock
pointer.
This complements the get_sb() patch. That reduced the significance of
sb->s_root, allowing NFS to place a fake root there. However, NFS does
require a dentry to use as a target for the statfs operation. This permits
the root in the vfsmount to be used instead.
linux/mount.h has been added where necessary to make allyesconfig build
successfully.
Interest has also been expressed for use with the FUSE and XFS filesystems.
Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Nathan Scott <nathans@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Howells [Fri, 23 Jun 2006 09:02:57 +0000 (02:02 -0700)]
[PATCH] VFS: Permit filesystem to override root dentry on mount
Extend the get_sb() filesystem operation to take an extra argument that
permits the VFS to pass in the target vfsmount that defines the mountpoint.
The filesystem is then required to manually set the superblock and root dentry
pointers. For most filesystems, this should be done with simple_set_mnt()
which will set the superblock pointer and then set the root dentry to the
superblock's s_root (as per the old default behaviour).
The get_sb() op now returns an integer as there's now no need to return the
superblock pointer.
This patch permits a superblock to be implicitly shared amongst several mount
points, such as can be done with NFS to avoid potential inode aliasing. In
such a case, simple_set_mnt() would not be called, and instead the mnt_root
and mnt_sb would be set directly.
The patch also makes the following changes:
(*) the get_sb_*() convenience functions in the core kernel now take a vfsmount
pointer argument and return an integer, so most filesystems have to change
very little.
(*) If one of the convenience function is not used, then get_sb() should
normally call simple_set_mnt() to instantiate the vfsmount. This will
always return 0, and so can be tail-called from get_sb().
(*) generic_shutdown_super() now calls shrink_dcache_sb() to clean up the
dcache upon superblock destruction rather than shrink_dcache_anon().
This is required because the superblock may now have multiple trees that
aren't actually bound to s_root, but that still need to be cleaned up. The
currently called functions assume that the whole tree is rooted at s_root,
and that anonymous dentries are not the roots of trees which results in
dentries being left unculled.
However, with the way NFS superblock sharing are currently set to be
implemented, these assumptions are violated: the root of the filesystem is
simply a dummy dentry and inode (the real inode for '/' may well be
inaccessible), and all the vfsmounts are rooted on anonymous[*] dentries
with child trees.
[*] Anonymous until discovered from another tree.
(*) The documentation has been adjusted, including the additional bit of
changing ext2_* into foo_* in the documentation.
[akpm@osdl.org: convert ipath_fs, do other stuff] Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Nathan Scott <nathans@sgi.com> Cc: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Rachita Kothiyal [Fri, 23 Jun 2006 09:02:56 +0000 (02:02 -0700)]
[PATCH] Fix cdrom being confused on using kdump
I have seen the cdrom drive appearing confused on using kdump on certain
x86_64 systems. During the booting up of the second kernel, the following
message would keep flooding the console, and the booting would not proceed
any further.
hda: cdrom_pc_intr: The drive appears confused (ireason = 0x01)
In this patch, whenever we are hitting a confused state in the interrupt
handler with the DRQ set, we end the request and return ide_stopped. Using
this I dont see the status error.
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
[PATCH] Driver core: fix locking issues with the devices that are attached to classes
[PATCH] USB: get USB suspend to work again
Yeah, it's a hack, but it is only temporary until Alan's patches
reworking this area make it in. We really should not care what devices
below us are doing, especially when we do not really know what type of
devices they are. This patch relies on the fact that the endpoint
devices do not have a driver assigned to us.
Linus Torvalds [Fri, 23 Jun 2006 05:46:28 +0000 (22:46 -0700)]
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (21 commits)
[ARM] 3629/1: S3C24XX: fix missing bracket in regs-dsc.h
[ARM] 3537/1: Rework DMA-bounce locking for finer granularity
[ARM] 3601/1: i.MX/MX1 DMA error handling for signaled channels only
[ARM] 3597/1: ixp4xx/nslu2: Board support for new LED subsystem
[ARM] 3595/1: ixp4xx/nas100d: Board support for new LED subsystem
[ARM] 3626/1: ARM EABI: fix syscall restarting
[ARM] 3628/1: S3C24XX: add get_rate call to struct clk
[ARM] 3627/1: S3C24XX: split s3c2410 clocks from core clocks
[ARM] 3613/1: S3C2410: Add sysdev and sysclass
[ARM] 3624/1: Report true modem control line states
[ARM] 3620/2: ixp23xx: add uengine loader support
[ARM] 3618/1: add defconfig for logicpd pxa270 card engine
[ARM] 3617/1: ep93xx: fix slightly incorrect timer tick rate
[ARM] 3616/1: fix timer handler wrap logic for a number of platforms
[ARM] 3615/1: ixp23xx: use platform devices for physmap flash
[ARM] 3614/1: ep93xx: use platform devices for physmap flash
[ARM] 3621/1: fix compilation breakage for pnx4008
[ARM] 3623/1: pnx4008: move GPIO-related defines to gpio.h
[ARM] 3622/1: pnx4008: remove clk_use/clk_unuse
[ARM] Enable VFP to be built when non-VFP capable CPUs are selected
...
Linus Torvalds [Fri, 23 Jun 2006 05:45:53 +0000 (22:45 -0700)]
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-serial
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-serial:
[ARM] 3600/1: increase amba-pl010 UART_NR to 8
[ARM] 3571/1: netX: serial driver for Hilscher netX
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] Fix ondemand vs suspend deadlock
[CPUFREQ] Fix powernow-k8 SMP kernel on UP hardware bug.
[PATCH] redirect speedstep-centrino maintainer mail to cpufreq list
[CPUFREQ] correct powernow-k8 fid/vid masks for extended parts
[CPUFREQ] Clarify powernow-k8 cpu_family statements
Linus Torvalds [Fri, 23 Jun 2006 05:15:09 +0000 (22:15 -0700)]
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (33 commits)
[PATCH] myri10ge - drop workaround pci_save_state() disabling MSI
[PATCH] myri10ge - drop workaround for the missing AER ext cap on nVidia CK804
via-velocity: the link is not correctly detected when the device starts
[PATCH] add b44 to maintainers
[PATCH] WAN: ioremap() failure checks in drivers
[PATCH] WAN: register_hdlc_device() doesn't need dev_alloc_name()
[PATCH] skb_padto()-area fixes in 8390, wavelan
[PATCH] make drivers/net/forcedeth.c:nv_update_pause() static
[PATCH] network driver for Hilscher netx
[PATCH] Dereference in tokenring/olympic.c
[PATCH] Array overrun in drivers/net/wireless/wavelan.c
[PATCH] Remove useless check in drivers/net/pcmcia/xirc2ps_cs.c
[PATCH] 8139cp: add ethtool eeprom support
[PATCH] 8139cp: fix eeprom read command length
[PATCH] b44: update b44 Kconfig entry
[PATCH] b44: update version to 1.01
[PATCH] b44: add wol for old nic
[PATCH] b44: add parameter
[PATCH] b44: add wol
[PATCH] b44: fix manual speed/duplex/autoneg settings
...
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (139 commits)
[POWERPC] re-enable OProfile for iSeries, using timer interrupt
[POWERPC] support ibm,extended-*-frequency properties
[POWERPC] Extra sanity check in EEH code
[POWERPC] Dont look for class-code in pci children
[POWERPC] Fix mdelay badness on shared processor partitions
[POWERPC] disable floating point exceptions for init
[POWERPC] Unify ppc syscall tables
[POWERPC] mpic: add support for serial mode interrupts
[POWERPC] pseries: Print PCI slot location code on failure
[POWERPC] spufs: one more fix for 64k pages
[POWERPC] spufs: fail spu_create with invalid flags
[POWERPC] spufs: clear class2 interrupt status before wakeup
[POWERPC] spufs: fix Makefile for "make clean"
[POWERPC] spufs: remove stop_code from struct spu
[POWERPC] spufs: fix spu irq affinity setting
[POWERPC] spufs: further abstract priv1 register access
[POWERPC] spufs: split the Cell BE support into generic and platform dependant parts
[POWERPC] spufs: dont try to access SPE channel 1 count
[POWERPC] spufs: use kzalloc in create_spu
[POWERPC] spufs: fix initial state of wbox file
...
Brice Goglin [Fri, 23 Jun 2006 01:12:36 +0000 (21:12 -0400)]
[PATCH] myri10ge - drop workaround pci_save_state() disabling MSI
We don't need to restore the state right after saving it for later recovery
since commit 99dc804d9bcc2c53f4c20c291bf4e185312a1a0c (PCI: disable msi mode
in pci_disable_device) now prevents pci_save_state() from disabling MSI.
Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Brice Goglin [Fri, 23 Jun 2006 01:11:59 +0000 (21:11 -0400)]
[PATCH] myri10ge - drop workaround for the missing AER ext cap on nVidia CK804
We don't need to hardcode the AER capability of the nVidia CK804 chipset
anymore since commit cf34a8e07f02c76f3f1232eecb681301a3d7b10b (PCI: nVidia
quirk to make AER PCI-E extended capability visible) now makes sure that
this cap will be available to pci_find_ext_capability().
Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Krzysztof Halasa [Thu, 22 Jun 2006 20:29:28 +0000 (22:29 +0200)]
[PATCH] WAN: ioremap() failure checks in drivers
Eric Sesterhenn found that pci200syn initialization lacks return
statement in ioremap() error path (coverity bug id #195). It looks
like more WAN drivers have problems with ioremap().
Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Krzysztof Halasa [Thu, 22 Jun 2006 20:20:19 +0000 (22:20 +0200)]
[PATCH] WAN: register_hdlc_device() doesn't need dev_alloc_name()
David Boggs noticed that register_hdlc_device() no longer needs
to call dev_alloc_name() as it's called by register_netdev().
register_hdlc_device() is currently equivalent to register_netdev().
hdlc_setup() is now EXPORTed as per David's request.
Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Alan Cox [Thu, 22 Jun 2006 13:25:34 +0000 (14:25 +0100)]
[PATCH] skb_padto()-area fixes in 8390, wavelan
Ar Iau, 2006-06-22 am 21:29 +1000, ysgrifennodd Herbert Xu:
> Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> >
> > The 8390 change (corrected version) also makes 8390.c faster so should
> > be applied anyway, and the orinoco one fixes some code that isn't even
> > needed and someone forgot to remove long ago. Otherwise the skb_padto
>
> Yeah I agree totally. However, I haven't actually seen the fixed 8390
> version being posted yet or at least not to netdev :)
Ah the resounding clang of a subtle hint ;)
Signed-off-by: Alan Cox <alan@redhat.com>
- Return 8390.c to the old way of handling short packets (which is also
faster)
- Remove the skb_padto from orinoco. This got left in when the padding bad
write patch was added and is actually not needed. This is fixing a merge
error way back when.
- Wavelan can also use the stack based buffer trick if you want Signed-off-by: Jeff Garzik <jeff@garzik.org>
Eric Sesterhenn [Wed, 21 Jun 2006 14:17:17 +0000 (16:17 +0200)]
[PATCH] Dereference in tokenring/olympic.c
hi,
coverity found (bug id #225) that we might call free_netdev()
with NULL argument, when alloc_trdev() fails. This patch
changes the goto, so we dont call free_netdev() for
dev == NULL.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Eric Sesterhenn [Wed, 21 Jun 2006 14:40:24 +0000 (16:40 +0200)]
[PATCH] Array overrun in drivers/net/wireless/wavelan.c
hi,
this is another array overrun spotted by coverity (#id 507)
we should check the index against array size before using it.
Not sure why the driver doesnt use ARRAY_SIZE instead of its
own macro.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Eric Sesterhenn [Wed, 21 Jun 2006 14:10:48 +0000 (16:10 +0200)]
[PATCH] Remove useless check in drivers/net/pcmcia/xirc2ps_cs.c
hi,
coverity choked at this check (id #223), assuming that
skb might be NULL and used anyways later. Since
start_hard_xmit() always gets called with a valid
skb, the check is useless and this patch removes it.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Philip Craig [Wed, 21 Jun 2006 01:33:26 +0000 (11:33 +1000)]
[PATCH] 8139cp: fix eeprom read command length
The read command for the 93C46/93C56 EEPROMS should be 3 bits plus
the address. This doesn't appear to affect the operation of the
read command, but similar errors for write commands do cause failures.
Signed-off-by: Philip Craig <philipc@snapgear.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Gary Zambrano [Tue, 20 Jun 2006 22:34:36 +0000 (15:34 -0700)]
[PATCH] b44: add wol for old nic
This patch adds wol support for the older 440x nics that use pattern matching.
This patch is a redo thanks to feedback from Michael Chan and Francois Romieu.
Signed-off-by: Gary Zambrano <zambrano@broadcom.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Andrew Victor [Tue, 20 Jun 2006 09:50:23 +0000 (11:50 +0200)]
[PATCH] AT91RM9200 Ethernet #1: Link poll
For Ethernet PHYs that don't have an IRQ pin or boards that don't
connect the IRQ pin to the processor, we enable a timer to poll the
PHY's link state.
Patch originally supplied by Eric Benard and Roman Kolesnikov.
Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (27 commits)
[PATCH] PCI: nVidia quirk to make AER PCI-E extended capability visible
[PATCH] PCI: fix issues with extended conf space when MMCONFIG disabled because of e820
[PATCH] PCI: Bus Parity Status sysfs interface
[PATCH] PCI: fix memory leak in MMCONFIG error path
[PATCH] PCI: fix error with pci_get_device() call in the mpc85xx driver
[PATCH] PCI: MSI-K8T-Neo2-Fir: run only where needed
[PATCH] PCI: fix race with pci_walk_bus and pci_destroy_dev
[PATCH] PCI: clean up pci documentation to be more specific
[PATCH] PCI: remove unneeded msi code
[PATCH] PCI: don't move ioapics below PCI bridge
[PATCH] PCI: cleanup unused variable about msi driver
[PATCH] PCI: disable msi mode in pci_disable_device
[PATCH] PCI: Allow MSI to work on kexec kernel
[PATCH] PCI: AMD 8131 MSI quirk called too late, bus_flags not inherited ?
[PATCH] PCI: Move various PCI IDs to header file
[PATCH] PCI Bus Parity Status-broken hardware attribute, EDAC foundation
[PATCH] PCI: i386/x86_84: disable PCI resource decode on device disable
[PATCH] PCI ACPI: Rename the functions to avoid multiple instances.
[PATCH] PCI: don't enable device if already enabled
[PATCH] PCI: Add a "enable" sysfs attribute to the pci devices to allow userspace (Xorg) to enable devices without doing foul direct access
...
Richard Purdie [Thu, 22 Jun 2006 21:47:34 +0000 (14:47 -0700)]
[PATCH] zlib_inflate: Upgrade library code to a recent version
Upgrade the zlib_inflate implementation in the kernel from a patched
version 1.1.3/4 to a patched 1.2.3.
The code in the kernel is about seven years old and I noticed that the
external zlib library's inflate performance was significantly faster (~50%)
than the code in the kernel on ARM (and faster again on x86_32).
For comparison the newer deflate code is 20% slower on ARM and 50% slower
on x86_32 but gives an approx 1% compression ratio improvement. I don't
consider this to be an improvement for kernel use so have no plans to
change the zlib_deflate code.
Various changes have been made to the zlib code in the kernel, the most
significant being the extra functions/flush option used by ppp_deflate.
This update reimplements the features PPP needs to ensure it continues to
work.
This code has been tested on ARM under both JFFS2 (with zlib compression
enabled) and ppp_deflate and on x86_32. JFFS2 sees an approx. 10% real
world file read speed improvement.
This patch also removes ZLIB_VERSION as it no longer has a correct value.
We don't need version checks anyway as the kernel's module handling will
take care of that for us. This removal is also more in keeping with the
zlib author's wishes (http://www.zlib.net/zlib_faq.html#faq24) and I've
added something to the zlib.h header to note its a modified version.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Acked-by: Joern Engel <joern@wh.fh-wedel.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bjorn Helgaas [Thu, 22 Jun 2006 21:47:32 +0000 (14:47 -0700)]
[PATCH] vgacon: make VGA_MAP_MEM take size, remove extra use
VGA_MAP_MEM translates to ioremap() on some architectures. It makes sense
to do this to vga_vram_base, because we're going to access memory between
vga_vram_base and vga_vram_end.
But it doesn't really make sense to map starting at vga_vram_end, because
we aren't going to access memory starting there. On ia64, which always has
to be different, ioremapping vga_vram_end gives you something completely
incompatible with ioremapped vga_vram_start, so vga_vram_size ends up being
nonsense.
As a bonus, we often know the size up front, so we can use ioremap()
correctly, rather than giving it a zero size.
NeilBrown [Thu, 22 Jun 2006 21:47:28 +0000 (14:47 -0700)]
[PATCH] Fix dcache race during umount
The race is that the shrink_dcache_memory shrinker could get called while a
filesystem is being unmounted, and could try to prune a dentry belonging to
that filesystem.
If it does, then it will call in to iput on the inode while the dentry is
no longer able to be found by the umounting process. If iput takes a
while, generic_shutdown_super could get all the way though
shrink_dcache_parent and shrink_dcache_anon and invalidate_inodes without
ever waiting on this particular inode.
Eventually the superblock gets freed anyway and if the iput tried to touch
it (which some filesystems certainly do), it will lose. The promised
"Self-destruct in 5 seconds" doesn't lead to a nice day.
The race is closed by holding s_umount while calling prune_one_dentry on
someone else's dentry. As a down_read_trylock is used,
shrink_dcache_memory will no longer try to prune the dentry of a filesystem
that is being unmounted, and unmount will not be able to start until any
such active prune_one_dentry completes.
This requires that prune_dcache *knows* which filesystem (if any) it is
doing the prune on behalf of so that it can be careful of other
filesystems. shrink_dcache_memory isn't called it on behalf of any
filesystem, and so is careful of everything.
shrink_dcache_anon is now passed a super_block rather than the s_anon list
out of the superblock, so it can get the s_anon list itself, and can pass
the superblock down to prune_dcache.
If prune_dcache finds a dentry that it cannot free, it leaves it where it
is (at the tail of the list) and exits, on the assumption that some other
thread will be removing that dentry soon. To try to make sure that some
work gets done, a limited number of dnetries which are untouchable are
skipped over while choosing the dentry to work on.
I believe this race was first found by Kirill Korotaev.
Cc: Jan Blunck <jblunck@suse.de> Acked-by: Kirill Korotaev <dev@openvz.org> Cc: Olaf Hering <olh@suse.de> Acked-by: Balbir Singh <balbir@in.ibm.com> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Balbir Singh <balbir@in.ibm.com> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] avoid tasklist_lock at getrusage for multithreaded case too
Avoid taking tasklist_lock for at getrusage for the multithreaded case too.
We don't need to take the tasklist lock for thread traversal of a process
since Oleg's do-__unhash_process-under-siglock.patch and related work.
Miklos Szeredi [Thu, 22 Jun 2006 21:47:22 +0000 (14:47 -0700)]
[PATCH] remove steal_locks()
This patch removes the steal_locks() function.
steal_locks() doesn't work correctly with any filesystem that does it's own
lock management, including NFS, CIFS, etc.
In addition it has weird semantics on local filesystems in case tasks
sharing file-descriptor tables are doing POSIX locking operations in
parallel to execve().
The steal_locks() function has an effect on applications doing:
clone(CLONE_FILES)
/* in child */
lock
execve
lock
POSIX locks acquired before execve (by "child", "parent" or any further
task sharing files_struct) will after the execve be owned exclusively by
"child".
According to Chris Wright some LSB/LTP kind of suite triggers without the
stealing behavior, but there's no known real-world application that would
also fail.
Apps using NPTL are not affected, since all other threads are killed before
execve.
Apps using LinuxThreads are only affected if they
- have multiple threads during exec (LinuxThreads doesn't kill other
threads, the app may do it with pthread_kill_other_threads_np())
- rely on POSIX locks being inherited across exec
Both conditions are documented, but not their interaction.
Apps using clone() natively are affected if they
- use clone(CLONE_FILES)
- rely on POSIX locks being inherited across exec
The above scenarios are unlikely, but possible.
If the patch is vetoed, there's a plan B, that involves mostly keeping the
weird stealing semantics, but changing the way lock ownership is handled so
that network and local filesystems work consistently.
That would add more complexity though, so this solution seems to be
preferred by most people.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Matthew Wilcox <willy@debian.org> Cc: Chris Wright <chrisw@sous-sol.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Steven French <sfrench@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
generic_forget_inode()
bdev_clear_inode()
/* restre the fs's ->i_mapping */
inode->i_mapping = &inode->i_data;
/* bdev's inode was freed */
destroy_inode(inode);
if (wait) {
/* dereference a freed bdev's mapping->host */
filemap_fdatawait(mapping); /* Oops */
Since __sync_single_inode() is only taking a ref-count of fs's inode, the
another process can be close() and freeing the bdev's inode while writing
fs's inode. So, __sync_signle_inode() accesses the freed ->i_mapping,
oops.
This patch takes a ref-count on the bdev's inode for the fs's inode before
setting a ->i_mapping, and the clear_inode() of the fs's inode does iput() on
the bdev's inode. So if the fs's inode is still living, bdev's inode
shouldn't be freed.
Andrew Morton [Thu, 22 Jun 2006 21:47:18 +0000 (14:47 -0700)]
[PATCH] suspend_console() warning fix
kernel/power/main.c: In function 'suspend_prepare':
kernel/power/main.c:89: warning: implicit declaration of function 'suspend_console'
kernel/power/main.c: In function 'suspend_finish':
kernel/power/main.c:137: warning: implicit declaration of function 'resume_console'
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Howells [Thu, 22 Jun 2006 21:47:18 +0000 (14:47 -0700)]
[PATCH] Keys: Fix race between two instantiators of a key
Add a revocation notification method to the key type and calls it whilst
the key's semaphore is still write-locked after setting the revocation
flag.
The patch then uses this to maintain a reference on the task_struct of the
process that calls request_key() for as long as the authorisation key
remains unrevoked.
This fixes a potential race between two processes both of which have
assumed the authority to instantiate a key (one may have forked the other
for example). The problem is that there's no locking around the check for
revocation of the auth key and the use of the task_struct it points to, nor
does the auth key keep a reference on the task_struct.
Access to the "context" pointer in the auth key must thenceforth be done
with the auth key semaphore held. The revocation method is called with the
target key semaphore held write-locked and the search of the context
process's keyrings is done with the auth key semaphore read-locked.
The check for the revocation state of the auth key just prior to searching
it is done after the auth key is read-locked for the search. This ensures
that the auth key can't be revoked between the check and the search.
The revocation notification method is added so that the context task_struct
can be released as soon as instantiation happens rather than waiting for
the auth key to be destroyed, thus avoiding the unnecessary pinning of the
requesting process.
Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Michael LeMay [Thu, 22 Jun 2006 21:47:17 +0000 (14:47 -0700)]
[PATCH] selinux: add hooks for key subsystem
Introduce SELinux hooks to support the access key retention subsystem
within the kernel. Incorporate new flask headers from a modified version
of the SELinux reference policy, with support for the new security class
representing retained keys. Extend the "key_alloc" security hook with a
task parameter representing the intended ownership context for the key
being allocated. Attach security information to root's default keyrings
within the SELinux initialization routine.
Has passed David's testsuite.
Signed-off-by: Michael LeMay <mdlemay@epoch.ncsc.mil> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <jmorris@namei.org> Acked-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Thu, 22 Jun 2006 21:47:14 +0000 (14:47 -0700)]
[PATCH] sparc build breakage
rd_prompt et.al. depend on CONFIG_BLK_DEV_RAM, not CONFIG_BLK_INITRD; now
that those are independent, setup.c blows with INITRD on and BLK_DEV_RAM
off.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: "David S. Miller" <davem@davemloft.net> Cc: William Lee Irwin III <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kevin Hilman [Thu, 22 Jun 2006 21:27:14 +0000 (22:27 +0100)]
[ARM] 3537/1: Rework DMA-bounce locking for finer granularity
Patch from Kevin Hilman
This time with IRQ versions of locks.
Rework also enables compatability with realtime-preemption patch.
With the current locking via interrupt disabling, under RT,
potentially sleeping functions can be called with interrupts
disabled.
Signed-off-by: Kevin Hilman <khilman@mvista.com> Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Rod Whitby [Thu, 22 Jun 2006 21:21:02 +0000 (22:21 +0100)]
[ARM] 3597/1: ixp4xx/nslu2: Board support for new LED subsystem
Patch from Rod Whitby
This patch implements NEW_LEDS support for the Linksys NSLU2. The
NSLU2 has four LED indicators, which are the only form of output for
an unmodified device - there is no keyboard or display on an NSLU2.
For an NSLU2 which has been modified to bring out the serial port
console, it is important to register that device first separately, to
enable debugging of other device support.
Signed-off-by: John Bowler <jbowler@acm.org> Signed-off-by: Rod Whitby <rod@whitby.id.au> Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Rod Whitby [Thu, 22 Jun 2006 21:21:01 +0000 (22:21 +0100)]
[ARM] 3595/1: ixp4xx/nas100d: Board support for new LED subsystem
Patch from Rod Whitby
This patch implements NEW_LEDS support for the IOMega NAS100d. The
NAS100d has three LED indicators, which are the only form of output
for an unmodified device - there is no keyboard or display on an
NAS100d. For an NAS100d which has been modified to bring out the
serial port console, it is important to register that device first
separately, to enable debugging of other device support.
Signed-off-by: John Bowler <jbowler@acm.org> Signed-off-by: Rod Whitby <rod@whitby.id.au> Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Nicolas Pitre [Thu, 22 Jun 2006 21:18:45 +0000 (22:18 +0100)]
[ARM] 3626/1: ARM EABI: fix syscall restarting
Patch from Nicolas Pitre
The RESTARTBLOCK case currently store some code on the stack to invoke
sys_restart_syscall. However this is ABI dependent and there is a
mismatch with the way __NR_restart_syscall gets defined when the kernel
is compiled for EABI.
There is also a long standing bug in the thumb case since with OABI the
__NR_restart_syscall value includes __NR_SYSCALL_BASE which should not
be the case for Thumb syscalls.
Credits to Yauheni Kaliuta <yauheni.kaliuta@gmail.com> for finding the
EABI bug.
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Johannes Berg [Wed, 21 Jun 2006 13:43:44 +0000 (15:43 +0200)]
[ALSA] snd-powermac: no longer handle anything with a layout-id property
This patch removes from snd-powermac the code that check for the layout-id
and instead adds code that makes it refuse loading when a layout-id property
is present, nothing that snd-aoa should be used.
It also removes the 'toonie' codec from snd-powermac which was only ever
used on the mac mini which has a layout-id property.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Johannes Berg [Wed, 21 Jun 2006 13:42:43 +0000 (15:42 +0200)]
[ALSA] snd-aoa: add snd-aoa
This large patch adds all of snd-aoa.
Consisting of many modules, it currently replaces snd-powermac
for all layout-id based machines and handles many more (for
example new powerbooks and powermacs with digital output that
previously couldn't be used at all).
It also has support for all layout-IDs that Apple has (judging
from their Info.plist file) but not all are tested.
The driver currently has 2 known regressions over snd-powermac:
* it doesn't handle powermac 7,2 and 7,3
* it doesn't have a DRC control on snapper-based machines
I will fix those during the 2.6.18 development cycle.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Justin Sunseri reports that sound is audible on his Lenovo 3000
N100-07684JU by passing 'model=laptop-eapd' to modprobe, so this
patch adds the pci ids for his sound device to patch_analog.c .
This commit closes LP#39517. Alexey Parshin also confirmed the fix at
http://bugs.gentoo.org/137245
TODO: Mute onboard speakers when device is plugged into the headphone
jack. Muting the 'External Amplifier' mixer element while a device is
plugged into the headphone jack allows sound to be played only from the
headphone jack.
From: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Daniel T Chen <crimsun at ubuntu.com> Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Jaya Kumar [Mon, 19 Jun 2006 13:06:14 +0000 (15:06 +0200)]
[ALSA] AD1888 suspend/resume fix
This patch adds a write to an undocumented register, 0x60 Extended
Codec Register Page in the AD1888 codec. It is neccessary in order
to make suspend/resume work with the AD1888.
Rodolfo Giometti [Mon, 19 Jun 2006 13:04:54 +0000 (15:04 +0200)]
[ALSA] Disable AC97 AUX and VIDEO controls for WM9705 touchscreen
This patch by Rodolfo Giometti disables the AC97 AUX and VIDEO controls
on the WM9705 when the touchscreen is selected as the AUX and VIDEO
lines are shared with the touch controller.
Changes:-
o Added AC97_HAS_NO_AUX flag
o Test for AC97_HAS_NO_AUX flag in snd_ac97_mixer_build()
o Sets AC97_HAS_NO_VIDEO and AC97_HAS_NO_AUX in patch_wolfson05() when
WM9705 touch driver is selected.
Daniel T Chen [Fri, 16 Jun 2006 14:21:54 +0000 (16:21 +0200)]
[ALSA] Add hp_only quirk for pci id [161f:2032] to via82xx
http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=commitdiff;h=eae2cc78de39502595f67b7fc1f821f5963bb8ae
UpstreamStatus: Not merged
Christian Bjalevik reports in LP#38546 that his sound chipset requires
the 'hp_only' quirk to allow him to control sound volume correctly when
headphones are inserted. This patch adds the appropriate pci id to the
via82xx ALSA driver so that the quirk is applied automatically, thereby
removing the need for users to modify /etc/modprobe.d/alsa-base (or to
unload and reload snd-via82xx with ac97_quirk=hp_only).
This patch closes LP#38546.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Ben Collins <bcollins@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Daniel T Chen [Fri, 16 Jun 2006 10:13:00 +0000 (12:13 +0200)]
[ALSA] sound/pci/: Add hp_only quirk for Dell D800 laptops
http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=commitdiff;h=9ad787cd9670c3f3b8f3db235e84baf00a2ea526
Anders Ostling comments in Malone #41015 that his Dell D800 laptop's
volume control works correctly when the hp_only quirk is passed to
modprobe. This commit adds his hardware's sub{vendor,device} ids to
the quirk list for the intel8x0 driver.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Ben Collins <bcollins@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jesper Juhl [Tue, 13 Jun 2006 09:58:12 +0000 (11:58 +0200)]
[ALSA] fix potential NULL pointer deref in snd_sb8dsp_midi_interrupt()
First testing if a pointer is NULL and if it is (or might be), proceeding
with code that dereferences that same pointer is clearly a mistake.
This happens in sound/isa/sb/sb8_midi.c::snd_sb8dsp_midi_interrupt()
The patch below reworks the code so this unfortunate case doesn't happen.
Also remove some blank comments.
Found by the Coverity checker as bug #367
Patch is compile testted only due to lack of hardware.
Takashi Iwai [Tue, 13 Jun 2006 09:57:22 +0000 (11:57 +0200)]
[ALSA] hda-codec - Add SPDIF support to Thinkpad T/X/Z60
Added IEC958 (SPDIF) output support to Thinkpad T/X/Z60 with
AD1981HD codec. The spdif jack is on docking station.
Also, renamed 'IEC958 Playback Route' to 'IEC958 Playback Source'
to avoid the mixer name confliction with IEC958 switch.
Jaya Kumar [Mon, 12 Jun 2006 08:08:02 +0000 (10:08 +0200)]
[ALSA] ac97_codec - fix duplicate control creation in AC97
This patch conditions AC97 control creation by whether or not the
codec is an AD18xx codec. This fixes the case where the default control
would get created and then snd_ac97_mixer_build fails out when creation
of ad18xx specific control would get attempted. This problem was found
and debuged by Marcelo Tosatti.
Signed-off-by: Jaya Kumar <jayakumar.alsa@gmail.com> Signed-off-by: Jaroslav Kysela <perex@suse.cz>