linux-2.6
19 years ago[PATCH] Add dm-snapshot tutorial in Documentation
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:29 +0000 (21:44 -0700)] 
[PATCH] Add dm-snapshot tutorial in Documentation

I've recently discovered the real functionality of device-mapper snapshots,
and since they are not well known, I've decided to write some docs for
them.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] NFS: fix client oops when debugging is on
Nick Wilson [Fri, 23 Sep 2005 04:44:28 +0000 (21:44 -0700)] 
[PATCH] NFS: fix client oops when debugging is on

nfs_readpage_release() causes an oops while accessing a file with NFS
debugging turned on (echo 32767 > /proc/sys/sunrpc/nfs_debug) and a kernel
built with CONFIG_DEBUG_SLAB.

This patch moves the debugging statement above nfs_release_request() to
avoid accessing freed memory.

Signed-off-by: Nick Wilson <njw@osdl.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Fix bd_claim() error code.
Rob Landley [Fri, 23 Sep 2005 04:44:27 +0000 (21:44 -0700)] 
[PATCH] Fix bd_claim() error code.

Problem: In some circumstances, bd_claim() is returning the wrong error
code.

If we try to swapon an unused block device that isn't swap formatted, we
get -EINVAL.  But if that same block device is already mounted, we instead
get -EBUSY, even though it still isn't a valid swap device.

This issue came up on the busybox list trying to get the error message
from "swapon -a" right.  If a swap device is already enabled, we get -EBUSY,
and we shouldn't report this as an error.  But we can't distinguish the two
-EBUSY conditions, which are very different errors.

In the code, bd_claim() returns either 0 or -EBUSY, but in this case busy
means "somebody other than sys_swapon has already claimed this", and
_that_ means this block device can't be a valid swap device.  So return
-EINVAL there.

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ext3: EXT3_DEBUG build fixes
Glauber de Oliveira Costa [Fri, 23 Sep 2005 04:44:26 +0000 (21:44 -0700)] 
[PATCH] ext3: EXT3_DEBUG build fixes

Fix some warnings and a build error when EXT3_DEBUG is enabled.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] oss: don't concatenate __FUNCTION__ with strings
Clemens Buchacher [Fri, 23 Sep 2005 04:44:24 +0000 (21:44 -0700)] 
[PATCH] oss: don't concatenate __FUNCTION__ with strings

It's deprecated. Use "%s", __FUNCTION__ instead.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] xtensa: remove io_remap_page_range and minor clean-ups
Chris Zankel [Fri, 23 Sep 2005 04:44:23 +0000 (21:44 -0700)] 
[PATCH] xtensa: remove io_remap_page_range and minor clean-ups

Remove io_remap_page_range() from all of Linux 2.6.x (as requested and
suggested by Randy Dunlap) and minor clean-ups.

Signed-off-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: replace printk with "stack-friendly" printf - to report console failure
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:22 +0000 (21:44 -0700)] 
[PATCH] uml: replace printk with "stack-friendly" printf - to report console failure

User get *a lot* confused when consoles don't work but we don't report
anything.  And, as reported in the comment, using printk to report "your
console doesn't work" isn't likely to go that far.

Fix the problem on the base of this: stack consumption by host printf().  Use
kernel sprintf() and os_write_file, using a wild guess that one page will be
enough for the message, to preallocate the buffer with kmalloc().

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: use GFP_ATOMIC for allocations under spinlocks.
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:21 +0000 (21:44 -0700)] 
[PATCH] uml: use GFP_ATOMIC for allocations under spinlocks.

setup_initial_poll is only called with sigio_lock() held, so use appropriate
allocation.

Also, parse_chan() can also be called when holding a spinlock (see line_open()
 -> parse_chan_pair()).

I have sporadic problems (spinlock taken twice, with spinlock debugging on UP)
which could be caused by a sequence like "take spinlock, alloc and go to
sleep, take again the spinlock in the other thread".

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: Fix GFP_ flags usage
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:20 +0000 (21:44 -0700)] 
[PATCH] uml: Fix GFP_ flags usage

GFP_ATOMIC | GFP_KERNEL is meaningless and won't work.  Actually it never
worked, even in 2.4.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: avoid fixing faults while atomic
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:20 +0000 (21:44 -0700)] 
[PATCH] uml: avoid fixing faults while atomic

Following i386, we should maybe refuse trying to fault in pages when we're
doing atomic operations, because to handle the fault we could need to take
already taken spinlocks.

Also, if we're doing an atomic operation (in the sense of in_atomic()) we're
surely in kernel mode and we're surely going to handle adequately the failed
fault, so it's safe to behave this way.

Currently, on UML SMP is rarely used, and we don't support PREEMPT, so this is
unlikely to create problems right now, but it might in the future.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: run mconsole "sysrq" in process context
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:19 +0000 (21:44 -0700)] 
[PATCH] uml: run mconsole "sysrq" in process context

Things are breaking horribly with sysrq called in interrupt context.  I want
to try to fix it, but probably this is simpler.  To tell the truth, sysrq is
normally run in interrupt context, so there shouldn't be any problem.

There's also a warning from the fault handler because it's run in atomic
context (I have a patch for that, only I deferred it).  This is why I'm doing
this.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: fix condition in tlb flush
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:18 +0000 (21:44 -0700)] 
[PATCH] uml: fix condition in tlb flush

