aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2005-07-27[PATCH] fix xip sparse file handling in ext2Carsten Otte1-1/+1
Oliver Paukstadt from our test department is testing the xip patches in Linus' git-tree. He found a problem that shows when reading a file that contains sparse blocks (holes) on a -o xip mounted ext2 filesystem: the BUG_ON() in fs/ext2/xip.c:40 triggers where it should not. The problem was introduced by a cleanup in my previous patch, this patch fixes it. Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] ub: fix for blank CDsPete Zaitcev1-41/+170
This patch fixes a microcode lockup in my CD-ROM adapters when a blank CD is inserted. However, do not try to burn CDs yet! I'm pretty sure that trying it will end in coasters. - Fix a few cases where we were unable to resynchronize with replies for previous commands. The main thing is to keep reading replies in case of a stall. This is done with the new state CLRRS. - Since I am forgetting the basic state machine already, document it. - Move counter increments in the looping path in its own function. - Fix a harmless buglet in case CSW read fails to submit: do not override state. - Implement the Alan Stern's idea for adaptive signature checking. Signed-off-by: Pete Zaitcev <zaitcev@yahoo.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] Undo mempolicy shared policy rbtree microoptimizationAndi Kleen1-1/+1
All mempolicy changes must be inside the spinlock and readding the rb_erase prevents a crash while doing: > echo "1" > /tmp/numatest > numactl --length=0x4000 --shm /tmp/numatest --localalloc > numactl --length=0x2000 --offset=0 --shm /tmp/numatest --membind=0 > numactl --length=0x2000 --offset=0x2000 --shm /tmp/numatest --membind=1 > ipcs > ipcrm -M "the_key_value_of_this_shm_area" Based on a patch by John Blackwood Cc: <john.blackwood@ccur.com> Cc: <andrea@suse.de> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] jsm: warning fixesV. ANANDA KRISHNAN3-13/+20
- updates the version - fix mixing of declarations and code. The mixing of declarations and code displays warnings when used against RedHat RHEL4.0 distro (compiler version is 3.4.3-22.1) and hence I separated them out. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] jsm: use dynamic major number allocationV. ANANDA KRISHNAN1-1/+1
The jsm driver uses a static number of 253. The major number 253 is a reserved for "LOCAL/EXPERIMENTAL USE" by both char and block devices. So take advantage of the dynamic allocation of major number by the kernel. Signed-off-by: V. Ananda Krishnan <mansarov@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] i4l: add Olitec ISDN PCI card in hisax gazel driverOlivier Blin3-2/+9
This patch adds support for the Olitec ISDN PCI card in the hisax gazel driver. The gazel driver supports this card, but wasn't aware of its PCI ids. Users used to modify the PCI ids of a supported card in include/linux/pci_ids.h and recompile their kernel to get this card running, as said in most Howtos. This patch makes the hisax gazel driver recognize the PCI ids of the Olitec ISDN PCI card. Signed-off-by: Olivier Blin <oblin@mandriva.com> Signed-off-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] scsi_scan: check return code from scsi_sysfs_add_sdevAlan Stern1-1/+2
Adds a missing check for an error return code from scsi_sysfs_add_sdev. This resolves entry #4863 in the OSDL bugzilla. Although in that bug report the failure occurred because of a confusion over scanning vs. rescanning, in general add_sdev can fail for a number of reasons (the simplest being insufficient memory) and the caller should cope properly. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] autofs4: fix infamous "Busy inodes after umount ..." messageIan Kent2-0/+74
If the automount daemon receives a signal which causes it to sumarily terminate the autofs4 module leaks dentries. The same problem exists with detached mount requests without the warning. This patch cleans these dentries at umount. Signed-off-by: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] Add pcibios_bus_to_resource for pariscDominik Brodowski1-0/+18
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Acked-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] itimer fixesGeorge Anzinger1-21/+16
Fix the recent off-by-one fix in the itimer code: 1. The repeating timer is figured using the requested time (not +1 as we know where we are in the jiffie). 2. The tests for interval too large are left to the time_val to jiffie code. Signed-off-by: George Anzinger <george@mvista.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] watchdog: add missing 0x in alim1535_wdt.cRolf Eike Beer1-1/+1
Usually the device IDs are given in hex. This one is a bit strange: it is without 0x in the first place and used with it some lines later. I suspect the first one to be the wrong. Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] Address BUG: using smp_processor_id() in preemptible [00000001] codeNigel Cunningham1-1/+1
This patch fixes a warning in the disable_nonboot_cpus call in kernel/power/smp.c. Signed-off by: Nigel Cunningham <nigel@suspend2.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] drivers/pnp/pnpbios/rsparser.c: fix compile error with PCI=nAdrian Bunk1-1/+1
drivers/pnp/pnpbios/rsparser.c: In function 'pnpbios_parse_allocated_irqresource': drivers/pnp/pnpbios/rsparser.c:67: error: too many arguments to function 'pcibios_penalize_isa_irq' Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] ext3: drop quota references before releasing inodeJan Kara1-0/+2
We must drop references to quota structures before releasing the inode. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] ext2: drop quota reference before releasing inodeJan Kara1-0/+1
We must drop references to quota structures before releasing the inode. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] reiserfs: fix deadlock in inode creation failure path w/ default ACLJeff Mahoney1-1/+11
reiserfs_new_inode() can call iput() with the xattr lock held. This will cause a deadlock to occur when reiserfs_delete_xattrs() is called to clean up. The following patch releases the lock and reacquires it after the iput. This is safe because interaction with xattrs is complete, and the relock is just to balance out the release in the caller. The locking needs some reworking to be more sane, but that's more intrusive and I was just looking to fix this bug. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] as-iosched tunable encoding fixJens Axboe1-9/+1
AS is doing internal msec<->jiffies conversions twice, so the sysfs tunables which represent time are coming out wrong. The switch from HZ=1000 exposed this. Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] Fix missing refrigerator invocation in jffs2Nigel Cunningham1-0/+3
Here's a patch to fix a missing refrigerator call in jffs2. Signed-off-by: Nigel Cunningham <nigel@suspend2.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] Add missing tvaudio try_to_freeze()Nigel Cunningham1-0/+1
Tvaudio lacks a refrigerator call. This patch fixes that. Signed-off-by: Nigel Cunningham <ncunningham@suspend2.net> Cc: <video4linux-list@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] try_to_freeze() call fixesNigel Cunningham4-4/+4
Here are fixes for four try_to_freeze calls that are still (incorrectly) using a parameter after the recent try_to_freeze() changes. Signed-off-by: Nigel Cunningham <nigel@suspend2.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] x86_64: fix SMP boot lockup on some machinesAndi Kleen1-1/+1
Fixes boot up lockups on some machines where CPU apic ids don't start with 0 Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] uml: fix misdeclared functionJeff Dike1-12/+2
This fixes an interface which differed from its declaration, and includes the relevant header so that this doesn't happen again. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] uml: update module interfaceDominik Hackl1-2/+2
This patch replaces the deprecated MODULE_PARM function by the new module_param function. Signed-off-by: Dominik Hackl <dominik@hackl.dhs.org> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] uml: add skas0 command-line optionPaolo 'Blaisorblade' Giarrusso2-10/+44
This adds the "skas0" parameter to force skas0 operation on SKAS3 host and shows which operating mode has been selected. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] uml: add dependency to arch/um/Makefile for parallel buildsOlaf Hering1-1/+1
the header file must be build before mk_user_constants. Adding it as a direct dep doesnt work for some reason. arch/um/os-Linux/util/mk_user_constants.c:2:26: error: user-offsets.h: No such file or directory arch/um/os-Linux/util/mk_user_constants.c: In function 'main': arch/um/os-Linux/util/mk_user_constants.c:17: error: '__UM_FRAME_SIZE' undeclared (first use in this function) arch/um/os-Linux/util/mk_user_constants.c:17: error: (Each undeclared identifier is reported only once arch/um/os-Linux/util/mk_user_constants.c:17: error: for each function it appears in.) make[1]: *** [arch/um/os-Linux/util/mk_user_constants] Error 1 Signed-off-by: Olaf Hering <olh@suse.de> Cc: Paolo Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] uml: readd missing define to arch/um/Makefile-i386Olaf Hering1-0/+1
scripts/Makefile.build:13: /Makefile: No such file or directory scripts/Makefile.build:64: kbuild: Makefile.build is included improperly the define was removed, but its still required to build some targets. Signed-off-by: Olaf Hering <olh@suse.de> Cc: Paolo Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] md: when resizing an array, we need to update resync_max_sectors as well as sizeNeilBrown3-0/+3
Without this, and attempt to 'grow' an array will claim to have synced the extra part without actually having done anything. 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>
2005-07-27[PATCH] mips: fbdev Kcofnig fixYoichi Yuasa2-37/+2
arch/mips/Kconfig is defining CONFIG_FB as bool and drivers/video/Kconfig was changed a while ago to define it as tristate. Remove the MIPS definition. Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] Really __nocast-annotate kmalloc_node()Alexey Dobriyan1-1/+1
One chunk was lost somewhere between my and Andrew's machine. Noticed by Victor Fusco. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] I2C-MPC: Restore code removedKumar Gala1-0/+94
A previous patch to remove support for the OCP device model was way to generious and moved some of the platform device model code, oops. Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] user_mode_vm() build fixAndrew Morton1-0/+3
include/asm/ptrace.h: In function `user_mode_vm': include/asm/ptrace.h:67: `VM_MASK' undeclared (first use in this function) Cc: Chuck Ebbert <76306.1226@compuserve.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26[PATCH] x86_64 fsnotify build fixAndrew Morton1-1/+1
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26[PATCH] softdog build fixAndrew Morton1-1/+1
drivers/char/watchdog/softdog.c:94: too many arguments to function `emergency_restart' Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26[PATCH] eurotechwdt build fixAndrew Morton1-1/+1
drivers/char/watchdog/eurotechwdt.c:165: too many arguments to function `emergency_restart' Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26[PATCH] i386: clean up user_mode macrosChuck Ebbert1-3/+10
- make the new user_mode() return 0 or 1 (same as x86_64) - remove conditional jump from user_mode_vm() it's called every timer tick on each CPU on SMP) Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26[PATCH] Change PowerPC MPC8xx maintainerTom Rini1-1/+8
As Marcelo has been spending a great deal of time working on MPC8xx systems of late (thanks!) and has more time than I do now for it, I'm handing this over to him. Signed-off-by: Tom Rini <trini@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26[XFRM]: Fix possible overflow of sock->sk_policyHerbert Xu1-0/+3
Spotted by, and original patch by, Balazs Scheidler. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-26[PATCH] fix MAX_USER_RT_PRIO and MAX_RT_PRIOSteven Rostedt2-3/+4
Here's the patch again to fix the code to handle if the values between MAX_USER_RT_PRIO and MAX_RT_PRIO are different. Without this patch, an SMP system will crash if the values are different. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Dean Nelson <dcn@sgi.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26[NETFILTER]: Fix ip_conntrack_put() prototype.Adrian Bunk1-1/+1
The function is not inline. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-26[PATCH] Fix RLIMIT_RTPRIO breakageAndreas Steinmetz1-1/+2
RLIMIT_RTPRIO is supposed to grant non privileged users the right to use SCHED_FIFO/SCHED_RR scheduling policies with priorites bounded by the RLIMIT_RTPRIO value via sched_setscheduler(). This is usually used by audio users. Unfortunately this is broken in 2.6.13rc3 as you can see in the excerpt from sched_setscheduler below: /* * Allow unprivileged RT tasks to decrease priority: */ if (!capable(CAP_SYS_NICE)) { /* can't change policy */ if (policy != p->policy) return -EPERM; After the above unconditional test which causes sched_setscheduler to fail with no regard to the RLIMIT_RTPRIO value the following check is made: /* can't increase priority */ if (policy != SCHED_NORMAL && param->sched_priority > p->rt_priority && param->sched_priority > p->signal->rlim[RLIMIT_RTPRIO].rlim_cur) return -EPERM; Thus I do believe that the RLIMIT_RTPRIO value must be taken into account for the policy check, especially as the RLIMIT_RTPRIO limit is of no use without this change. The attached patch fixes this problem. Signed-off-by: Andreas Steinmetz <ast@domdv.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26Fix compiler warning in qla_iocb.cLinus Torvalds1-1/+1
Remove bogus initialization that was re-done (correctly) later.
2005-07-26[PATCH] ARM: 2831/1: S3C2440 - split s3c2440 clocks from central clock codeBen Dooks3-57/+117
Patch from Ben Dooks Split the s3c2440 specific clocks from the arch clock support, to make the code clearer. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-07-26[PATCH] acpi: Don't call acpi_sleep_prepare from acpi_power_offEric W. Biederman1-21/+12
Now that all of the code paths that call acpi_power_off have been modified to call either call kernel_power_off (which calls apci_sleep_prepare by way of acpi_shutdown) or to call acpi_sleep_prepare directly it is redundant to call acpi_sleep_prepare from acpi_power_off. So simplify the code and simply don't call acpi_sleep_prepare. In addition there is a little error handling done so if we can't register the acpi class we don't hook pm_power_off. I think I have done the right thing with the CONFIG_PM define but I'm not certain. Can this code even be compiled if CONFIG_PM is false? Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26[PATCH] acpi_power_off: Don't switch to the boot cpuEric W. Biederman1-1/+0
machine_power_off on i386 and x86_64 now switch to the boot cpu out of paranoia and because the MP Specification indicates it is a good idea on reboot, so for those architectures it is a noop. I can't see anything in the acpi spec that requires you to be on the boot cpu to power off the system, so this should not be an issue for ia64. In addition ia64 has the altix a massive multi-node system where switching to the boot cpu sounds insane as we may hot removed the boot cpu. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26[PATCH] x86_64 sync machine_power_off with i386Eric W. Biederman1-0/+3
i386 machine_power_off was disabling the local apic and all of it's users wanted to be on the boot cpu. So call machine_shutdown which places us on the boot cpu and disables the apics. This keeps us in sync and reduces the number of cases we need to worry about in the power management code. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26[PATCH] APM: Remove redundant call to set_cpus_allowedEric W. Biederman1-7/+0
machine_power_off now always switches to the boot cpu so there is no reason for APM to also do that. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26[PATCH] i386 machine_power_off cleanupEric W. Biederman1-3/+1
Call machine_shutdown() to move to the boot cpu and disable apics. Both acpi_power_off and apm_power_off want to move to the boot cpu. and we are already disabling the local apics so calling machine_shutdown simply reuses code. ia64 doesn't have a special path in power_off for efi so there is no reason i386 should. If we really need to call the efi power off path the efi driver can set pm_power_off like everyone else. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26[PATCH] machine_shutdown: Typo fix to actually allow specifying which cpu to reboot onEric W. Biederman1-1/+1
This appears to be a typo I introduced when cleaning this code up earlier. Ooops. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26[PATCH] pcwd.c: Call kernel_power_off not machine_power_offEric W. Biederman1-2/+2
The call appears to come from process context so kernel_power_off should be safe. And acpi_power_off won't necessarily work if you just call machine_power_off. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26[PATCH] swpsuspend: Have suspend to disk use factors of sys_rebootEric W. Biederman1-6/+3
The suspend to disk code was a poor copy of the code in sys_reboot now that we have kernel_power_off, kernel_restart and kernel_halt use them instead of poorly duplicating them inline. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>