22 Sep, 2005
38 commits
-
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 ;cardctl eject; rmmod .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
Signed-off-by: Andrew Morton
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Linus Torvalds -
vlan_hwaccel_rx should be used when in interrupt context.
Fixes bug http://bugzilla.kernel.org/show_bug.cgi?id=5284
Signed-off-by: Tommy S. Christensen
Cc: Francois Romieu
Cc: Jeff Garzik
Signed-off-by: Andrew Morton
Signed-off-by: Jeff Garzik -
Cleanup receive buffer allocation and management,
Add more error handling checks from PHY and bump version.
Signed-off-by: Jeff Garzik -
Expand the returned data for ethtool debug access to include
all of the mapped PCI area; except for the small set of registers
that are for diagnostic RAM access. Access to those registers
will hang the system.Signed-off-by: Stephen Hemminger
Signed-off-by: Jeff Garzik -
Fix bond_enslave link monitoring warning to check use_carrier status
and ethtool_ops in addition to do_ioctl. This version checks ethtool_ops
as well as do_ioctl, and also uses the per-bond params.use_carrier
instead of the global use_carrier.Signed-off-by: Jason R. Martin
Signed-off-by: Jeff Garzik -
The header declaring this function wasn't included, so the function declaration
was totally bogus wrt. the proto - even if this wasn't going to fail at all.It was so bad that the compile warning I got was "control reaches end of
non-void function", i.e. missing return. Actually, this has been there for ages,
the consolidation patch just added the warning which was needed to clean it up.
Nice. Really.Cc: Allan Graves
Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Signed-off-by: Linus Torvalds -
Explain why the casting we do to silence this warning is indeed safe.
It is because the field we're casting from, though being 64-bit wide, was filled
with a pointer in first place by ourselves.Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Signed-off-by: Linus Torvalds -
Readd this header (deleted in 60d339f6fe0831060600c62418b71a62ad26c281). A
warning is spit out here about undeclared getpgrp().Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Signed-off-by: Linus Torvalds -
Even if with a bit of misunderstanding, Al fixed this in commit
95608261dae863bc43292e6fbd946a3abd3aa49f.Well, the symbol was intended to come from userspace (it exists there on normal
host), but since some hosts may miss that, using the kernel one is just as fine.
However, rename it to be named consistently with the rest.Actually, he missed converting ELFCLASS32 to coming from kernel headers. For
consistence, add ELFCLASS64 too.Cc: Al Viro
Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Signed-off-by: Linus Torvalds -
gcc is now complaining during link on some hosts - fix it as for other things.
Reported by Antoine Martin .Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Signed-off-by: Linus Torvalds -
Translate uname output taken from the host if needed.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Signed-off-by: Linus Torvalds -
I am a lamer :-(. Luckily, Luo Xin performed LTP testing and found this failure.
Btw, the fact that the patch in which I introduced this was merged shows that:a) I'm really trusted by people
b) sometimes they're wrong about point a).
c) lack of time for reviewers.CC: Luo Xin
Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Signed-off-by: Linus Torvalds -
When removing verify_area, verify_area_{tt,skas} were forgotten.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Signed-off-by: Linus Torvalds -
As recently done by Russell King for ARM, commit
4732efbeb997189d9f9b04708dc26bf8613ed721 introduces a generic asm/futex.h copied
along most arches, which includes a "-ENOSYS support" to be changed if needed.
However, it includes an unused var (taken from the "real" version) which GCC
warns about.Remove it from all arches having that file version (i.e. same GIT id).
$ git-diff-tree -r HEAD
and
$ git-ls-tree -r HEAD include/|grep 9feff4ce1424bc390608326240be369eb13aa648may be more interesting than looking at the patch itself, to make sure I've
just copied the arm header to all other archs having the original dummy version
of this file.Cc: Jakub Jelinek
Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Signed-off-by: Linus Torvalds -
Follow up to 4732efbeb997189d9f9b04708dc26bf8613ed721 - uml must just reuse
as-is the backing architecture support. There is a micro-fixup is needed for the
included file, which won't affect i386 behaviour at all.I've not tested compilation on x86_64, only on x86, but the code is almost the
same except the culprit test, so everything should be ok on x86_64 too.Cc: Jakub Jelinek
Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Signed-off-by: Linus Torvalds -
Patch from Catalin Marinas
This patch prevents the "noreturn function does return" warning in the
__bug() function in arch/arm/kernel/traps.cSigned-off-by: Catalin Marinas
Signed-off-by: Russell King -
Based on simplification idea from Sean Hefty
Signed-off-by: Hal Rosenstock
Signed-off-by: Roland Dreier -
Clean up code by using enums instead of hard-coded magic numbers.
Signed-off-by: Sean Hefty
Signed-off-by: Roland Dreier -
During a forensic analysis on the fat file system, I found than the result for
the last access date on this file system was different between the stat
command and the istat command (package tct-utils).The istat command display a true date (the right windows date) but the stat
primitive (so stat, find, ls command) displays a wrong date.Signed-off-by: OGAWA Hirofumi
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Correct URL for HPET spec.
Signed-off-by: Randy Dunlap
Cc: Andi Kleen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Eric Dumazet
Cc: Andi Kleen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add MAINTAINER record for Andrew ;-)
Signed-off-by: Stephen Hemminger
Cc: Jeff Garzik
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
__FUNCTION__ is the prefered kernel idiom, __func__ is not supported by gcc
2.95 (we actually map __FUNCTION__ to __func__ for more recent compilers,
but it should never be used directly)Signed-off-by: Christoph Hellwig
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Hugh made me note this line for permission checking in mprotect():
if ((newflags & ~(newflags >> 4)) & 0xf) {
after figuring out what's that about, I decided it's nasty enough. Btw
Hugh itself didn't like the 0xf.We can safely change it to VM_READ|VM_WRITE|VM_EXEC because we never change
VM_SHARED, so no need to check that.Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Acked-by: Hugh Dickins
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Update comment for the 2.6.6-rc1 conversion from page->list and
address_space->{clean,dirty,locked}_pages to radix tree tagging and ->lru.I've mostly avoided to mention page lists (at least I've shortened the
comment).Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Acked-by: Hugh Dickins
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We have no options which the user can set in the Makefile. Only the
EXTRAVERSION, which is also useful in place of the "backup modules"
suggestion.We don't have configuration options in the top Makefile.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
That comment is plain wrong (we even take the pagetable lock inside
unmap_region()).Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Acked-by: Hugh Dickins
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We currently unregister the config-osm driver if initialization of the
legacy ioctl() handlers failed but still return success. We should be
returning -EBUSY in this case.Signed-off-by: Deepak Saxena
Cc: Markus Lidel
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
zImage.vmode was recently added. It's a version of zImage in which the ELF
note section used by open firmware indicates that it requires a virtual
mode instance of OF instead of real mode. This allows it to work with
Apple OF, and thus is directly bootable (or netbootable) from OF command
line. (Unfortunately, pSeries OF sort-of requires real mode and Apple OF
sort-of requires virtual mode, and both tend to be unhappy if no notes
section specifies the mode at all).However, we forgot to add zImage.vmode to the default G5 build. This
fixes it.Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This function was removed a while ago, but crept in again via a recent
scsi merge.Signed-off-by: Christoph Hellwig
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The new version of the flattened device tree passes the boot cpuid in the
header instead of via a linux,boot-cpu property.We need to update the in kernel OF parsing code to do this, otherwise
machines with a non zero boot cpuid fail to come up.Signed-off-by: Anton Blanchard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch fixes the problem Bjorn reported. The busy_initializing flag
should have cleared before going into the for loop.Signed-off-by: Mike Miller
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Some RS64 systems (such as F80) have non-python host bridges with EADS.
However, they have two EADS with 4 buses each under them, so the old logic
that assumed no more than 7 busses per PHB failed miserably.Big thanks to Olaf Hering for helping me test this, he's got one of the few
machines that broke from the previous logic.Also, to be a bit smarter at detecting the need for a PHB-level IOMMU table
by checking for the presence of an ISA bus. Only PHBs with ISA bridges
should need the PHB-level table.Signed-off-by: Olof Johansson
Cc: Anton Blanchard
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
ia64's sched_clock() accesses per-cpu data which isn't set up at boot time.
Hence ia64 cannot use printk timestamping, because printk() will crash in
sched_clock().So make printk() use printk_clock(), defaulting to sched_clock(), overrideable
by the architecture via attribute(weak).Cc: "Luck, Tony"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When the main thread of a thread group has done pthread_exit() and died,
the other threads are still happily running, but will not be visible
under /proc because their leader is no longer accessible.This fixes the access control so that we can see the sub-threads again.
Signed-off-by: Sripathi Kodi
Acked-by: Al Viro
Signed-off-by: Linus Torvalds -
My code to set up the PCI tree from the Open Firmware device tree was
setting IORESOURCE_* flags on the resources for the devices, but not
the PCI_BASE_ADDRESS_* flags. This meant that some drivers
misbehaved, and /proc/pci showed the wrong types for the resources.
This fixes it.Signed-off-by: Paul Mackerras
Signed-off-by: Linus Torvalds
21 Sep, 2005
2 commits