Avoid setting w = 0 twice.  Spotted this (trivial) thing which is needed for
another patch.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: fix hang in TT mode on fault
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:16 +0000 (21:44 -0700)] 
[PATCH] uml: fix hang in TT mode on fault

The current code doesn't handle well general protection faults on the host -
it thinks that cr2 is always the address of a page fault.  While actually, on
general protection faults, that address is not accessible, so we'd better
assume we couldn't satisfy the fault.  Currently instead we think we've fixed
it, so we go back, retry the instruction and fault again endlessly.

This leads to the kernel hanging when doing copy_from_user(dest, -1, ...) in
TT mode, since reading *(-1) causes a GFP, and we don't support kernel
preemption.

Thanks to Luo Xin for testing UML with LTP and reporting the failures he got.

Cc: Luo Xin <luothing@sina.com>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: don't redundantly mark pte as newpage in pte_modify
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:15 +0000 (21:44 -0700)] 
[PATCH] uml: don't redundantly mark pte as newpage in pte_modify

pte_modify marks a page as needing flush, which is redundant because the
resulting PTE is still set with set_pte, which already handles that.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] strlcat: use for uml umid.c
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:14 +0000 (21:44 -0700)] 
[PATCH] strlcat: use for uml umid.c

Simplify the code by using strlcat() instead of strncat() and manual
appending.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: don't remove umid files in conflict case
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:12 +0000 (21:44 -0700)] 
[PATCH] uml: don't remove umid files in conflict case

Only remove the UML pidfile and management socket if we created them.
Currently in case two UMLs are started with the same umid, the second will
remove the first's ones.

Probably we should also panic() at that point, not sure however.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] swsusp: fix comments
Pavel Machek [Fri, 23 Sep 2005 04:44:11 +0000 (21:44 -0700)] 
[PATCH] swsusp: fix comments

Fix comments in swsusp.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] __kmalloc: Generate BUG if size requested is too large.
Christoph Lameter [Fri, 23 Sep 2005 04:44:10 +0000 (21:44 -0700)] 
[PATCH] __kmalloc: Generate BUG if size requested is too large.

I had an issue on ia64 where I got a bug in kernel/workqueue because
kzalloc returned a NULL pointer due to the task structure getting too big
for the slab allocator.  Usually these cases are caught by the kmalloc
macro in include/linux/slab.h.

Compilation will fail if a too big value is passed to kmalloc.

However, kzalloc uses __kmalloc which has no check for that.  This patch
makes __kmalloc bug if a too large entity is requested.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] mesh scsi: fix error handling
Benjamin Herrenschmidt [Fri, 23 Sep 2005 04:44:09 +0000 (21:44 -0700)] 
[PATCH] mesh scsi: fix error handling

The PowerMac mesh SCSI driver had some missing error handling which would
trigger warnings due to lack of handling of return value from
scsi_add_host.  This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] atiixp_modem printk fixes
Chuck Ebbert [Fri, 23 Sep 2005 04:44:08 +0000 (21:44 -0700)] 
[PATCH] atiixp_modem printk fixes

Correctly identify atiixp_modem in its error messages.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Cc: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] corrections to top-level README
Randy Dunlap [Fri, 23 Sep 2005 04:44:07 +0000 (21:44 -0700)] 
[PATCH] corrections to top-level README

Corrections to the recent top-level README changes.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64: SMU driver update & i2c support
Benjamin Herrenschmidt [Fri, 23 Sep 2005 04:44:06 +0000 (21:44 -0700)] 
[PATCH] ppc64: SMU driver update & i2c support

The SMU is the "system controller" chip used by Apple recent G5 machines
including the iMac G5.  It drives things like fans, i2c busses, real time
clock, etc...

The current kernel contains a very crude driver that doesn't do much more
than reading the real time clock synchronously.  This is a completely
rewritten driver that provides interrupt based command queuing, a userland
interface, and an i2c/smbus driver for accessing the devices hanging off
the SMU i2c busses like temperature sensors.  This driver is a basic block
for upcoming work on thermal control for those machines, among others.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64: Fix 64bit ptrace DABR support
Anton Blanchard [Fri, 23 Sep 2005 04:44:05 +0000 (21:44 -0700)] 
[PATCH] ppc64: Fix 64bit ptrace DABR support

Fix my stupid bug in the 64bit version of PTRACE_SET_DEBUGREG.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64: Fix build with iommu debug enabled
Anton Blanchard [Fri, 23 Sep 2005 04:44:05 +0000 (21:44 -0700)] 
[PATCH] ppc64: Fix build with iommu debug enabled

Fix build when iommu debug is enabled.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64: Fix LPAR regression
Anton Blanchard [Fri, 23 Sep 2005 04:44:04 +0000 (21:44 -0700)] 
[PATCH] ppc64: Fix LPAR regression

The recent iommu fix broke booting on some POWER4 and POWER5 LPAR boxes.

It looks like we have been calling the non LPAR iommu_dev_setup on LPAR
machines for a while. The recent iommu fix caused that code path to
fail.

