Andi Kleen [Sat, 5 Jun 2004 03:57:01 +0000 (20:57 -0700)]
[PATCH] Use KERN_ALERT more for oopses
Often users only report what syslogd reports with KERN_ALERT when a kernel
crash occurs. Make an oops print mpre information with that (in particular
the RIP)
Patch for i386 and x86-64.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:56:50 +0000 (20:56 -0700)]
[PATCH] md: support reshaping raid1 arrays - adding or removing drives.
This allows the number of "raid_disks" in a raid1 to be changed.
This requires allocating a new pool of "r1bio" structures which a different
number of bios, suspending IO, and swapping the new pool in place of the old.
(and a few other related changes).
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:56:39 +0000 (20:56 -0700)]
[PATCH] md: allow md arrays to be resized if devices are large enough.
It is possible to have raid1/4/5/6 arrays that do not use all the space on the
drive. This can be done explicitly, or can happen info you, one by one,
replace all the drives with larger devices.
This patch extends the "SET_ARRAY_INFO" ioctl (which previously invalid on
active arrays) allow some attributes of the array to be changed and implements
changing of the "size" attribute.
"size" is the amount of each device that is actually used. If "size" is
increased, the new space will immediately be "resynced".
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:56:16 +0000 (20:56 -0700)]
[PATCH] md: handle hot-add for arrays with non-persistent superblocks
If the superblock isn't persistent, we shouldn't allow room for it.
From: Paul Clements <Paul.Clements@SteelEye.com> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:55:41 +0000 (20:55 -0700)]
[PATCH] md: make sure md_check_recovery will remove a faulty device when ->nr_pending hits 0
md_check_recovery only locks a device and does stuff when it thinks there is a
real likelyhood that something needs doing. So the test at the top must cover
all possibilities.
But it didn't cover the possibility that the last outstanding request on a
failed device had finished and so the device needed to be removed.
As a result, a failed drive might not get removed from the personalities
perspective on the array, and so it could never be removed from the array as a
whole.
With this patch, whenever ->nr_pending hits zero on a faulty device,
MD_RECOVERY_NEEDED is set so that md_check_recovery will do stuff.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:55:29 +0000 (20:55 -0700)]
[PATCH] md: rationalise device selection in md/multipath.
md/multipath has two separate pieces of code for choosing a device to use, one
when a request is first made and the other when a request is being re-tried
after failure. This patch discards multipath_read_balance and uses
multipath_map in both situations.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:55:18 +0000 (20:55 -0700)]
[PATCH] kNFSd: documentation typo fixes
Fix minor typos.
From: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:55:07 +0000 (20:55 -0700)]
[PATCH] kNFSd: nfsd4 file creation fix
Fix error return in create. (See comment in xdr for createtype4 at end of
rfc3530.)
From: Andy Adamson <andros@citi.umich.edu>
From: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:54:56 +0000 (20:54 -0700)]
[PATCH] kNFSd: nfsd4 setclientid fix
Fix a somewhat bizarre corner case in clid processing: a clientid match isn't
required for case 3.
From: Andy Adamson <andros@citi.umich.edu>
From: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:54:45 +0000 (20:54 -0700)]
[PATCH] kNFSd: nfsd getattr fix
Oops: we were claiming to support the TIME_CREATE attribute, when we don't
really.
From: Andy Adamson <andros@citi.umich.edu>
From: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:54:34 +0000 (20:54 -0700)]
[PATCH] kNFSd: nfsd4_release_lockowner() oops fix
Fix oops in release_lockowner. We need to break out to two loops, not just
one, and if the loop finds nothing, 'local' won't be NULL. So just put the
body of the 'if' inside the loop.
From: Andy Adamson <andros@citi.umich.edu>
From: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:54:23 +0000 (20:54 -0700)]
[PATCH] kNFSd: rsc_lookup simplification
rsc_lookup is a bit complicated: it either takes responsibility for the memory
pointed to by handle.data and sets handle.data to NULL, or it leaves
handle.data unchanged, in which case the caller is responsible for freeing
handle.data. I forgot that the possibility of inserting a negative cache
entry into the cache meant that this could happen even when rsc_lookup is
called with set == 0.
Note that the ip_map code has the same bug, not that it seems to matter much,
since the memory in question in that case is always just a statically
allocated string.
From: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:54:12 +0000 (20:54 -0700)]
[PATCH] kNFSd: gss_svc locking and refcounting fixes
The server sunrpc code should take a reference on the relevant module before
calling any authentication code.
Also, it looks to me like the table of authops needs some locking.
Finally, gss_svc_init wasn't checking the status of svc_auth_register, and
gss_svc_shutdown wasn't calling svc_auth_unregister.
From: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:54:02 +0000 (20:54 -0700)]
[PATCH] kNFSd: nfsd4 xdr name encoding improvements
Encode names directly into xdr buffer; this optimizes out a data copy, reduces
stack usage, and will make life simpler when doing acls.
From: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:53:48 +0000 (20:53 -0700)]
[PATCH] kNFSd: nfsd_acceptable() typo fix
there's a small typo in nfsd_acceptable. It calls
err = permission(parent->d_inode, S_IXOTH, NULL);
It really wants to use MAY_EXEC instead of S_IXOTH. Those happen to be the
same at the moment, but may not do so forever.
From: Olaf Kirch <okir@suse.de>:
From: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
If ek = exp_find_key() is not an error, then ek->ek_export should be set; no
point in checking if it's NULL.
From: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Sat, 5 Jun 2004 03:53:17 +0000 (20:53 -0700)]
[PATCH] kNFSd: Fix nfs3 dentry encoding
The "offset" in an entry in an nfs3 readdir response is 64 bits long and as it
has only a 32 bit alignment, it fall half in one page of the response and half
in another.
This patch adds a second offset pointer (offset1) which points to the second
half in the unusual case of the offset being split between pages, and sets and
uses it accordingly.
From: Olaf Kirch <okir@suse.de> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andreas Dilger [Sat, 5 Jun 2004 03:53:02 +0000 (20:53 -0700)]
[PATCH] ext3: htree rename fix
A problem with htree was recently discovered during Lustre testing when
files were being renamed within the same directory. In some cases the
addition of the new name caused a directory block split and the old
dir_entry was pointing at the wrong entry, and the wrong entry was removed.
This would seem entirely possible in a Maildir directory, since the MTA
will be doing a lot of renames within the same directory.
If old_de is pointing to the newly-added entry (i_ino is the same) we end up
deleting the new entry instead of the old one. It looks as if the rename
never happened. We need to verify that the name we are unlinking is what we
expect.
If is also possible that old_de is pointing to the now-unused space at the end
of a newly-split leaf block, so we still need to try ext3_delete_entry()
(which will skip the stale entry and return ENOENT) instead of just relying on
the inum + name check.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Hugh Dickins [Sat, 5 Jun 2004 03:52:50 +0000 (20:52 -0700)]
[PATCH] mm: kill missed pte warning
I've seen no warnings, nor heard any reports of warnings, that anon_vma ever
misses ptes (nor anonmm before it). That WARN_ON (with its useless stack
dump) was okay to goad developers into making reports, but would mainly be an
irritation if it ever appears on user systems: kill it now.
Hugh Dickins [Sat, 5 Jun 2004 03:52:39 +0000 (20:52 -0700)]
[PATCH] mm: get_user_pages vs. try_to_unmap
Andrea Arcangeli's fix to an ironic weakness with get_user_pages.
try_to_unmap_one must check page_count against page->mapcount before unmapping
a swapcache page: because the raised pagecount by which get_user_pages ensures
the page cannot be freed, will cause any write fault to see that page as not
exclusively owned, and therefore a copy page will be substituted for it - the
reverse of what's intended.
rmap.c was entirely free of such page_count heuristics before, I tried hard to
avoid putting this in. But Andrea's fix rarely gives a false positive; and
although it might be nicer to change exclusive_swap_page etc. to rely on
page->mapcount instead, it seems likely that we'll want to get rid of
page->mapcount later, so better not to entrench its use.
Hugh Dickins [Sat, 5 Jun 2004 03:52:28 +0000 (20:52 -0700)]
[PATCH] mm: vma_adjust insert file earlier
For those arches (arm and parisc) which use the i_mmap tree to implement
flush_dcache_page, during split_vma there's a small window in vma_adjust when
flush_dcache_mmap_lock is dropped, and pages in the split-off part of the vma
might for an instant be invisible to __flush_dcache_page.
Though we're more solid there than ever before, I guess it's a bad idea to
leave that window: so (with regret, it was structurally nicer before) take
__vma_link_file (and vma_prio_tree_init) out of __vma_link.
vma_prio_tree_init (which NULLs a few fields) is actually only needed when
copying a vma, not when a new one has just been memset to 0.
__insert_vm_struct is used by nothing but vma_adjust's split_vma case:
co\10mment it accordingly, remove its mark_mm_hugetlb (it can never create
a new kind of vma) and its validate_mm (another follows immediately).
Hugh Dickins [Sat, 5 Jun 2004 03:52:17 +0000 (20:52 -0700)]
[PATCH] mm: vma_adjust adjust_next wrap
Fix vma_adjust adjust_next wrapping: Rajesh V. pointed out that if end were
2GB or more beyond next->vm_start (on 32-bit), then next->vm_pgoff would have
been negatively adjusted.
Hugh Dickins [Sat, 5 Jun 2004 03:52:06 +0000 (20:52 -0700)]
[PATCH] mm: follow_page invalid pte_page
The follow_page write-access case is relying on pte_page before checking
pfn_valid: rearrange that - and we don't need three struct page *pages.
(I notice mempolicy.c's verify_pages is also relying on pte_page, but I'll
leave that to Andi: maybe it ought to be failing on, or skipping over, VM_IO
or VM_RESERVED vmas?)
Hugh Dickins [Sat, 5 Jun 2004 03:51:55 +0000 (20:51 -0700)]
[PATCH] mm: swapper_space.i_mmap_nonlinear
Initialize swapper_space.i_mmap_nonlinear, so mapping_mapped reports false on
it (as it used to do). Update comment on swapper_space, now more fields are
used than those initialized explicitly.
Andi Kleen [Sat, 5 Jun 2004 03:51:44 +0000 (20:51 -0700)]
[PATCH] More x86-64 bugfixes
This patch fixes the problem some people had with their systems crashing
early at boot. Also fix a problem in the LDT/TSS setup noticed by Paul
Menage. And some other random fixes.
- Update defconfig
- Remove some unnecessary printks
- Enlarge kernel mapping to 40MB
- Fix acpi=ht (Suresh Siddha)
- Use KERN_ALERT for more important oops lines
- Fix LDT/TSS limit (Paul Menage)
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Catalin Marinas [Fri, 4 Jun 2004 18:54:37 +0000 (19:54 +0100)]
[ARM PATCH] 1912/1: Wrong cache aliasing bit check
Patch from Catalin Marinas
arch/arm/mm/mmap.c: arch_get_unamapped_area() checks bit 9 in the cache type register for possible cache aliasing problems. Bit 11 should be checked instead.
Alexander Viro [Fri, 4 Jun 2004 07:10:51 +0000 (00:10 -0700)]
[PATCH] sparse: the rest of ifr_data cleanups and annotations
The rest of ->ifr_data cleanups. A bunch of drivers use address
of ifr->ifr_ifru, but spell that as &ifr->ifr_data, which expands to
&ifr->ifr_ifru.ifru_data. ifr_ifru is a union and in effect they sneak in
a private field into that union; ifr_ifru.ifru_data is a field in that
union and it has nothing to do with the things they want to do. Cleaned
up by explicit use of &ifr->ifr_ifru.
Several places where we really use ->ifr_data (i.e. use its value
and use it as __user pointer) annotated.
Alexander Viro [Fri, 4 Jun 2004 07:10:38 +0000 (00:10 -0700)]
[PATCH] sparse: if_mii() helper (from jgarzik)
From: Jeff Garzik
Jeff's patch adds a helper for obtaining mii_ioctl_data from ifreq
and switches drivers to it. It's almost a "move common expression into
inline helper", except that instead of
(struct mii_ioctl_data *)&rq->ifr_ifru.ifru_data
it does
(struct mii_ioctl_data *)&rq->ifr_ifru
- pointer to union instead of pointer to a field of union that has nothing
to do with mii_ioctl_data *and* adds confusion by being a pointer itself.
Alexander Viro [Thu, 3 Jun 2004 17:38:18 +0000 (10:38 -0700)]
[PATCH] sparse: ->ifr_data fixes
b44.c: ->ioctl() is broken, since it uses &ifr->ifr_data instead of
ifr->ifr_data itself. Surprise, surprise, copy_from_user() on that address
doesn't do any good...
baycom_epp.c: does get_user() of the first word of structure, then
immediately does copy_from_user() on the entire thing and completely ignores
the value read by get_user() (it uses the same value in copied structure
instead). Bogus get_user() call removed.
Paul Mackerras [Thu, 3 Jun 2004 15:43:54 +0000 (08:43 -0700)]
[PATCH] ppc64: don't clear MSR.RI in do_hash_page_DSI
Some code that is used on iSeries (do_hash_page_DSI in head.S) was
clearing the RI (recoverable interrupt) bit in the MSR when it
shouldn't. We were getting SLB miss interrupts following that which
were panicking because they appeared to have occurred at a bad place.
This patch fixes the problem. In fact it isn't necessary for
do_hash_page_DSI to do anything to RI, so the patch changes the code
to not set or clear it.
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
skb_checksum_help() has been changed to perform an skb_copy() if needed
(e.g. the original problem case where bcast/mcast was cloning packets for
transmission over loopback, changing ip_summed).
Because of the above, the output path has been modified to take into
account the fact that an skb may need to be changed in some places. There
are some minor changes in the routing code to take care of the now
different input and output function prototypes. The ipv6 fragmentation
code has been modified to detect a changed skb.
The rest of the patch (probably the bulk of it) is simply the result of
changing to double skb pointers.
I've tested this with ipv4, ipv6, ipsec (including xfrm bundles), NAT and
the original DHCP test case. Everything seems to be working ok.
Signed-off-by: James Morris <jmorris@redhat.com> Signed-off-by: David S. Miller <davem@redhat.com>
Alexander Viro [Thu, 3 Jun 2004 14:37:55 +0000 (07:37 -0700)]
[PATCH] sparse: net/bridge annotation
net/bridge partially annotated.
There are nasty problems with net/bridge/netfilter/* and they'll need to
be dealt with at some point - it mixes kernel and userland pointers a
lot and while it seems to avoid obvious breakage, it's not a nice code.
Alexander Viro [Thu, 3 Jun 2004 14:37:33 +0000 (07:37 -0700)]
[PATCH] sparse: econet annotation
econet partially annotated.
It's still badly broken - it mixes userland and kernel chunks in the
same iovec, then does set_fs(KERNEL_FS) and sends that to
sock_sendmsg(). Do we still want to support that protocol family,
anyway?
Dave Jones [Fri, 4 Jun 2004 00:46:25 +0000 (01:46 +0100)]
[CPUFREQ] Remove bogus longhaul v4
The code only supports 3 versions, so numbering them 1,2 and 4
doesn't make a lot of sense. Signed-off-by: Dave Jones <davej@redhat.com>
Dave Jones [Fri, 4 Jun 2004 00:44:00 +0000 (01:44 +0100)]
[CPUFREQ] Move longhaul multiplier debug printk to somewhere more useful.
If we abort due to a reserved FSB being found, we probably want to know the multipliers.
Dave Jones [Fri, 4 Jun 2004 00:29:42 +0000 (01:29 +0100)]
[CPUFREQ] Remove lots of redundant code from longhaul driver.
The recent Nehemiah changes introduced lots of stuff that does
a whole lot of nothing. Nuke it.