Andrew Morton [Tue, 20 Jan 2004 11:17:40 +0000 (03:17 -0800)]
[PATCH] do not use shared extable code for ia64
From: Jes Sorensen <jes@trained-monkey.org>
The new sort_extable and shared search_extable code doesn't work on ia64.
I have introduced two new #defines that archs can define to avoid the
common code being built. ARCH_HAS_SEARCH_EXTABLE and
ARCH_HAS_SORT_EXTABLE.
Andrew Morton [Tue, 20 Jan 2004 11:17:23 +0000 (03:17 -0800)]
[PATCH] NFS/RPC modprobe -r sunrpc causes an oops
From: Steve Dickson <SteveD@redhat.com>
Here is a patch for the 2.6.1 kernel that fixes an oops that occurs when
the sunrpc module is unloaded.
The problem was the RPC cache_register() call was not saving entry pointers
to the procfs entries it was creating. So when it came time to dismantle
the entires, a BUG_ON() was tripped in remove_proc_entry() since the tree
was not broken down completely.
Andrew Morton [Tue, 20 Jan 2004 11:17:05 +0000 (03:17 -0800)]
[PATCH] dquot: fix i_blocks accounting and locking
From: Jan Kara <jack@ucw.cz>
A patch which fixes a problem that i_blocks are not updated for quota files
(when quota turned on) in 2.6.1. The patch also fixes possible unlock of
not locked spin_lock.
Andrew Morton [Tue, 20 Jan 2004 11:16:29 +0000 (03:16 -0800)]
[PATCH] reiserfs: cleanup_bitmap_list() check for NULL argument.
From: Nikita Danilov <Nikita@Namesys.COM>
fs/reiserfs/journal.c:cleanup_bitmap_list() can be called to cleanup
reiserfs_list_bitmap that was only partly initialized. Check that
jb->bitmaps array was actually allocated, before trying to free its
elements.
Andrew Morton [Tue, 20 Jan 2004 11:16:20 +0000 (03:16 -0800)]
[PATCH] exception table search fix
The exception table search code currently fails if addresses differ by more
than 2G. This is only a problem when using the 4g/4g address space split,
but it's more robust this way.
Also, shuffle the comparison order n there so the least likely case comes
last.
Andrew Morton [Tue, 20 Jan 2004 11:16:11 +0000 (03:16 -0800)]
[PATCH] ext3: update a_ops when running `chattr +j'
From: Jan Kara <jack@suse.cz>
Journalled-data files need a different set of address_space_operations, so
we need to update the file's aops when someone runs `chattr +j' on the
file.
Andrew Morton [Tue, 20 Jan 2004 11:15:18 +0000 (03:15 -0800)]
[PATCH] md: fixes for !CONFIG_PROCFS
From: "Randy.Dunlap" <rddunlap@osdl.org>
From: Luiz Fernando Capitulino <lcapitulino@prefeitura.sp.gov.br>
It fixes these warnings when !CONFIG_PROC_FS:
drivers/md/md.c: In function `md_geninit':
drivers/md/md.c:3481: warning: unused variable `p'
drivers/md/md.c: At top level:
drivers/md/md.c:3007: warning: `md_seq_fops' defined but not used
Andrew Morton [Tue, 20 Jan 2004 11:14:23 +0000 (03:14 -0800)]
[PATCH] dvb: update core
From: Michael Hunold <hunold@linuxtv.org>
- demux: fix nasty bug where setting multiple filters resulted in ts
packet duplication
- frontend: merge frontend improvements from 2.4 DVB tree:
- schedule_timeout(1) in dvb_frontend.c after setting frontend and
before waking up frontend thread
- do FE_RESET in each iteration of frontend thread if !FE_HAS_LOCK
- use aquire_signal flag to call FE_RESET only after tuning until
FE_HAS_LOCK has been signalled, and not when FE_HAS_LOCK drops out for
short periods of time later
Andrew Morton [Tue, 20 Jan 2004 11:13:56 +0000 (03:13 -0800)]
[PATCH] pc300_tty.c is broken
From: Russell King <rmk+lkml@arm.linux.org.uk>
Russell was unable to correctly migrate this driver to the new
modem-control-signal API because
TIOCMBIS/TIOCMBIC do not control only the DTR signal, but also the RTS,
OUT1 and OUT2 signals, or even maybe nothing at all. Plus, these IOCTLs
are no longer passed down to the driver. Instead, drivers should
implement tiocmget and tiocmset driver methods.
so mark it as broken so as to not break allmodconfig/allyesconfig.
Andrew Morton [Tue, 20 Jan 2004 11:13:47 +0000 (03:13 -0800)]
[PATCH] sendfile calls lock_verify_area with wrong parameters
From: Manfred Spraul <manfred@colorfullife.com>
sendfile supports reading from a given start offset for in_file, like
pread. But for the locks_verify_area call, in_file->f_pos is always used,
even if a start offset is used. Result: wrong area is checked for
mandatory locks.
Andrew Morton [Tue, 20 Jan 2004 11:13:29 +0000 (03:13 -0800)]
[PATCH] Default hooks protecting the XATTR_SECURITY_PREFIX namespace
From: Chris Wright <chrisw@osdl.org>
Add default hooks for both the dummy and capability code to protect the
XATTR_SECURITY_PREFIX namespace. These EAs were fully accessible to
unauthorized users, so a user that rebooted from an SELinux kernel to a
default kernel would leave those critical EAs unprotected.
Andrew Morton [Tue, 20 Jan 2004 11:12:44 +0000 (03:12 -0800)]
[PATCH] md: Small fixes for timely writing of md superblocks.
From: NeilBrown <neilb@cse.unsw.edu.au>
Currently a raid0 superblock is only written when the array is stopped, so a
crash between creation and stop can lose your data.
This patch marks a superblock 'dirty' at creation and forces a dirty
superblock to be written when the array is started.
Previously we would prod the per-array thread at this point, but as it avoids
certain chores when the array is locked, and the array is locked at this
point, that isn't guaranteed to do the right thing. Instead we prod the
thread whenever the array is unlocked.
Finally, only write the superblock at array stop if it is needed to mark the
array as 'clean'. raid0 which is never dirty, doesn't need this.
Andrew Morton [Tue, 20 Jan 2004 11:12:27 +0000 (03:12 -0800)]
[PATCH] md: Make sure md recovery happens appropriately.
From: NeilBrown <neilb@cse.unsw.edu.au>
Currently if there are two failed drives, and two spares are added, then
recovery starts onto the first spare, but never notices the second spare. To
cope, we set RECOVERY_NEEDED when recovery finishes so that we re-check.
Andrew Morton [Tue, 20 Jan 2004 11:12:09 +0000 (03:12 -0800)]
[PATCH] md: Make sure an interrupted resync doesn't seem to have completed.
From: NeilBrown <neilb@cse.unsw.edu.au>
If the raid1 or raid5 thread gets to run md_check_recovery after the recovery
thread has been interupted, but before do_md_stop completes, a spare drive
can be incorporated into an array befure it is up-to-date.
raid5 rebuild takes stripes so agressively that other access cannot get a
look-in.
With this patch, the rebuild pauses slightly if there is a shortage of
stripes to let other processes have a chance.
akpm: I was worried about starvation due to the harsh semantics of yield() in
2.6. But Neil has performed specific testing for that and things seem OK.
If people do note CPU starvation problems we will need to replace the yield()
with a schedule_timeout(1).
Andrew Morton [Tue, 20 Jan 2004 11:11:51 +0000 (03:11 -0800)]
[PATCH] md: fix return code in set_disk_faulty()
From: NeilBrown <neilb@cse.unsw.edu.au>
Following are 10 patches for md in 2.6.1-lastest.
1-6 are simple bugfixes that I am confident should be in 2.6.2.
7 is a bugfix that is fairly important, but could probably do with a
bit more testing first. It is not impossible that it could deadlock,
though I think I have caught and fixed all the problems.
8-10 are code simplication.
So maybe 7-10 should only go in -mm for now, but if it is a while
before 2.6.2, then maybe they can go in a 2.6.2-pre.
From: Mike Tran <mhtran@us.ibm.com>
If cannot find the device, return error (ENODEV) Otherwise, return success
(0)
Andrew Morton [Tue, 20 Jan 2004 11:11:42 +0000 (03:11 -0800)]
[PATCH] check for truncated modules
From: Rusty Russell <rusty@rustcorp.com.au>
I *do* want to add a check for a truncated module, since that's probably
the most common case (^C on "make modules_install"). But I don't want to
double the size of module.c with every check I can think of.
Andrew Morton [Tue, 20 Jan 2004 11:11:23 +0000 (03:11 -0800)]
[PATCH] One-shot support for epoll
From: Davide Libenzi <davidel@xmailserver.org>
The attached patch implements the one-shot support for epoll. Because of
the way epoll works (hooking f_op->poll()) the ET behavior is not really ET
because it might happen that, while data is still available to read (for
the EPOLLIN case), another chunk will become available triggering another
event.
While those conditions can be easily be handled in userspace, the absolute
triviality of the patch and the avoidance of user/kernel space switches and
f_op->poll() calls, make IMHO worth doing this inside epoll itself.
Andrew Morton [Tue, 20 Jan 2004 11:10:48 +0000 (03:10 -0800)]
[PATCH] ppc64: iSeries virtual console
From: Stephen Rothwell <sfr@canb.auug.org.au>
This is a forward port of a 2.4 driver that has been present in a couple of
(enterprise) distributions for some time. It works for me :-), I even get
console output :-) This makes the machine almost usable - next we will get
virtual disk.
It has been considerably tidied up, but if you have any further worries
with it, let me know.
Andrew Morton [Tue, 20 Jan 2004 11:10:38 +0000 (03:10 -0800)]
[PATCH] ppc64: Bug fix for hugepages on ppc64
From: David Gibson <david@gibson.dropbear.id.au>
Currently the flag indicating whether or not hugepages are allowed below
4GB is not correctly propagated across fork(), which can lead to oopses.
The patch below fixes this.
Andrew Morton [Tue, 20 Jan 2004 11:10:20 +0000 (03:10 -0800)]
[PATCH] Fix for 32-bit execve() error path
From: David Gibson <david@gibson.dropbear.id.au>
The patch below fixes a bug in ppc64's 32-bit execve() path. It duplicates
logic already in the normal fs/exec.c do_execve() to avoid dropping a NULL
mm. The bprm.mm becomes NULL once the exec passes the "point of no
return". Without this patch a failure past that point (e.g. mmap()
failure) will cause an oops, with it just a killed process.
Pete Zaitcev [Tue, 20 Jan 2004 08:53:52 +0000 (00:53 -0800)]
[PATCH] USB: Band-aid for mct_u232 in 2.6.1
On Sun, 18 Jan 2004 00:37:44 -0800
Pete Zaitcev <zaitcev@redhat.com> wrote:
> My Magic Control Technology adapter causes an oops in the following way.
> Connect the thing, run "cat < /dev/ttyUSB0", disconnect, kill cat with ^C.
> The result looks like this:
I played with it a little more, and pretty much got everything working,
thus fixing two Fedora bugs.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=112889
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=113700
Matthew Dharm [Tue, 20 Jan 2004 08:03:17 +0000 (00:03 -0800)]
[PATCH] USB Storage: Sysfs attribute file for max_sectors
After much discussion with the SCSI folks, here's a patch to export
max_sectors as a sysfs attribute. Turning this down makes some people's
devices more stable, but at a significant cost in performance. Now, users
can adjust it without recompilation.
Alan Stern [Tue, 20 Jan 2004 08:02:47 +0000 (00:02 -0800)]
[PATCH] USB Storage: Notify the SCSI layer about device resets
According to James Bottomley, we need to notify the SCSI midlayer whenever
we issue a driver-initiated device reset. That can happen in several
places, most notably following a transport error. This patch adds
code to the reset routine to take care of it. (Notifying about resets
requested by the midlayer itself is unnecessary but harmless.)
Alan Stern
On 15 Dec 2003, James Bottomley wrote:
> It looks like the driver sent a reset to the device on its own without
> reporting it to the mid-layer.
>
> There's an expecting_cc_ua flag in the scsi_device. It gets set on
> error recovery actions, or if the device does something to detect or
> trigger a reset (that's the scsi_report_device_reset() and
> scsi_report_bus_reset() API's).
>
> James
Adam Kropelin [Tue, 20 Jan 2004 08:02:17 +0000 (00:02 -0800)]
[PATCH] USB: hiddev HIDIOCGREPORT not blocking in 2.6
I've noticed in 2.6 kernels that HIDIOCGREPORT does not wait for io
completion before returning to the caller. This creates a few unpleasant
issues for userspace:
...that used to work in 2.4 now fail in 2.6 if the device takes more
than a few milliseconds to respond to HIDIOCGREPORT. (I'm seeing this
issue on APC UPSes, FWIW.)
Second, userspace code can easily flood the kernel with control messages
since the kernel provides no "backpressure". The result is a lot of
"hid-core.c: control queue full" errors and lost reports.
2.6 hid-core.c appears to submit the request and return immediately.
Although the 2.4 code differs significantly, I traced the call path to
usb-core.c, which seems to block with a timeout, so the code supports my
userspace observation. (Assuming I didn't misread it.)
Frank Becker [Tue, 20 Jan 2004 22:26:42 +0000 (22:26 +0000)]
[ARM PATCH] 1703/1: SA Cerf update (cleanup)
Patch from Frank Becker
Crud removal. Updated cerf doc.
The SA CerfPDA/CerfPOD have long been gone. I see no
community activity. The last official release was 2.4.9.
Removed ifdefs for CERF_CPLD (which referred to the PDA/POD), go figure.
Removed keyboard driver.
Removed default configs for PDA/POD.
Removed PDA/POD related LCD stuff.
NEC ARM710T is used in Psion Windermere architecture, and possibly
other systems.
710T works fine with the 720T functions, except the high_mapping
does not work for vectors_base(). Even if the high bit register is
set, the vectors stay at 0x00000000 instead of 0xffff0000.
This declares the pxa2xx_udc platform device, defines
the platform_data made available to that driver, and
allows different machines to customize that platform_data.
Same idea as in the FB driver. Be careful of patch conflicts
applying to other kernels, mostly due to different platform
devices being listed.
Alan Stern [Tue, 20 Jan 2004 06:50:56 +0000 (22:50 -0800)]
[PATCH] USB UHCI: fix broken data toggles for queued control URBs
This patch fixes a long-standing (albeit unidentified) problem in the
queueing code for the UHCI HCD. The code propagates data toggle settings
between messages in a queue for control transfers just the same as bulk
and interrupt transfers. That is a mistake, since control messages always
restart with data toggle 0. With this patch, the UHCI driver now passes
test 10 (control URB queueing) in David Brownell's usbtest suite.
The patch appears to change more than it really does, because it alters
the indentation level of a large section of code.
Paul Mackerras [Mon, 19 Jan 2004 13:49:29 +0000 (05:49 -0800)]
[PATCH] sort exception tables
This patch arranges for the exception tables to be sorted on most
architectures. It sorts the main kernel exception table on startup
and the module exception tables when they get loaded. The main table
is sorted reasonably early - just after kmem_cache_init - but that
could be moved even earlier if necessary.
There is now a lib/extable.c which includes the sort_extable()
function from arch/ppc/mm/extable.c and the search_extable() function
from arch/i386/mm/extable.c, which had been copied to many
architectures. On many architectures, arch/$(ARCH)/mm/extable.c
became empty and so I have removed it.
There are four architectures which do things differently from i386:
alpha, ia64, sparc and sparc64. Alpha and ia64 store the offset from
the offset from the exception table entry to the instruction, and
sparc and sparc64 have range entries in the table. For those
architectures I have added empty sort_extable functions. The
maintainers for those architectures can implement something better if
they care to. As it is they are no worse off than before.
Although it is a moderately sizable patch, it ends up with a net
reduction of 377 lines in the size of the kernel source. :)
I have tested this on x86 and ppc with a module that uses __get_user
in an init function, deliberately laid out to get the exception table
out of order, and it works (whereas it oopsed without this patch).
Sanitize 66MHz clock use: "enable" 66MHz clock before starting UDMA3/4/5
read/write transfer and "disable" it after finishing transfer.
- fixes timings for non-UDMA3/4/5 operations (correct 33MHz timings are used)
- allows using UDMA3/4/5 modes on a capable drive even if non-UDMA3/4/5 drive
is present on the same channel
- fixes corner case when one drive on the channel was using UDMA66/100 + LBA48
(so clock was enabled/disabled for each read/write) and other one was using
UDMA66/100 + LBA28, it could happen that request on LBA48 drive disabled
66MHz clock and it was not enabled for the next transfer on LBA28 drive
Ville Nuorvala [Mon, 19 Jan 2004 13:37:58 +0000 (05:37 -0800)]
[IPV6]: Stricter checks on link-locals in bind and sendmsg
When binding to a link-local address, inet6_bind() and raw6_bind() only
check that an interface is specified and that the address exists, but
they don't check if it actually exists on the specified interface.
Similarly, in datagram_sent_ctl() we don't check for the possibility of a
link-local address when we receive the source address from userspace.
Andrew Morton [Mon, 19 Jan 2004 13:16:24 +0000 (05:16 -0800)]
[PATCH] reiserfs v3 should throttle writers
From: Chris Mason <mason@suse.com>
The v3 reiserfs_file_write func doesn't do any write throttling, which
leads to a variety of problems. Here's a patch that makes
reiserfs_file_write call balance_dirty_pages_ratelimited, and exports that
func for module usage.