It looks like we just need to hook up the devices iommu_table to the
parents one, so do that instead of calling iommu_dev_setup_pSeries and
crossing the streams.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ext3: ext3_show_options fix
OGAWA Hirofumi [Fri, 23 Sep 2005 04:44:03 +0000 (21:44 -0700)] 
[PATCH] ext3: ext3_show_options fix

EXT3_MOUNT_DATA_FLAGS is not a boolean. This fixes it.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] slab: fix handling of pages from foreign NUMA nodes
Christoph Lameter [Fri, 23 Sep 2005 04:44:02 +0000 (21:44 -0700)] 
[PATCH] slab: fix handling of pages from foreign NUMA nodes

The numa slab allocator may allocate pages from foreign nodes onto the
lists for a particular node if a node runs out of memory.  Inspecting the
slab->nodeid field will not reflect that the page is now in use for the
slabs of another node.

This patch fixes that issue by adding a node field to free_block so that
the caller can indicate which node currently uses a slab.

Also removes the check for the current node from kmalloc_cache_node since
the process may shift later to another node which may lead to an allocation
on another node than intended.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] swsusp: do not trigger BUG_ON() if there is not enough memory
Rafael J. Wysocki [Fri, 23 Sep 2005 04:44:01 +0000 (21:44 -0700)] 
[PATCH] swsusp: do not trigger BUG_ON() if there is not enough memory

The following patch makes swsusp avoid triggering the BUG_ON() in
swsusp_suspend() if there is not enough memory for suspend.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] hdaps: small update.
Robert Love [Fri, 23 Sep 2005 04:44:00 +0000 (21:44 -0700)] 
[PATCH] hdaps: small update.

- Handle dmi_system_check() elegantly, now that my bugfix is upstream.

- Add support for the X41 and R52.

- Cleanup some comments do I do not have to keep updating them with each
  new whitelisted laptop.

Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Fix mmap() of /dev/hpet
Keir Fraser [Fri, 23 Sep 2005 04:43:59 +0000 (21:43 -0700)] 
[PATCH] Fix mmap() of /dev/hpet

The address passed to io_remap_pfn_range() in hpet_mmap() does not need to
be converted using __pa(): it is already a physical address.  This bug was
found and the patch suggested by Clay Harris.

I introduced this particular bug when making io_remap_pfn_range changes a
few months ago.  In fact mmap()ing /dev/hpet has *never* previously worked:
before my changes __pa() was being executed on an ioremap()ed virtual
address, which is also invalid.

Signed-off-by: Keir Fraser <keir@xensource.com>
Cc: Robert Picco <Robert.Picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] slab: alpha inlining fix
Ivan Kokshaysky [Fri, 23 Sep 2005 04:43:58 +0000 (21:43 -0700)] 
[PATCH] slab: alpha inlining fix

It is essential that index_of() be inlined.  But alpha undoes the gcc
inlining hackery and index_of() ends up out-of-line.  So fiddle with things
to make that function inline again.

Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] alpha: fix kernel panic during SysRq-b
Ivan Kokshaysky [Fri, 23 Sep 2005 04:43:57 +0000 (21:43 -0700)] 
[PATCH] alpha: fix kernel panic during SysRq-b

acquire_console_sem() does BUG() in interrupt context now, as in the case
of SysRq-b.

Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] SOFTWARE_SUSPEND needs HOTPLUG_CPU on SMP
Randy Dunlap [Fri, 23 Sep 2005 04:43:56 +0000 (21:43 -0700)] 
[PATCH] SOFTWARE_SUSPEND needs HOTPLUG_CPU on SMP

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: fix build with oprofile
Benjamin Herrenschmidt [Fri, 23 Sep 2005 04:43:55 +0000 (21:43 -0700)] 
[PATCH] ppc32: fix build with oprofile

Current -git tree doesn't build when enabling oprofile on a non-bookE CPU
(like on a PowerMac for example).  While there is no performance counter
support for these CPUs implemented yet, it's still nice to be able to use
the timer based sampling, and that got broken.

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>
19 years ago[PATCH] DEBUG redefined in drivers/mtd/devices/docecc.c
Grant Coady [Fri, 23 Sep 2005 04:43:54 +0000 (21:43 -0700)] 
[PATCH] DEBUG redefined in drivers/mtd/devices/docecc.c

Fix namespace clash:

drivers/mtd/devices/docecc.c:43:1: warning: "DEBUG" redefined
In file included from drivers/mtd/devices/docecc.c:40:
include/linux/mtd/mtd.h:219:1: warning: this is the location of the previous definition

Signed-off-by: Grant Coady <gcoady@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Rename vprintk define in bttpvp.h
Bernd Petrovitsch [Fri, 23 Sep 2005 04:43:53 +0000 (21:43 -0700)] 
[PATCH] Rename vprintk define in bttpvp.h

Rename the (apparently) bttv intern #define vprintk to verbprintk to
resolve a name clash.

Reason: vprintk() is defined in include/linux/kernel.h similar to printk
but with a va_list argument.

(akpm: I changed it to bttv_printk)

Cc: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] v9fs: don't free root dentry & inode if error occurs in v9fs_get_sb
Latchesar Ionkov [Fri, 23 Sep 2005 04:43:53 +0000 (21:43 -0700)] 
[PATCH] v9fs: don't free root dentry & inode if error occurs in v9fs_get_sb

