27 Jul, 2007
40 commits
-
release_pages() in mm/swap.c changes page_count() to be 0 without removing
PageLRU flag...This means isolate_lru_page() can see a page, PageLRU() &&
page_count(page)==0.. This is BUG. (get_page() will be called against
count=0 page.)Signed-off-by: KAMEZAWA Hiroyuki
Acked-by: Christoph Lameter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In usual, migrate_pages(page,,) is called with holding mm->sem by system call.
(mm here is a mm_struct which maps the migration target page.)
This semaphore helps avoiding some race conditions.But, if we want to migrate a page by some kernel codes, we have to avoid
some races. This patch adds check code for following race condition.1. A page which page->mapping==NULL can be target of migration. Then, we have
to check page->mapping before calling try_to_unmap().2. anon_vma can be freed while page is unmapped, but page->mapping remains as
it was. We drop page->mapcount to be 0. Then we cannot trust page->mapping.
So, use rcu_read_lock() to prevent anon_vma pointed by page->mapping from
being freed during migration.Signed-off-by: KAMEZAWA Hiroyuki
Acked-by: Christoph Lameter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Davi fixed a missing cast in the __put_user(), that was making timerfd
return a single byte instead of the full value.Talking with Michael about the timerfd man page, we think it'd be better to
use a u64 for the returned value, to align it with the eventfd
implementation.This is an ABI change. The timerfd code is new in 2.6.22 and if we merge this
into 2.6.23 then we should also merge it into 2.6.22.x. That will leave a few
early 2.6.22 kernels out in the wild which might misbehave when a future
timerfd-enabled glibc is run on them.mtk says: The difference would be that read() will only return 4 bytes, while
the application will expect 8. If the application is checking the size of
returned value, as it should, then it will be able to detect the problem (it
could even be sophisticated enough to know that if this is a 4-byte return,
then it is running on an old 2.6.22 kernel). If the application is not
checking the return from read(), then its 8-byte buffer will not be filled --
the contents of the last 4 bytes will be undefined, so the u64 value as a
whole will be junk.Signed-off-by: Davide Libenzi
Cc: Michael Kerrisk
Cc: Davi Arnaut
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch fixes the following compile error introduced by
commit e8666b2718fdb5bf0ea7c3126f7e292bbbf2946b and reported
by Alexey Dobriyan:CC arch/i386/kernel/acpi/cstate.o
In file included from arch/i386/kernel/acpi/cstate.c:17:
include/acpi/processor.h:88: error: expected specifier-qualifier-list before 'acpi_integer'If you select something you must ensure that the dependencies of what
you are selecting are fulfilled.Signed-off-by: Adrian Bunk
Cc: Alexey Dobriyan
Cc: Joshua Hoblitt
Cc: Dave Jones
Cc: Michal Piotrowski
Cc: Len Brown
Cc: Andrew Morton
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Documentation: The FIXMEs
Signed-off-by: Rusty Russell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Documentation: The Switcher
Signed-off-by: Rusty Russell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Documentation: The Host
Signed-off-by: Rusty Russell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Documentation: The Launcher
Signed-off-by: Rusty Russell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Documentation: The Drivers
Signed-off-by: Rusty Russell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Documentation: The Guest
Signed-off-by: Rusty Russell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The netfilter code had very good documentation: the Netfilter Hacking HOWTO.
Noone ever read it.So this time I'm trying something different, using a bit of Knuthiness.
Signed-off-by: Rusty Russell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix:
linux/include/xen/page.h: In function mfn_pte:
linux/include/xen/page.h:149: error: __supported_pte_mask undeclared (first use in this function)
linux/include/xen/page.h:149: error: (Each undeclared identifier is reported only once
linux/include/xen/page.h:149: error: for each function it appears in.)Signed-off-by: Jeremy Fitzhardinge
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix a typo turned up by a Coverity check: referring to the wrong register,
which could cause problems with DS1338 RTCs whose oscillators halted.Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix the include files moved around during the s3c24xx arch moves.
Signed-off-by: Ben Dooks
Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
A dummy inline function of register_nosave_region_late was accidentally
removed by the recent PM patch that introduced suspend notifiers.
This elimination causes the following compiler error on PPC machines.CC arch/powerpc/sysdev/dart_iommu.o
arch/powerpc/sysdev/dart_iommu.c: In function 'iommu_init_late_dart':
arch/powerpc/sysdev/dart_iommu.c:376: error: implicit declaration of function
'register_nosave_region_late'
make[1]: *** [arch/powerpc/sysdev/dart_iommu.o] Error 1
make: *** [arch/powerpc/sysdev] Error 2This patch fixes the problem.
Signed-off-by: Ryusuke Konishi
Acked-by: Rafael J. Wysocki
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Christoph Lameter
Acked-by: Pekka Enberg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix kmod.c:
Warning(linux-2.6.23-rc1//kernel/kmod.c:364): No description found for parameter 'envp'Signed-off-by: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This is probably a leftover from a time when the return wasn't there yet.
Now the extra assignment is just irritating.Signed-off-by: Ulrich Drepper
Cc: Davide Libenzi
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Have put_unaligned() warn if types would be wrong
for assignment, slap force-casts where needed. Cast the
result of get_unaligned to typeof(*ptr). With that in
place we get proper typechecking, both from gcc and from sparse,
including that for bitwise types.Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Acked-by: Jeff Garzik
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Since powerpc insists on printing the _value_ of condition
and on casting it to long... At least let's make it a force-cast.Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
We really need force-cast when converting to final result type;
unsigned long can be silently converted to integer types and
to pointers, but not to bitwise.Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Acked-by: Jeff Garzik
Signed-off-by: Linus Torvalds -
Address of auto variable is not a userland pointer. A good thing, too,
since if pppol2tp_tunnel_getsockopt() would _really_ get a userland pointer
as argument, it would be an instant roothole...Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
u32* volatile cyclone_timer means volatile auto pointer to u32,
which is clearly not what had been intended (we never even take
the address of that variable, let alone pass it to something that
could change it behind our back). u32 volatile * is what the
authors apparently wanted to say, but in reality we don't need that
qualifier there at all - it's (properly) only passed to iomem helpers
which takes care of that stuff just fine.Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Convert rel_info to host-endian before calling ip6_tnl_err().
The things become much more straightforward that way.
The key observation (and the reason why that code actually
worked) is that after ip6_tnl_err() we either immediately
bailed out or had rel_info set to 0 or had it set to host-endian
and guaranteed to hit
(rel_type == ICMP_DEST_UNREACH && rel_code == ICMP_FRAG_NEEDED)
case. So inconsistent endianness didn't really lead to bugs,
but it had been subtle and prone to breakage. New variant is
saner and obviously safe.Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds