Commit Graph

5748 Commits (aeb3f76350e78aba90653b563de6677b442d21d6)

Author SHA1 Message Date
Michael Krufky aeb3f76350 [PATCH] DVB: lgdt330x frontend: some bug fixes & add lgdt3303 support
This patch removes the tda9887 stuff from lgdt330x.c.  It's experimental code
which wasn't supposed to leak out and we don't want it in 2.6.13.

Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Acked-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-09 17:59:52 -07:00
Michael Krufky e179d8b055 [PATCH] dvb: lgdt330x frontend: trivial text cleanups
Two trivial text changes in Kconfig and lgdt330x.c

Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-09 17:59:52 -07:00
Markus Lidel dc9352a42c [PATCH] I2O: added pci_request_regions() before using the controller
Added pci_request_regions() before using the controller to avoid duplicate
usage of the I2O controller when the dpt_i2o driver and I2O subsystem is
loaded at the same time.

Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-09 17:59:52 -07:00
Linus Torvalds a7df26da15 Merge master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6 2005-08-09 16:03:19 -07:00
Linus Torvalds 68e681e87f Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2005-08-09 16:02:15 -07:00
Linus Torvalds 25f1305365 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2005-08-09 16:00:05 -07:00
Andrew Morton d64d387372 [NET]: Fix memory leak in sys_{send,recv}msg() w/compat
From: Dave Johnson <djohnson+linux-kernel@sw.starentnetworks.com>

sendmsg()/recvmsg() syscalls from o32/n32 apps to a 64bit kernel will
cause a kernel memory leak if iov_len > UIO_FASTIOV for each syscall!

This is because both sys_sendmsg() and verify_compat_iovec() kmalloc a
new iovec structure.  Only the one from sys_sendmsg() is free'ed.

I wrote a simple test program to confirm this after identifying the
problem:

http://davej.org/programs/testsendmsg.c

Note that the below fix will break solaris_sendmsg()/solaris_recvmsg() as
it also calls verify_compat_iovec() but expects it to malloc internally.

[ I fixed that. -DaveM ]

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-09 15:29:19 -07:00
David S. Miller 3501466941 [SUNRPC]: Fix nsec --> usec conversion.
We need to divide, not multiply.  While we're here,
use NSEC_PER_USEC instead of a magic constant.

Based upon a report from Josip Loncaric and a patch
by Andrew Morton.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-09 14:57:12 -07:00
David S. Miller 38c1844b31 [SPARC]: envctrl: ERR_PTR() --> PTR_ERR()
Fix thinko in Christoph's changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-09 14:43:14 -07:00
Christoph Hellwig 4875ccdb30 [SPARC]: remove ifdef CONFIG_PCI from envctrl.c
The driver already depends on CONFIG_PCI in Kconfig.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-09 14:39:10 -07:00
Christoph Hellwig bc2406684b [SPARC]: Use kthread infrastructure in bbc_envctrl
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-09 13:32:25 -07:00
Christoph Hellwig 218b29e0c3 [SPARC]: Use kthread infrastructure in envctrl
envctrl currently uses very odd ways to stop a thread, using various
things that should be exposed to drivers at all.