If error occurs while in v9fs_get_sb after it calles sget, the dentry object
of the root and its inode may be freed twice -- once while handling the error
in v9fs_get_sb, and second time when v9fs_get_sb calles deactivate_super
(which in turn calls v9fs_kill_super)

The patch removes the unnecessary code that frees the root dentry and its
inode.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] v9fs: replace strlen on newly allocated by __getname buffers to PATH_MAX
Latchesar Ionkov [Fri, 23 Sep 2005 04:43:52 +0000 (21:43 -0700)] 
[PATCH] v9fs: replace strlen on newly allocated by __getname buffers to PATH_MAX

v9fs_vfs_readlink allocates space for the link using __getname and
errorneously uses strlen on the newly allocated buffer to check if the buffer
passed by the user is bigger than the one returned by __getname.

The patch replaces the strlen usage to PATH_MAX, which is the actual size of
the buffers returned by __getname.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] v9fs: make copy of the transport prototype instead of using it directly
Latchesar Ionkov [Fri, 23 Sep 2005 04:43:51 +0000 (21:43 -0700)] 
[PATCH] v9fs: make copy of the transport prototype instead of using it directly

When a new session is created it uses a template object of the specified
transport type to instantiate its own copy.  The code for the making a copy of
the template object was lost, and the object itself is attached to the v9fs
session.  This leads to many sessions using the same transport instead of
having their own copy.

The patch puts back the code that makes a copy of the template object.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] v9fs: allocate the Rwalk qid array from the right conv buffer
Latchesar Ionkov [Fri, 23 Sep 2005 04:43:50 +0000 (21:43 -0700)] 
[PATCH] v9fs: allocate the Rwalk qid array from the right conv buffer

When v9fs_deserealize_fcall deserializes a Rwalk message, it incorrectly
allocates space for the qid array in the source instead of the destination
buffer.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] v9fs: make conv functions to check for conv buffer overflow
Latchesar Ionkov [Fri, 23 Sep 2005 04:43:48 +0000 (21:43 -0700)] 
[PATCH] v9fs: make conv functions to check for conv buffer overflow

buf_check_size function checks if the conv buffer has enough space for the
performed operation, but it doesn't return the result back to the calling
function, only logs an error in the log.

The report-back-error functionality was lost when buf_check_size was
converted from macro to inline function. The return in the macro used to
exit from the functions that include it, after the conversion it just exits
from the inline function itself.

The patch makes buf_check_size to return flag and all functions that use
it check if they should perform the operation, or exit.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Update maintainers list with the kprobes maintainers
Prasanna S Panchamukhi [Fri, 23 Sep 2005 04:43:47 +0000 (21:43 -0700)] 
[PATCH] Update maintainers list with the kprobes maintainers

This patch updates the maintainers list with kprobes maintainers.

Signed-of-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] suspend: cleanup calling of power off methods.
Eric W. Biederman [Fri, 23 Sep 2005 04:43:46 +0000 (21:43 -0700)] 
[PATCH] suspend: cleanup calling of power off methods.

In the lead up to 2.6.13 I fixed a large number of reboot problems by
making the calling conventions consistent.  Despite checking and double
checking my work it appears I missed an obvious one.

The S4 suspend code for PM_DISK_PLATFORM was also calling device_shutdown
without setting system_state, and was not calling the appropriate
reboot_notifier.

This patch fixes the bug by replacing the call of device_suspend with
kernel_poweroff_prepare.

Various forms of this failure have been fixed and tracked for a while.

Thanks for tracking this down go to: Alexey Starikovskiy, Meelis Roos
<mroos@linux.ee>, Nigel Cunningham <ncunningham@cyclades.com>, Pierre
Ossman <drzeus-list@drzeus.cx>

History of this bug is at:
http://bugme.osdl.org/show_bug.cgi?id=4320

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] reboot: comment and factor the main reboot functions
Eric W. Biederman [Fri, 23 Sep 2005 04:43:45 +0000 (21:43 -0700)] 
[PATCH] reboot: comment and factor the main reboot functions

In the lead up to 2.6.13 I fixed a large number of reboot problems by
making the calling conventions consistent.  Despite checking and double
checking my work it appears I missed an obvious one.

This first patch simply refactors the reboot routines so all of the
preparation for various kinds of reboots are in their own functions.
Making it very hard to get the various kinds of reboot out of sync.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] proc_task_root_link c99 fix
Andrew Morton [Fri, 23 Sep 2005 04:43:44 +0000 (21:43 -0700)] 
[PATCH] proc_task_root_link c99 fix

