linux/drivers
Roel Kluin 4750498099 mm: get_nid_for_pfn() returns int
get_nid_for_pfn() returns int

Presumably the (nid < 0) case has never happened.

We do know that it is happening on one system while creating a symlink for
a memory section so it should also happen on the same system if
unregister_mem_sect_under_nodes() were called to remove the same symlink.

The test was actually added in response to a problem with an earlier
version reported by Yasunori Goto where one or more of the leading pages
of a memory section on the 2nd node of one of his systems was
uninitialized because I believe they coincided with a memory hole.

That earlier version did not ignore uninitialized pages and determined
the nid by considering only the 1st page of each memory section.  This
caused the symlink to the 1st memory section on the 2nd node to be
incorrectly created in /sys/devices/system/node/node0 instead of
/sys/devices/system/node/node1.  The problem was fixed by adding the
test to skip over uninitialized pages.

I suspect we have not seen any reports of the non-removal
of a symlink due to the incorrect declaration of the nid
variable in unregister_mem_sect_under_nodes() because
  - systems where a memory section could have an uninitialized
    range of leading pages are probably rare.
  - memory remove is probably not done very frequently on the
    systems that are capable of demonstrating the problem.
  - lingering symlink(s) that should have been removed may
    have simply gone unnoticed.

[garyhade@us.ibm.com: wrote changelog]
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Gary Hade <garyhade@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-10 15:55:10 -07:00
..
accessibility
acpi Merge branches 'release', 'bugzilla-12011', 'bugzilla-12632', 'misc' and 'suspend' into release 2009-02-21 22:01:43 -05:00
amba [ARM] Fix realview build 2009-01-08 16:29:41 +00:00
ata libata: Don't trust current capacity values in identify words 57-58 2009-03-05 07:26:10 -05:00
atm ATM: misplaced parentheses? 2009-02-18 17:41:38 -08:00
auxdisplay
base mm: get_nid_for_pfn() returns int 2009-03-10 15:55:10 -07:00
block Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-03-09 09:15:40 -07:00
bluetooth
cdrom
char m68k: atari - Rename "mfp" to "st_mfp" 2009-02-22 09:23:02 -08:00
clocksource Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-02 11:44:09 -08:00
connector
cpufreq Revert "[CPUFREQ] Disable sysfs ui for p4-clockmod." 2009-03-09 15:07:33 -04:00
cpuidle cpuidle: Add decaying history logic to menu idle predictor 2008-12-30 18:48:01 -05:00
crypto crypto: ixp4xx - Fix qmgr_request_queue build failure 2009-03-04 08:01:22 +08:00
dca I/OAT: update driver version and copyright dates 2009-03-04 16:04:40 -07:00
dio m68k: dio - Kill resource_size_t format warnings 2009-01-12 20:56:42 +01:00
dma Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx 2009-03-08 10:23:05 -07:00
edac powerpc: More printing warning fixes for the l64 to ll64 conversion 2009-01-28 17:15:52 +11:00
eisa
firewire firewire: core: Remove card from list of cards when enable fails 2009-02-01 11:17:24 +01:00
firmware Bernhard has moved 2009-02-18 15:37:56 -08:00
gpio gpiolib: fix request related issue 2009-01-29 18:04:43 -08:00
gpu drm: fix double lock typo 2009-03-04 21:49:14 +10:00
hid HID: move tmff and zpff devices from ignore_list to blacklist 2009-02-17 13:25:01 +01:00
hwmon lis3lv02d: add axes knowledge of HP Pavilion dv5 models 2009-02-18 15:37:54 -08:00
i2c Merge master.kernel.org:/home/rmk/linux-2.6-arm 2009-03-03 14:12:41 -08:00
ide ide: add at91_ide driver 2009-03-05 16:10:58 +01:00
idle i7300_idle: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:39 -08:00
ieee1394 Make ieee1394_init a fs-initcall 2009-02-26 10:32:31 -08:00
infiniband Merge branches 'ehca', 'ipoib' and 'mlx4' into for-linus 2009-01-16 15:05:54 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2009-03-02 15:43:03 -08:00
isdn ISDN: fix sc/shmem printk format warning 2009-02-20 00:54:44 -08:00
leds lis3lv02d: merge with leds hp disk 2009-01-15 16:39:40 -08:00
lguest lguest: fix for CONFIG_SPARSE_IRQ=y 2009-03-09 10:06:29 +10:30
macintosh Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-01-07 11:31:52 -08:00
mca
md md: fix deadlock when stopping arrays 2009-03-04 00:57:25 -07:00
media Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2009-03-02 15:43:03 -08:00
memstick memstick: annotate endianness of attribute structs 2009-01-09 16:54:41 -08:00
message [SCSI] mpt: fix disable lsi sas to use msi as default 2009-02-22 08:51:07 -06:00
mfd mfd: Fix sm501_register_gpio section mismatch 2009-02-17 09:48:05 +01:00
misc hpilo: new pci device 2009-02-27 16:26:22 -08:00
mmc mmc: fix data timeout for SEND_EXT_CSD 2009-03-08 14:46:04 +01:00
mtd Merge master.kernel.org:/home/rmk/linux-2.6-arm 2009-03-03 14:12:41 -08:00
net p54: fix race condition in memory management 2009-03-06 15:54:32 -05:00
nubus
of drivers/of: Add the of_find_i2c_device_by_node function. 2009-01-09 15:49:06 -07:00
oprofile oprofile: fix uninitialized use of struct op_entry 2009-01-17 17:26:39 +01:00
parisc Documentation: move DMA-mapping.txt to Doc/PCI/ 2009-01-29 18:19:29 -08:00
parport m68k: atari - Rename "mfp" to "st_mfp" 2009-02-22 09:23:02 -08:00
pci Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-02-26 14:43:42 -08:00
pcmcia powerpc: Change u64/s64 to a long long integer type 2009-01-13 14:47:59 +11:00
platform fujitsu-laptop: Use RFKILL support bitmask from firmware 2009-02-21 21:59:55 -05:00
pnp Merge branch 'linus' into release 2009-01-09 03:39:43 -05:00
power pcf50633_charger: Fix typo 2009-02-02 19:53:02 +03:00
ps3 powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/ps3 2009-01-16 16:15:14 +11:00
rapidio rapidio: remove excess kernel-doc notation 2009-01-06 15:59:28 -08:00
regulator leds: Fix bounds checking of wm8350->pmic.led 2009-01-30 21:50:49 +00:00
rtc rtc: t reaches -1, tested 0 2009-02-11 14:25:36 -08:00
s390 [S390] fix "mem=" handling in case of standby memory 2009-02-19 15:19:19 +01:00
sbus sparc64: Fix unsigned long long warnings in drivers. 2009-01-06 13:20:38 -08:00
scsi [SCSI] fix ABORTED_COMMAND looping forever problem 2009-02-21 20:29:38 -06:00
serial Merge branch 'sh/for-2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2009-02-27 16:40:00 -08:00
sh
sn
spi spi-gpio: sanitize MISO bitvalue 2009-02-18 15:37:56 -08:00
ssb
staging Staging: w35und: fix usb_control_msg() error handling in wb35_probe() 2009-02-27 12:56:24 -08:00
tc
telephony
thermal thermal: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:37 -08:00
uio UIO: Pass information about ioports to userspace (V2) 2009-01-06 10:44:44 -08:00
usb USB: musb: fix srp sysfs entry deletion 2009-02-27 14:40:51 -08:00
uwb uwb: lock rc->rsvs_lock with spin_lock_bh() 2009-01-23 12:57:20 +00:00
video video: deferred io cleanup fix for sh_mobile_lcdcfb 2009-03-10 15:23:01 +09:00
virtio virtio-pci: do not oops on config change if driver not loaded 2009-02-02 19:17:56 -08:00
w1 w1: add missing Kconfig/Makefile entries for DS2431 slave driver 2009-02-27 16:26:21 -08:00
watchdog [WATCHDOG] orion5x_wdt.c: 'ORION5X_TCLK' undeclared 2009-03-05 19:25:05 +00:00
xen PM: Split up sysdev_[suspend|resume] from device_power_[down|up] 2009-02-22 10:33:44 -08:00
zorro m68k: zorro - Use %pR to print resources 2009-01-12 20:56:43 +01:00
Kconfig
Makefile Merge branch 'drivers-platform' into release 2009-01-09 04:56:56 -05:00