This patch (which is untested as I don't have sparc hardware) switches
it to use the proper kthread infrastructure.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-09 12:30:07 -07:00
Markus Lidel db29e85a7e [PATCH] i2o: remove new configuration API
Remove new configuration API from i2o_config

The API-patch is still available from the I2O website (which is mentioned in
the kernel config now).  It is removed because it creates a new binary
sysfs-attribute, which doesn't have the limitiation of 4k.  Expect for the
Adaptec controllers, which has a limitation in the hardware this attribute
doesn't make sense anywhere else.  Until the sysfs API provides an attribute
which doesn't buffer (like firmware) and let access to at least 64k blocks i
provide a separate patch...

(akpm: basically, this API was introduced post-2.6.12 and Markus wants to pull
it out before 2.6.13).

Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-09 12:08:22 -07:00
Kumar Gala 36d2f5a182 [PATCH] cpm_uart: needs some love to compile with GCC4.0.1
Fixed problems so we can build with gcc-4.0.1

Signed-off-by: Peter Schaefer-Hutter <peter.schaefer-hutter@tfk-racoms.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-09 12:08:22 -07:00
Kumar Gala 311c46273f [PATCH] cpm_uart: Fix dpram allocation and non-console uarts
* Makes dpram allocations work
* Makes non-console UART work on both 8xx and 82xx
* Fixed whitespace in files that were touched

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Pantelis Antoniou <panto@intracom.gr>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-09 12:08:22 -07:00
Paul Jackson 3077a260e9 [PATCH] cpuset release ABBA deadlock fix
Fix possible cpuset_sem ABBA deadlock if 'notify_on_release' set.

For a particular usage pattern, creating and destroying cpusets fairly
frequently using notify_on_release, on a very large system, this deadlock
can be seen every few days.  If you are not using the cpuset
notify_on_release feature, you will never see this deadlock.

The existing code, on task exit (or cpuset deletion) did:

  get cpuset_sem
  if cpuset marked notify_on_release and is ready to release:
    compute cpuset path relative to /dev/cpuset mount point
    call_usermodehelper() forks /sbin/cpuset_release_agent with path
  drop cpuset_sem

Unfortunately, the fork in call_usermodehelper can allocate memory, and
allocating memory can require cpuset_sem, if the mems_generation values
changed in the interim.  This results in an ABBA deadlock, trying to obtain
cpuset_sem when it is already held by the current task.

To fix this, I put the cpuset path (which must be computed while holding
cpuset_sem) in a temporary buffer, to be used in the call_usermodehelper
call of /sbin/cpuset_release_agent only _after_ dropping cpuset_sem.

So the new logic is:

  get cpuset_sem
  if cpuset marked notify_on_release and is ready to release:
    compute cpuset path relative to /dev/cpuset mount point
    stash path in kmalloc'd buffer
  drop cpuset_sem
  call_usermodehelper() forks /sbin/cpuset_release_agent with path
  free path

The sharp eyed reader might notice that this patch does not contain any
calls to kmalloc.  The existing code in the check_for_release() routine was
already kmalloc'ing a buffer to hold the cpuset path.  In the old code, it
just held the buffer for a few lines, over the cpuset_release_agent() call
that in turn invoked call_usermodehelper().  In the new code, with the
application of this patch, it returns that buffer via the new char
**ppathbuf parameter, for later use and freeing in cpuset_release_agent(),
which is called after cpuset_sem is dropped.  Whereas the old code has just
one call to cpuset_release_agent(), right in the check_for_release()
routine, the new code has three calls to cpuset_release_agent(), from the
various places that a cpuset can be released.

This patch has been build and booted on SN2, and passed a stress test that
previously hit the deadlock within a few seconds.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-09 12:08:22 -07:00
Ralf Baechle a242b44da6 [PATCH] Build fix for the Sibyte I2C driver
Compile fix for the BCM1250 I2C driver.

Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-09 12:08:21 -07:00
Wim Van Sebroeck 01df0e3a79 [PATCH] i8xx_tco.c: arm watchdog only when started
i8xx_tco.c v0.08: only "arm" the watchdog when the watchdog has been
started.  (Kernel Bug 4251: system reset when battery is read and i8xx_tco
driver loaded)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-09 12:08:21 -07:00
John McCutchan 00dd1e4339 [PATCH] fsnotify-cleanups
This removes the now unused fsnotify_unlink & fsnotify_rmdir code.
Compile tested.

Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-08 19:22:42 -07:00
Linus Torvalds dc836b5b6f Revert "[PATCH] PCI: restore BAR values..."
Revert commit fec59a711e, which is
breaking sparc64 that doesn't have a working pci_update_resource.

We'll re-do this after 2.6.13 when we'll do it all properly.
2005-08-08 18:46:09 -07:00
Dave Jones 138b9dd1fd [PATCH] icn driver fails to unload when no hardware present
Fix a null dereference in module unload path.

Found by a simple modprobe icn ; rmmod icn

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-08 16:21:32 -07:00
Linus Torvalds 92e52b2e82 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2005-08-08 16:06:01 -07:00
Ken Chen fb573856b2 [IA64] fix nohalt boot option
this changeset broke the "nohalt" kernel boot option.
  8df5a500a3

default_idle() is looking at new variable can_do_pal_halt.  However,
that variable did not get cleared upon "nohalt" boot option.  Result
is that "nohalt" option is ignored until perfmon is exercised.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-08-08 15:39:47 -07:00
Olaf Hering 03c6b749b3 [PATCH] x86_64: add MODULE_ALIAS for aes
modprobe aes does not work on x86_64.  i386 has a similar line, this could
be the right fix.  Would be nice to have in 2.6.13 final.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-08 15:29:13 -07:00
Kumar Gala 5e708484d7 [PATCH] ppc32: Fix MPC834x USB memory map offsets
The memory mappings for MPC8349 USB MPH and DR modules were reversed.

Signed-off-by: Li Yang <LeoLi@freescale.com>
Signed-off-by: Jiang Bo <Tanya.jiang@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-08 15:29:13 -07:00
Heikki Orsila ca9334523c [IPV4]: Debug cleanup
Here's a small patch to cleanup NETDEBUG() use in net/ipv4/ for Linux 
kernel 2.6.13-rc5. Also weird use of indentation is changed in some
places.

Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-08 14:26:52 -07:00
David S. Miller 4d479e40e1 [NETLINK]: Allocate and kill some netlink numbers.
NETLINK_ARPD is unused, allocate it to the Open-iSCSI folks.

NETLINK_ROUTE6 and NETLINK_TAPBASE are no longer used, delete
them.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-08 13:48:02 -07:00
Linus Torvalds b612cacb02 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-08-08 12:19:24 -07:00
John McCutchan 7a91bf7f5c [PATCH] fsnotify_name/inoderemove
The patch below unhooks fsnotify from vfs_unlink & vfs_rmdir.  It
introduces two new fsnotify calls, that are hooked in at the dcache
level.  This not only more closely matches how the VFS layer works, it
also avoids the problem with locking and inode lifetimes.

The two functions are

 - fsnotify_nameremove -- called when a directory entry is going away.
   It notifies the PARENT of the deletion.  This is called from
   d_delete().

 - inoderemove -- called when the files inode itself is going away.  It
   notifies the inode that is being deleted.  This is called from
   dentry_iput().

Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-08 11:53:47 -07:00
Michael Krufky 1963c907b2 [PATCH] dvb: lgdt330x frontend: some bug fixes & add lgdt3303 support
- Structural changes within lgdt330x driver, framework now supports
  both chips... tested OK on lgdt3302 and lgdt3303.
- Add LG/TUA6034 dvb_pll_desc for ATSC with LG TDVS-H062F & DViCO FusionHDTV5.
- Fixed LGDT330X signal strength: For now, always set it to 0.
- Corrected LGDT330X boundary condition error in read_snr: dB calculation.

Signed-off-by: Mac Michaels <wmichaels1@earthlink.net>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-08 11:49:57 -07:00
Cornelia Huck 66aea23ff8 [PATCH] s390: use klist in qeth driver
From: Martin Schwidesky <schwidefsky@de.ibm.com>

Convert qeth to the new klist interface and make it compiling again.

Signed-off-by: Frank Pavlic <pavlic@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-08 11:49:57 -07:00
Harald Welte 8b83bc77bf [PATCH] don't try to do any NAT on untracked connections
With the introduction of 'rustynat' in 2.6.11, the old tricks of preventing
NAT of 'untracked' connections (e.g. NOTRACK target in 'raw' table) are no
longer sufficient.

The ip_conntrack_untracked.status |= IPS_NAT_DONE_MASK effectively
prevents iteration of the 'nat' table, but doesn't prevent nat_packet()
to be executed.  Since nr_manips is gone in 'rustynat', nat_packet() now
implicitly thinks that it has to do NAT on the packet.

This patch fixes that problem by explicitly checking for
ip_conntrack_untracked in ip_nat_fn().

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-08 11:48:28 -07:00
James Morris 48de5beeb0 [PATCH] Update contact info for James Morris 2005-08-08 11:46:25 -07:00
Ivan Kokshaysky 6d85f29bb5 [PATCH] VIA VT8235 PCI quirk
Like many other southbridges from different manufacturers, VIA VT8235
chip has two non-standard BARs for power management and SMBus registers
(see the datasheet at http://www.via.com.tw).

This new quirk routine fixes boot problem with 2.6.13-rc2/rc6 kernels on
Targa Visionary 811 Athlon64 laptop, as reported by Mikael Pettersson
<mikpe@csd.uu.se>.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-08 11:46:24 -07:00
Antonino Daplas db6778db7e [PATCH] nvidiafb: Fix initial display corruption on certain laptops
Reported by:Vincent Fortier (Bugzilla Bug 4768)

"At boot time the screen appears moved to the mid right portion of the actual
video pannel making the end of the line appears at the left edge...  It simply
looks like moved half way to the right"

His particular hardware has a display with an unusual dimension (1920x1200) but
unfortunately has no EDID block. None of the entries in the global mode
database is correct for this particular display, and it particularly has
difficulty scaling up 640x480 (the default startup mode of nvidiafb) to
1920x1200 which causes the above described problem.

1, Add 1920x1200 to the global mode database.

2. Let nvidiafb base the startup mode from the flatpanel dimensions only if the
  EDID block is absent, no boot mode parameter is specified by the user, and
  a flatpanel/LCD display is attached.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-08 11:46:24 -07:00
Paul Mackerras 0f0767c67a [PATCH] ppc64: update defconfigs
Update the default/example configs for ppc64.  Pretty boring...

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-08 11:46:24 -07:00
Arnd Bergmann 2c875bbda9 [PATCH] ppc64: add default config for BPA
This adds a bpa_defconfig file and make target. The config settings
are made for the current version of the Cell Processor Based Blade,
so there are not too many drivers enabled. A few more drivers might
get added in the future though.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-08 11:46:24 -07:00
Linus Torvalds 6fc32179de Linux 2.6.13-rc6
Last (?) -rc, partly brought on by the aic7xxx performance fixes (ie get
them tested in an -rc release before the real 2.6.13).
2005-08-07 11:18:56 -07:00
Dominik Hackl cfc646fa84 [PATCH] crc32.c typo fix
This patch fixes a typo in lib/crc32.c which results in incorrect debug
output.

Signed-off-by: Dominik Hackl <dominik@hackl.dhs.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-07 10:00:40 -07:00
Ravikiran G Thirumalai 4b0271eb9d [PATCH] Move the fix to align node_end_pfns to a proper location
Move the fix to align node_end_pfns to a proper location.  The earlier fix
made the node_remap_start_vaddr to get misaligned causing remap_numa_kva to
barf again :-/

Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-07 10:00:39 -07:00
Marcelo Tosatti 079da354db [PATCH] ppc32: 8xx commproc avoid direct pte manipulation, use dma coherent API instead
Touching the pte directly causes the 8Mbyte TLB entry to be invalidated.

This has been fixed in v2.4 for ages.

Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-07 10:00:39 -07:00
Aristeu Sergio Rozanski Filho 204085c52a [PATCH] ppc32: 8xx kill unused variable in commproc
8xx: commproc.c: kill unused variable

Signed-off-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-07 10:00:39 -07:00
Aristeu Sergio Rozanski Filho ff085c1cc2 [PATCH] ppc32: 8xx restrict ENET_BIG_BUFFERS option
8xx: restrict ENET_BIG_BUFFERS option to drivers which actually use it

Signed-off-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-07 10:00:39 -07:00
Aristeu Sergio Rozanski Filho b7f08aabb1 [PATCH] ppc32: 8xx fix CPM ethernet description
8xx: fix CPM Ethernet description

Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-07 10:00:39 -07:00
Aristeu Sergio Rozanski Filho fbccb3d7f5 [PATCH] ppc32: 8xx: fec: fix interrupt handler prototypes
8xx: fec: fix interrupt handler prototypes

Signed-off-by: Aristeu Sergio Rozanski Filho <aris@conectiva.com.br>
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-07 10:00:39 -07:00
Aristeu Sergio Rozanski Filho fc007ddd60 [PATCH] ppc32: 8xx: using dma_alloc_coherent() instead consistent_alloc()
8xx: using dma_alloc_coherent() instead consistent_alloc()

Signed-off-by: Aristeu Sergio Rozanski Filho <aris@conectiva.com.br>
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-07 10:00:39 -07:00
Aristeu Sergio Rozanski Filho 8b0ed2fbdb [PATCH] ppc32: 8xx: convert fec driver to use work_struct
8xx: convert fec driver to use work_struct

Signed-off-by: Aristeu Sergio Rozanski Filho <aris@conectiva.com.br>
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-07 10:00:38 -07:00
Miklos Szeredi 68b47139ea [PATCH] namespace.c: fix bind mount from foreign namespace
I'm resending this patch, because I still believe it's the correct fix.

Tested before/after applying the patch with a test application
available from:

  http://www.inf.bme.hu/~mszeredi/nstest.c

Bind mount from a foreign namespace results in an un-removable mount.
The reason is that mnt->mnt_namespace is copied from the old mount in
clone_mnt().  Because of this check_mnt() in sys_umount() will fail.

The solution is to set mnt->mnt_namespace to current->namespace in
clone_mnt().  clone_mnt() is either called from do_loopback() or
copy_tree().  copy_tree() is called from do_loopback() or
copy_namespace().

When called (directly or indirectly) from do_loopback(), always
current->namspace is being modified: check_mnt(nd->mnt).  So setting
mnt->mnt_namespace to current->namspace is the right thing to do.

When called from copy_namespace(), the setting of mnt_namespace is
irrelevant, since mnt_namespace is reset later in that function for
all copied mounts.

Jamie said:

  This patch is correct.  The old code was buggy for more fundamental and
  serious reason: it broke the invariant that a tree of vfsmnts all have the
  same value of mnt_namespace (and the same for the mnt_list list).

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Acked-by: Jamie Lokier <jamie@shareable.org>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-07 10:00:38 -07:00
Olaf Hering 9ae5b3c703 [PATCH] remove linux/pagemap.h from linux/swap.h
sparc can not include linux/pagemap.h because of the following circular
dependency:

asm-sparc/pgtable include linux/swap.h
linux/swap.h include now linux/pagemap.h
linux/pagemap.h include linux/mm.h
linux/mm.h include asm/pgtable.h

It needs to have the swp_entry_t type fully visible in pgtable.h,
we can't work around this using macros.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: William Lee Irwin III <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-07 10:00:38 -07:00
Tom Duffy 46bdac9938 [PATCH] visws: linkage fix
This patch add stubs to allow the visws subarch to link again.

Signed-off-by: Tom Duffy <thomas.duffy.99@alumni.brown.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-07 10:00:38 -07:00