fs/proc/base.c: In function `proc_task_root_link':
fs/proc/base.c:364: warning: ISO C90 forbids mixed declarations and code

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[SPARC64]: Fix comment typo in head.S
David S. Miller [Fri, 23 Sep 2005 03:31:29 +0000 (20:31 -0700)] 
[SPARC64]: Fix comment typo in head.S

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SPARC64]: Rewrite bootup sequence.
David S. Miller [Fri, 23 Sep 2005 03:11:33 +0000 (20:11 -0700)] 
[SPARC64]: Rewrite bootup sequence.

Instead of all of this cpu-specific code to remap the kernel
to the correct location, use portable firmware calls to do
this instead.

What we do now is the following in position independant
assembler:

chosen_node = prom_finddevice("/chosen");
prom_mmu_ihandle_cache = prom_getint(chosen_node, "mmu");
vaddr = 4MB_ALIGN(current_text_addr());
prom_translate(vaddr, &paddr_high, &paddr_low, &mode);
prom_boot_mapping_mode = mode;
prom_boot_mapping_phys_high = paddr_high;
prom_boot_mapping_phys_low = paddr_low;
prom_map(-1, 8 * 1024 * 1024, KERNBASE, paddr_low);

and that replaces the massive amount of by-hand TLB probing and
programming we used to do here.

The new code should also handle properly the case where the kernel
is mapped at the correct address already (think: future kexec
support).

Consequently, the bulk of remap_kernel() dies as does the entirety
of arch/sparc64/prom/map.S

We try to share some strings in the PROM library with the ones used
at bootup, and while we're here mark input strings to oplib.h routines
with "const" when appropriate.

There are many more simplifications now possible.  For one thing, we
can consolidate the two copies we now have of a lot of cpu setup code
sitting in head.S and trampoline.S.

This is a significant step towards CONFIG_DEBUG_PAGEALLOC support.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years agoMerge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Thu, 22 Sep 2005 23:23:04 +0000 (16:23 -0700)] 
Merge branch 'release' of /linux/kernel/git/aegl/linux-2.6

19 years ago[IA64] MCA recovery verify pfn_valid
Hidetoshi Seto [Tue, 20 Sep 2005 07:34:41 +0000 (16:34 +0900)] 
[IA64] MCA recovery verify pfn_valid

Verify the pfn is valid before calling pfn_to_page(),
and cut isolation message if nothing was done.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Acked-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
19 years ago[IA64] Wire in the MCA/INIT handler stacks
Keith Owens [Thu, 22 Sep 2005 08:49:15 +0000 (18:49 +1000)] 
[IA64] Wire in the MCA/INIT handler stacks

Wire the MCA/INIT handler stacks into DTR[2] and track them in
IA64_KR(CURRENT_STACK).  This gives the MCA/INIT handler stacks the
same TLB status as normal kernel stacks.  Reload the old CURRENT_STACK
data on return from OS to SAL.

Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
19 years ago[SPARC64]: Kill readjust_prom_translations()
David S. Miller [Thu, 22 Sep 2005 20:03:36 +0000 (13:03 -0700)] 
[SPARC64]: Kill readjust_prom_translations()

Testing shows that the prom_unmap() calls do absolutely
nothing.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[IA64] Fix simscsi for new SCSI midlayer
Peter Chubb [Sun, 18 Sep 2005 23:36:12 +0000 (09:36 +1000)] 
[IA64] Fix simscsi for new SCSI midlayer

The sd driver now uses scsi_execute_req() for almost everything.
scsi_execute_req() converts requests into scatterlists.

Fix the HP SCSI disk simulator to understand scatterlists for
more commands.

Without this patch the current kernel will not boot on the simulator
(the disks are always detected as having no sectors, and so cannot be
mounted).

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
19 years ago[PATCH] ppc32: Fix configuration of PCI IO space on MPC85xx platform
Kumar Gala [Thu, 22 Sep 2005 04:54:58 +0000 (23:54 -0500)] 
[PATCH] ppc32: Fix configuration of PCI IO space on MPC85xx platform

For platforms that don't have PCI IO at 0 the outbound window
registers were not being properly configured.

Signed-off-by: Andrew Klossner <andrew@cesa.opbu.xerox.com>
Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] USB: Update Documentation/usb/URB.txt
Alan Stern [Thu, 22 Sep 2005 07:49:51 +0000 (00:49 -0700)] 
[PATCH] USB: Update Documentation/usb/URB.txt

This patch (as564) updates Documentation/usb/URB.txt, bringing it roughly
up to the current level.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ub: Comment out unconditional stall clear
Pete Zaitcev [Thu, 22 Sep 2005 07:49:45 +0000 (00:49 -0700)] 
[PATCH] ub: Comment out unconditional stall clear

This code appears to be more trouble than it's worth, considering that
no normal users reload drivers. So, we comment it for now. It is not
removed outright for the benefit of hackers (that is, myself).

Signed-off-by: Pete Zaitcev <zaitcev@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] USB: Add Novatel CDMA Wireless PC card IDs to airprime
David Hollis [Thu, 22 Sep 2005 07:49:39 +0000 (00:49 -0700)] 
[PATCH] USB: Add Novatel CDMA Wireless PC card IDs to airprime

USB: Add device id's for Novatel Wireless CDMA wireless PC card.
     The Novatel CDMA card behaves the same as the AirPrime by providing
     a USB serial port.

Signed-off-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] usb/serial/option.c: Increase input buffer size
Matthias Urlichs [Thu, 22 Sep 2005 07:49:33 +0000 (00:49 -0700)] 
[PATCH] usb/serial/option.c: Increase input buffer size

The card sometimes sends >2000 bytes in one single chunk. Ouch.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] USB: fix pegasus driver
Kevin Vigor [Thu, 22 Sep 2005 07:49:24 +0000 (00:49 -0700)] 
[PATCH] USB: fix pegasus driver

Addresses some small bugs in the pegasus ethernet-over-USB driver.
Specifically, malformed long packets from the adapter could cause a kernel
panic; the interrupt interval calculation was inappropriate for high-speed
devices; the return code from read_mii_word was tested incorrectly; and
failure to unlink outstanding URBs before freeing them could lead to kernel
panics when unloading the driver.

Signed-off-by: Kevin Vigor <kevin@realmsys.com>
Cc: Petko Manolov <petkan@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] USB: sl811-hcd minor fixes
David Brownell [Thu, 22 Sep 2005 07:49:07 +0000 (00:49 -0700)] 
[PATCH] USB: sl811-hcd minor fixes

Three minor sl811-hcd fixes:

 - Elminate memory leak on one (rare) disable/shutdown path.

 - For periodic transfers that don't need to be scheduled, update
   urb->start_frame to represent the transfer phase correctly.

 - Report the (single) port as removable, by default.

Since no drivers yet use start_frame or that part of the hub descriptor,
only that leak is likely to ever matter.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
 drivers/usb/host/sl811-hcd.c |   16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

19 years ago[PATCH] USB: fix pxa2xx_udc compile warnings
Richard Purdie [Thu, 22 Sep 2005 07:48:58 +0000 (00:48 -0700)] 
[PATCH] USB: fix pxa2xx_udc compile warnings

This patch fixes several types in the PXA25x udc driver and hence fixes
several compiler warnings.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] USB: ftdi_sio: allow baud rate to be changed without raising RTS and DTR
Peter Favrholdt [Thu, 22 Sep 2005 07:48:49 +0000 (00:48 -0700)] 
[PATCH] USB: ftdi_sio: allow baud rate to be changed without raising RTS and DTR

I'm using a 2 port USB RS232 dongle to connect to a serial-IR cradle for
a bar code reader). Detecting the baudrate of the serial-IR involves
keeping DTR low while changing baudrate.

This works using normal 16550A serial ports as well as the FTDI driver
version 1.4.0 (Linux 2.6.8) but stopped working with the change to
"ensure RTS and DTR are raised when changing baudrate" introduced in
version 1.4.1 (Linux 2.6.9).

The attached patch fixes this, so RTS and DTR is only raised when
changing baudrate iff the previous baudrate was B0.

Signed-off-by: Peter Favrholdt <pfavr@how.dk>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] USB: more device IDs for Option card driver
Matthias Urlichs [Thu, 22 Sep 2005 07:48:40 +0000 (00:48 -0700)] 
[PATCH] USB: more device IDs for Option card driver

Added support for HUAWEI E600 and Audiovox AirCard

User reports say that these devices work without driver modification.

Signed-off-by: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ub: fix burning cds
Pete Zaitcev [Thu, 22 Sep 2005 07:48:29 +0000 (00:48 -0700)] 
[PATCH] ub: fix burning cds

This patch fixes a few problems with ub and cleans up a couple of things:

 - Bump UB_MAX_REQ_SG, this allows to burn CDs
 - Drop initialization of urb.transfer_flags,
   now that URB_UNLINK_ASYNC is gone
 - Add forgotten processing of stalls at GetMaxLUN
 - Remove a few more P3-tagged printks whose time has come
 - Correct comment about ZIP-100

Signed-off-by: Pete Zaitcev <zaitcev@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
 drivers/block/ub.c |   53 +++++++++++++++++++++++++++--------------------------
 1 file changed, 27 insertions(+), 26 deletions(-)

19 years ago[PATCH] PCI Hotplug: Fix buffer overrun in rpadlpar_sysfs.c
Linda Xie [Thu, 22 Sep 2005 07:48:24 +0000 (00:48 -0700)] 
[PATCH] PCI Hotplug: Fix buffer overrun in rpadlpar_sysfs.c

Signed-off-by: Linda Xie <lxie@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix drivers/pci/probe.c warning
Amos Waterland [Thu, 22 Sep 2005 07:48:19 +0000 (00:48 -0700)] 
[PATCH] fix drivers/pci/probe.c warning

This function expects an unsigned 32-bit type as its third argument:

 static u32 pci_size(u32 base, u32 maxbase, u32 mask)

However, given these definitions:

 #define PCI_BASE_ADDRESS_MEM_MASK (~0x0fUL)
 #define PCI_ROM_ADDRESS_MASK (~0x7ffUL)

these two calls in drivers/pci/probe.c are problematic for architectures
for which a UL is not equivalent to a u32:

 sz = pci_size(l, sz, PCI_BASE_ADDRESS_MEM_MASK);
 sz = pci_size(l, sz, PCI_ROM_ADDRESS_MASK);

Hence the below compile warning when building for ARCH=ppc64:

 drivers/pci/probe.c: In function `pci_read_bases':
 /.../probe.c:168: warning: large integer implicitly truncated to unsigned type
 /.../probe.c:218: warning: large integer implicitly truncated to unsigned type

