aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-11-17workqueue: fix race condition in schedule_on_each_cpu()Tejun Heo1-15/+13
Commit 65a64464349883891e21e74af16c05d6e1eeb4e9 ("HWPOISON: Allow schedule_on_each_cpu() from keventd") which allows schedule_on_each_cpu() to be called from keventd added a race condition. schedule_on_each_cpu() may race with cpu hotplug and end up executing the function twice on a cpu. Fix it by moving direct execution into the section protected with get/put_online_cpus(). While at it, update code such that direct execution is done after works have been scheduled for all other cpus and drop unnecessary cpu != orig test from flush loop. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Andi Kleen <ak@linux.intel.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-11-17mm/memory_hotplug: fix section mismatchHidetoshi Seto1-1/+2
With CONFIG_MEMORY_HOTPLUG I got following warning: WARNING: vmlinux.o(.text+0x1276b0): Section mismatch in reference from the function hotadd_new_pgdat() to the function .meminit.text:free_area_init_node() The function hotadd_new_pgdat() references the function __meminit free_area_init_node(). This is often because hotadd_new_pgdat lacks a __meminit annotation or the annotation of free_area_init_node is wrong. Use __ref to fix this. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Cc: Minchan Kim <minchan.kim@gmail.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-11-17MAINTAINERS: KMEMCHECK: add file patterns, use M: for Pekka's name and addressJoe Perches1-2/+6
Signed-off-by: Joe Perches <joe@perches.com> Cc: Vegard Nossum <vegardno@ifi.uio.no> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-11-17drivers/video/da8xx-fb.c: fix error returnRoel Kluin1-1/+1
The return should be negative on errors Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-11-17spi: error status should be negativeRoel Kluin1-1/+1
Return a negative error value instead of a positive Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: dmitry pervushin <dpervushin@embeddedalley.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-11-17fcntl: Use consistent values for F_[GS]ETOWN_EXStephen Rothwell2-4/+0
These values were only introduced during this release cycle, so it is still early enough to get them right. alpha uses the same values that are in asm-generic/fcntl.h, so just remove them. parisc uses the values interchanged for no apparent reason, so remove them to give us consistency across all architectures. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-11-17xfs: copy li_lsn before dropping AIL lockNathaniel W. Turner1-3/+20
Access to log items on the AIL is generally protected by m_ail_lock; this is particularly needed when we're getting or setting the 64-bit li_lsn on a 32-bit platform. This patch fixes a couple places where we were accessing the log item after dropping the AIL lock on 32-bit machines. This can result in a partially-zeroed log->l_tail_lsn if xfs_trans_ail_delete is racing with xfs_trans_ail_update, and in at least some cases, this can leave the l_tail_lsn with a zero cycle number, which means xlog_space_left will think the log is full (unless CONFIG_XFS_DEBUG is set, in which case we'll trip an ASSERT), leading to processes stuck forever in xlog_grant_log_space. Thanks to Adrian VanderSpek for first spotting the race potential and to Dave Chinner for debug assistance. Signed-off-by: Nathaniel W. Turner <nate@houseofnate.net> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
2009-11-17XFS bug in log recover with quota (bugzilla id 855)Jan Rekorajski1-2/+2
Hi, I was hit by a bug in linux 2.6.31 when XFS is not able to recover the log after a crash if fs was mounted with quotas. Gory details in XFS bugzilla: http://oss.sgi.com/bugzilla/show_bug.cgi?id=855. It looks like wrong struct is used in buffer length check, and the following patch should fix the problem. xfs_dqblk_t has a size of 104+32 bytes, while xfs_disk_dquot_t is 104 bytes long, and this is exactly what I see in system logs - "XFS: dquot too small (104) in xlog_recover_do_dquot_trans." Signed-off-by: Jan Rekorajski <baggins@sith.mimuw.edu.pl> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
2009-11-16Input: lifebook - fix settings for CF-72Abner Holsinger1-2/+1
Panasonic CF-72 uses 6-byte protocol and does not need to be tied to a particular port. Signed-off-by: Abner Holsinger <9zabner@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-11-16Input: psmouse - fix breakage introduced by b7802c5c1eaJiri Kosina1-1/+1
Commit b7802c5c1ea ("Input: psmouse - use boolean type") caused the synaptics_hardware variable to be completely useless, as it is constantly set to 'true' throughout the whole psmouse_extensions(). This was caused by the following hunk in the commit in question - int synaptics_hardware = 0; + bool synaptics_hardware = true; which is wrong and causes driver to issue extra reset when falling back to bare PS/2 protocol. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-11-17[ARM] pxa: ensure mfp is in correct range in mfp_{read,write}Roel Kluin1-2/+2
Ensure we do not read/write outside array boundaries with a negative index. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2009-11-17[ARM] pxa/hx4700: fix hx4700 touchscreen pressure valuesPaul Parsons1-1/+1
hx4700 touchscreen events were being dropped in ads7846_rx() because their pressure values consistently exceeded the platform maximum of 512; a sample of 256 pressure values were in the range 531 to 815. Doubling the platform maximum to 1024 allows hx4700 touchscreen events to pass the test. Signed-off-by: Paul Parsons <lost.distance@yahoo.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2009-11-16ARM: 5787/1: U300 COH 901 331 fixesLinus Walleij2-1/+12
This will fix some small issues with the COH 901 331 RTC driver: - Interrupt is disabled after alarm so that we don't fire multiple interrupts. - We return 0 from the coh901331_alarm_irq_enable() ridding a compile warning. - We alter the name in the U300 device registry to match that of the driver so they sucessfully resolve. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-11-16ARM: Fix warning in sa1100-flash.cRussell King1-2/+2
drivers/mtd/maps/sa1100-flash.c: In function 'sa1100_probe_subdev': drivers/mtd/maps/sa1100-flash.c:214: warning: format '%d' expects type 'int', but argument 3 has type 'uint64_t' Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-11-16at91: at91sam9g20ek modify dual slot evaluation kitNicolas Ferre2-17/+26
at91sam9g20ek rev. C and onwards embed two SD/MMC slots. This patch modify the previous dual slot board definition to match the official rev. C board. It also allows the use of at91_mci SD/MMC driver in addition to the atmel-mci one. Some pins have been re-affected from leds or Ethernet phy IRQ to the SD/MMC slot A. This lead to a modification of those definitions. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Andrew Victor <linux@maxim.org.za>
2009-11-16cifs: clear server inode number flag while autodisablingSuresh Jayaraman1-1/+1
Fix the commit ec06aedd44 that intended to turn off querying for server inode numbers when server doesn't consistently support inode numbers. Presumably the commit didn't actually clear the CIFS_MOUNT_SERVER_INUM flag, perhaps a typo. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de> Acked-by: Jeff Layton <jlayton@redhat.com> Cc: Stable <stable@kernel.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
2009-11-16dereferencing freed memory regulator_fixed_voltage_remove()Dan Carpenter1-3/+2
Don't dereference drvdata after it has been freed. regards, dan carpenter Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-11-16leds-gpio: fix possible crash on OF device unbindingDmitry Eremin-Solenikov1-0/+2
If there are leds present in the OF tree, but the GPIOs for (some) of them are unavailable, led_data doesn't get populated with correct devices. Then, on device unbinding, one can crash the kernel. Workaround this by setting led->gpio to invalid value early. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-16backlight: Fix backlight limiting on spitz/corgi devicesPavel Machek1-2/+3
On spitz (& similar) machines, if battery is running low, backlight needs to be limited to lower step. Unfortunately, current code uses &= for limiting, turning backlight off completely for some backlight settings. Fix that. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-16backlight: lcd - Fix wrong sizeofJean Delvare1-1/+1
Which is why I have always preferred sizeof(struct foo) over sizeof(var). Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-16hwmon: (adt7475) Fix sysfs file namesJean Delvare1-6/+6
The adt7475 driver creates pwm#_auto_channel_temp attributes instead of the standard pwm#_auto_channels_temp. Fix it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Cc: Jordan Crouse <jordan@cosmicpenguin.net>
2009-11-16hwmon: (adt7475) Cache limits for 60 secondsJean Delvare1-1/+1
The comment says that limits are cached for 60 seconds but the code actually caches them for only 2 seconds. Align the code on the comment, as 60 seconds makes more sense. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Cc: Jordan Crouse <jordan@cosmicpenguin.net>
2009-11-16hwmon: (adt7475) Fix temperature fault flagsJean Delvare1-2/+1
The logic of temperature fault flags is wrong, it shows faults when there are none and vice versa. Fix it. I can't believe this has been broken since the driver was added, 8 months ago, basically breaking temp1 and temp3, and nobody ever complained. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Cc: Jordan Crouse <jordan@cosmicpenguin.net>
2009-11-16hwmon: (s3c-hwmon) Ignore invalid divider settingsBen Dooks1-2/+9
Avoid registering channels that have zero divider settings in them, as this will only lead to kernel OOPS from divide-by-zero when the sysfs entry is read. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-11-16regulator: Fix check of unsigned return value and transmit errors in wm831x_gp_ldo_get_mode()Roel Kluin1-3/+3
If ret is unsigned, the checks for negative wm831x_reg_read() return values are wrong. The error value should be transmitted to its caller, e.g. wm831x_gp_ldo_get_status() which tests for a negative return value. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-11-16regulator: Handle missing constraints in _regulator_disable()Mark Brown1-1/+2
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-11-16ALSA: ice1724 - make some bitfields unsignedDan Carpenter1-2/+2
This is a clean up and doesn't change the behavior. Bit fields should always be unsigned. Otherwise pm_suspend_enabled will be -1 when you want it to be 1. The other bad thing is that the sparse checker will complain 36 times if they aren't unsigned. The other bitfields in that struct are unsigned already. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-15Makefile: Add -Wmising-prototypes to HOSTCFLAGSJosh Triplett1-1/+1
Now that all host programs use static for all private functions and forward prototypes for all extern functions, add -Wmissing-prototypes to HOSTCFLAGS in the hopes of keeping it that way. All versions of GCC supported by the kernel handle -Wmissing-prototypes. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-15oss: Mark loadhex static in hex2hex.cJosh Triplett1-1/+1
Nothing outside of hex2hex.c references loadhex. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-15dtc: Mark various internal functions staticJosh Triplett3-3/+3
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-15dtc: Set "noinput" in the lexer to avoid an unused functionJosh Triplett2-17/+54
Regenerate the corresponding generated lexer. Regenerating the lexer with current flex also provides prototypes for various yy* functions, making some -Wmissing-prototypes warnings go away as well. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-15drm: radeon: Mark several functions static in mkregtableJosh Triplett1-6/+6
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-15arch/sparc/boot/*.c: Mark various internal functions staticJosh Triplett3-10/+10
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-15arch/powerpc/boot/addRamDisk.c: Mark several internal functions staticJosh Triplett1-3/+3
Nothing outside of arch/powerpc/boot/addRamDisk.c references the functions "get4k", "put4k", or "death". Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-15arch/alpha/boot/tools/objstrip.c: Mark "usage" staticJosh Triplett1-1/+1
Nothing outside of arch/alpha/boot/tools/objstrip.c references the usage function. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-15Documentation/vm/page-types.c: Declare checked_open staticJosh Triplett1-1/+1
Nothing outside of Documentation/vm/page-types.c references checked_open. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-15genksyms: Mark is_reserved_word staticJosh Triplett2-45/+52
The genksyms keyword gperf hash provides a function is_reserved_word. genksyms #includes the resulting generated file keywords.c, so the function gets used only in the same source file that defines it. Mark is_reserved_word static, and regenerate the corresponding generated file. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-15kconfig: Mark various internal functions staticJosh Triplett6-15/+32
kconfig's keyword hash, lexer, and parser define various functions used only locally. Declare these functions as static, and regenerate the corresponding generated files. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-15ALSA: hda - Dell Studio 1557 hd-audio quirkDaniel J Blueman1-0/+2
Add the Dell Studio 15 (model 1557, Core i7) laptop to the hd-audio quirk list, enabling audio. Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-15nilfs2: deleted inconsistent comment in nilfs_load_inode_block()Jiro SEKIBA1-1/+0
The comment says, "Caller of this function MUST lock s_inode_lock", however just above the comment, it locks s_inode_lock in the function. Signed-off-by: Jiro SEKIBA <jir@unicus.jp> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
2009-11-15nilfs2: deleted struct nilfs_dat_group_descJiro SEKIBA1-9/+0
struct nilfs_dat_group_desc is not used both in kernel and user spaces. struct nilfs_palloc_group_desc is used instead. Signed-off-by: Jiro SEKIBA <jir@unicus.jp> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
2009-11-14fix memory leak in fixed btusb_closeOliver Neukum1-1/+3
If the waker is killed before it can replay outstanding URBs, these URBs won't be freed or will be replayed at the next open. This patch closes the window by explicitely discarding outstanding URBs. Signed-off-by: Oliver Neukum <oliver@neukum.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-11-14Fix memory corruption caused by nfsd readdir+Petr Vandrovec1-1/+1
Commit 8177e6d6dfb9cd03d9bdeb647c32161f8f58f686 ("nfsd: clean up readdirplus encoding") introduced single character typo in nfs3 readdir+ implementation. Unfortunately that typo has quite bad side effects: random memory corruption, followed (on my box) with immediate spontaneous box reboot. Using 'p1' instead of 'p' fixes my Linux box rebooting whenever VMware ESXi box tries to list contents of my home directory. Signed-off-by: Petr Vandrovec <petr@vandrovec.name> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-11-14ALSA: ice1724 - Fix section mismatch in prodigy_hd2_resume()Takashi Iwai1-1/+1
Remove invlid __devinit prefix from the suspend callback. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-13[ARM] Kirkwood: disable propagation of mbus error to the CPU local busLennert Buytenhek2-0/+11
Disable propagation of mbus errors to the CPU local bus, as this causes mbus errors (which can occur for example for PCI aborts) to throw CPU aborts, which we're not set up to deal with. Reported-by: Dieter Kiermaier <dk-arm-linux@gmx.de> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: Nicolas Pitre <nico@marvell.com>
2009-11-13MIPS: SMTC: Fix lockup in smtc_distribute_timerKevin D. Kissell1-1/+2
1. At the end of smtc_distribute_timer, nextstamp is valid and has already passed so we goto repeat. 2. Nothing updates nextstamp (only updated if the timeout is in the future And we just decided it is in the past) 3. At the end nextstamp still has the same value so it is still valid and in the past. 4. This repeats until read_c0_count has a value which causes nextstamp to be in the future. Reported and initial patch and testing by Mikael Starvik <mikael.starvik@axis.com>. Signed-off-by: Kevin D. Kissell <kevink@paralogos.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Cc: linux-mips@linux-mips.org Cc: Jesper Nilsson <Jesper.Nilsson@axis.com> Patchwork: http://patchwork.linux-mips.org/patch/621/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-11-13MIPS: TXx9: Update rbtx49xx_defconfigAtsushi Nemoto1-60/+192
Enable following features: * MTD (RBTX4939, NAND_TXX9NDFMC) * HW_RANDOM (HW_RANDOM_TX4939) * SOUND (SND_SOC_TXX9ACLC) * DMADEVICE (TXX9_DMAC) Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-11-13MIPS: Make local arrays with CL_SIZE static __initdataAtsushi Nemoto4-5/+6
Since commit 22242681cff52bfb7cba5d2a37b91802be7a4e4c ("MIPS: Extend COMMAND_LINE_SIZE"), CL_SIZE is 4096 and local array variables with this size will cause an build failure with default CONFIG_FRAME_WARN settings. Although current users of such array variables are all early bootstrap code and not likely to cause real stack overflow (thread_info corruption), it is preferable to to declare these arrays static with __initdata. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-11-13MIPS: Add DMA declare coherent memory supportYoichi Yuasa3-10/+9
The ohci-sm501 driver requires dma_declare_coherent_memory(). It is used by the driver's local memory allocation with dma_alloc_coherent(). Tested on TANBAC TB0287(VR4131 + SM501). [Ralf: Fixed reject in dma-default.c and removed the entire #if 0'ed block in dma-mapping.h instead of just the #if 0.] Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-11-13MIPS: Fix emulation of 64-bit FPU on FPU-less 64-bit CPUs.David Daney1-20/+21
Running a 64-bit kernel on a 64-bit CPU without an FPU would cause the emulator to run in 32-bit mode. The c0_Status.FR bit is wired to zero on systems without an FPU, so using that bit to decide how the emulator behaves doesn't allow for proper emulation on 64-bit FPU-less processors. Instead, we need to select the emulator mode based on the user-space ABI. Since the thread flag TIF_32BIT_REGS is used to set c0_Status.FR, we can just use it to decide if the emulator should be in 32-bit or 64-bit mode. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>