Here is a simple fix.

Signed-off-by: Amos Waterland <apw@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] PCI: convert kcalloc to kzalloc
Pekka Enberg [Thu, 22 Sep 2005 07:48:11 +0000 (00:48 -0700)] 
[PATCH] PCI: convert kcalloc to kzalloc

This patch converts kcalloc(1, ...) calls to use the new kzalloc() function.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] PCI: remove unused "scratch"
Bjorn Helgaas [Thu, 22 Sep 2005 07:48:02 +0000 (00:48 -0700)] 
[PATCH] PCI: remove unused "scratch"

Unused variable.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] I2C: remove me from the MAINTAINERS file for i2c
Greg Kroah-Hartman [Thu, 22 Sep 2005 07:47:46 +0000 (00:47 -0700)] 
[PATCH] I2C: remove me from the MAINTAINERS file for i2c

Remove my name from the I2C maintainer, Jean is more than capable of
handling it all now.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix class symlinks in sysfs
Bill Nottingham [Thu, 22 Sep 2005 07:47:36 +0000 (00:47 -0700)] 
[PATCH] fix class symlinks in sysfs

The class symlinks in sysfs don't properly handle changing device names.

To demonstrate, rename your network device from eth0 to eth1. Your
pci (or usb, or whatever) device will still have a 'net:eth0' link,
except now it points to /sys/class/net/eth1.

The attached patch makes sure the class symlink name changes when
the class device name changes. It isn't 100% correct, it should be
using sysfs_rename_link. Unfortunately, sysfs_rename_link doesn't exist.

Signed-off-by: Bill Nottingham <notting@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] driver core: add helper device_is_registered()
Daniel Ritz [Thu, 22 Sep 2005 07:47:24 +0000 (00:47 -0700)] 
[PATCH] driver core: add helper device_is_registered()

add the helper and use it instead of open coding the klist_node_attached() check
(which is a layering violation IMHO)

idea by Alan Stern.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Driver Core: fis bus rescan devices race
Daniel Ritz [Thu, 22 Sep 2005 07:47:11 +0000 (00:47 -0700)] 
[PATCH] Driver Core: fis bus rescan devices race

bus_rescan_devices_helper() does not hold the dev->sem when it checks for
!dev->driver().  device_attach() holds the sem, but calls again
device_bind_driver() even when dev->driver is set.

What happens is that a first device_attach() call (module insertion time)
is on the way binding the device to a driver.  Another thread calls
bus_rescan_devices().  Now when bus_rescan_devices_helper() checks for
dev->driver it is still NULL 'cos the the prior device_attach() is not yet
finished.  But as soon as the first one releases the dev->sem the second
device_attach() tries to rebind the already bound device again.
device_bind_driver() does this blindly which leads to a corrupt
driver->klist_devices list (the device links itself, the head points to the
device).  Later a call to device_release_driver() sets dev->driver to NULL
and breaks the link it has to itself on knode_driver.  Rmmoding the driver
later calls driver_detach() which leads to an endless loop 'cos the list
head in klist_devices still points to the device.  And since dev->driver is
NULL it's stuck with the same device forever.  Boom.  And rmmod hangs.

Very easy to reproduce with new-style pcmcia and a 16bit card.  Just loop
modprobe <pcmcia-modules> ;cardctl eject; rmmod <card driver, pcmcia
modules>.

Easiest fix is to check if the device is already bound to a driver in
device_bind_driver().  This avoids the double binding.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years agoNTFS: Fix sparse warnings that have crept in over time.
Anton Altaparmakov [Thu, 22 Sep 2005 12:26:44 +0000 (13:26 +0100)] 
NTFS: Fix sparse warnings that have crept in over time.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
19 years ago[LLC]: fix llc_ui_recvmsg, making it behave like tcp_recvmsg
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 11:29:08 +0000 (08:29 -0300)] 
[LLC]: fix llc_ui_recvmsg, making it behave like tcp_recvmsg

In fact it is an exact copy of the parts that makes sense to LLC :-)

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Fix the accept path
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 10:57:21 +0000 (07:57 -0300)] 
[LLC]: Fix the accept path

Borrowing the structure of TCP/IP for this. On the receive of new connections I
was bh_lock_socking the _new_ sock, not the listening one, duh, now it survives
the ssh connections storm I've been using to test this specific bug.

Also fixes send side skb sock accounting.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Fix sparse warnings
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 08:14:33 +0000 (05:14 -0300)] 
[LLC]: Fix sparse warnings

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[SPARC64]: Remove unnecessary paging_init() cruft.
David S. Miller [Thu, 22 Sep 2005 08:08:57 +0000 (01:08 -0700)] 
[SPARC64]: Remove unnecessary paging_init() cruft.

Because we don't access the PAGE_OFFSET linear mappings
any longer before we take over the trap table from the
firmware, we don't need to load dummy mappings there
into the TLB and we don't need the bootmap_base hack
any longer either.

While we are here, check for a larger than 8MB kernel
and halt the boot with an error message.  We know that
doesn't work, so instead of failing mysteriously we
should let the user know exactly what's wrong.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TR]: Set correct frame type for SNAP packets
Jochen Friedrich [Thu, 22 Sep 2005 07:51:56 +0000 (04:51 -0300)] 
[TR]: Set correct frame type for SNAP packets

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Fix llc_fixup_skb() bug
Jochen Friedrich [Thu, 22 Sep 2005 07:48:46 +0000 (04:48 -0300)] 
[LLC]: Fix llc_fixup_skb() bug

llc_fixup_skb() had a bug dropping 3 bytes packets (like UA frames). Token ring
doesn't pad these frames.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Fix for Bugzilla ticket #5157
Jochen Friedrich [Thu, 22 Sep 2005 07:46:44 +0000 (04:46 -0300)] 
[LLC]: Fix for Bugzilla ticket #5157

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[SPARC64]: Do not allocate OBP page tables using bootmem
David S. Miller [Thu, 22 Sep 2005 07:45:41 +0000 (00:45 -0700)] 
[SPARC64]: Do not allocate OBP page tables using bootmem

Just allocate them physically starting from the end of
the kernel image.  This incredibly simplifies our MM
bootstrap in that we don't need any mappings in the linear
PAGE_OFFSET area working in order to bootstrap ourselves and
take over the trap table from the firmware.

Many further simplifications are possible now, and this also
sets the stage for CONFIG_DEBUG_PAGEALLOC support.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[LLC]: Fix for Bugzilla ticket #5156
Jochen Friedrich [Thu, 22 Sep 2005 07:44:55 +0000 (04:44 -0300)] 
[LLC]: Fix for Bugzilla ticket #5156

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Use refcounting with struct llc_sap
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 07:43:05 +0000 (04:43 -0300)] 
[LLC]: Use refcounting with struct llc_sap

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Do better struct sock accounting on skbs
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 07:40:59 +0000 (04:40 -0300)] 
[LLC]: Do better struct sock accounting on skbs

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Use sk_wait_data
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 07:37:07 +0000 (04:37 -0300)] 
[LLC]: Use sk_wait_data

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Use some more likely/unlikely
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 07:32:10 +0000 (04:32 -0300)] 
[LLC]: Use some more likely/unlikely

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Add sysctl support for the LLC timeouts
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 07:30:44 +0000 (04:30 -0300)] 
[LLC]: Add sysctl support for the LLC timeouts

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Use the sk_wait_event primitive
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 07:26:14 +0000 (04:26 -0300)] 
[LLC]: Use the sk_wait_event primitive

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Convert llc_ui_wait_for_ functions to use prepare_to_wait/finish_wait
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 07:22:39 +0000 (04:22 -0300)] 
[LLC]: Convert llc_ui_wait_for_ functions to use prepare_to_wait/finish_wait

And make it look more like the similar routines in the TCP/IP source code.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Remove unused functions from llc_c_ev.c
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 07:19:52 +0000 (04:19 -0300)] 
[LLC]: Remove unused functions from llc_c_ev.c

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[SPARC64]: Break up inherit_prom_mappings() into it's constituent parts.
David S. Miller [Thu, 22 Sep 2005 07:12:35 +0000 (00:12 -0700)] 
[SPARC64]: Break up inherit_prom_mappings() into it's constituent parts.

This thing was just a huge monolithic mess, so chop it up.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[LLC]: Use const in llc_c_ev.c
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 07:09:45 +0000 (04:09 -0300)] 
[LLC]: Use const in llc_c_ev.c

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Help the compiler with likely/unlikely, saving some more bytes
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 06:59:22 +0000 (03:59 -0300)] 
[LLC]: Help the compiler with likely/unlikely, saving some more bytes

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Mark llc_find_next_offset as __init, saving some more bytes
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 06:57:55 +0000 (03:57 -0300)] 
[LLC]: Mark llc_find_next_offset as __init, saving some more bytes

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Update comments for llc_ui_bind and llc_ui_autobind to match new behaviour
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 06:56:26 +0000 (03:56 -0300)] 
[LLC]: Update comments for llc_ui_bind and llc_ui_autobind to match new behaviour

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Remove unneeded temp net_device variables
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 06:53:35 +0000 (03:53 -0300)] 
[LLC]: Remove unneeded temp net_device variables

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: introduce llc_conn_tmr_common_cb, to avoid code duplication
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 06:50:15 +0000 (03:50 -0300)] 
[LLC]: introduce llc_conn_tmr_common_cb, to avoid code duplication

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Remove unneeded f_bit variables
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 06:44:23 +0000 (03:44 -0300)] 
[LLC]: Remove unneeded f_bit variables

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Simplify llc_c_ac code, removing unneeded assignments to variables
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 06:38:15 +0000 (03:38 -0300)] 
[LLC]: Simplify llc_c_ac code, removing unneeded assignments to variables

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[LLC]: Make llc_frame_alloc take a net_device as an argument
Arnaldo Carvalho de Melo [Thu, 22 Sep 2005 06:27:56 +0000 (03:27 -0300)] 
[LLC]: Make llc_frame_alloc take a net_device as an argument

So as to set the newly created sk_buff ->dev member with it, that way we stop
using dev_base->next, that is the wrong thing to do, as there may well be
several interfaces being used with LLC. This was not such a big problem after
all as most of the users of llc_alloc_frame were setting the correct dev, but
this way code is reduced.

This also fixes another bug in llc_station_ac_send_null_dsap_xid_c, that was
not setting the skb->dev field.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
19 years ago[SPARC64]: Do not allocate prom translations using bootmem.
David S. Miller [Thu, 22 Sep 2005 05:31:13 +0000 (22:31 -0700)] 
[SPARC64]: Do not allocate prom translations using bootmem.

Use __initdata instead.

Signed-off-by: David S. Miller <davem@davemloft.net>