Merge branch 'akpm' (Andrew's tree)

Five fixes

* branch 'akpm':
  pcmcia: fix socket refcount decrementing on each resume
  mm: fix UP THP spin_is_locked BUGs
  drivers/leds/leds-lm3530.c: fix setting pltfm->als_vmax
  mm: compaction: check for overlapping nodes during isolation for migration
  nilfs2: avoid overflowing segment numbers in nilfs_ioctl_clean_segments()
This commit is contained in:
Linus Torvalds 2012-02-08 19:04:47 -08:00
commit 15a463532e
6 changed files with 18 additions and 9 deletions

View File

@ -164,8 +164,8 @@ static int lm3530_init_registers(struct lm3530_data *drvdata)
if (drvdata->mode == LM3530_BL_MODE_ALS) { if (drvdata->mode == LM3530_BL_MODE_ALS) {
if (pltfm->als_vmax == 0) { if (pltfm->als_vmax == 0) {
pltfm->als_vmin = als_vmin = 0; pltfm->als_vmin = 0;
pltfm->als_vmin = als_vmax = LM3530_ALS_WINDOW_mV; pltfm->als_vmax = LM3530_ALS_WINDOW_mV;
} }
als_vmin = pltfm->als_vmin; als_vmin = pltfm->als_vmin;

View File

@ -1269,10 +1269,8 @@ static int pcmcia_bus_add(struct pcmcia_socket *skt)
static int pcmcia_bus_early_resume(struct pcmcia_socket *skt) static int pcmcia_bus_early_resume(struct pcmcia_socket *skt)
{ {
if (!verify_cis_cache(skt)) { if (!verify_cis_cache(skt))
pcmcia_put_socket(skt);
return 0; return 0;
}
dev_dbg(&skt->dev, "cis mismatch - different card\n"); dev_dbg(&skt->dev, "cis mismatch - different card\n");

View File

@ -603,6 +603,8 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp,
nsegs = argv[4].v_nmembs; nsegs = argv[4].v_nmembs;
if (argv[4].v_size != argsz[4]) if (argv[4].v_size != argsz[4])
goto out; goto out;
if (nsegs > UINT_MAX / sizeof(__u64))
goto out;
/* /*
* argv[4] points to segment numbers this ioctl cleans. We * argv[4] points to segment numbers this ioctl cleans. We

View File

@ -330,8 +330,17 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone,
continue; continue;
nr_scanned++; nr_scanned++;
/* Get the page and skip if free */ /*
* Get the page and ensure the page is within the same zone.
* See the comment in isolate_freepages about overlapping
* nodes. It is deliberate that the new zone lock is not taken
* as memory compaction should not move pages between nodes.
*/
page = pfn_to_page(low_pfn); page = pfn_to_page(low_pfn);
if (page_zone(page) != zone)
continue;
/* Skip if free */
if (PageBuddy(page)) if (PageBuddy(page))
continue; continue;

View File

@ -2083,7 +2083,7 @@ static void collect_mm_slot(struct mm_slot *mm_slot)
{ {
struct mm_struct *mm = mm_slot->mm; struct mm_struct *mm = mm_slot->mm;
VM_BUG_ON(!spin_is_locked(&khugepaged_mm_lock)); VM_BUG_ON(NR_CPUS != 1 && !spin_is_locked(&khugepaged_mm_lock));
if (khugepaged_test_exit(mm)) { if (khugepaged_test_exit(mm)) {
/* free mm_slot */ /* free mm_slot */
@ -2113,7 +2113,7 @@ static unsigned int khugepaged_scan_mm_slot(unsigned int pages,
int progress = 0; int progress = 0;
VM_BUG_ON(!pages); VM_BUG_ON(!pages);
VM_BUG_ON(!spin_is_locked(&khugepaged_mm_lock)); VM_BUG_ON(NR_CPUS != 1 && !spin_is_locked(&khugepaged_mm_lock));
if (khugepaged_scan.mm_slot) if (khugepaged_scan.mm_slot)
mm_slot = khugepaged_scan.mm_slot; mm_slot = khugepaged_scan.mm_slot;

View File

@ -659,7 +659,7 @@ void lru_add_page_tail(struct zone* zone,
VM_BUG_ON(!PageHead(page)); VM_BUG_ON(!PageHead(page));
VM_BUG_ON(PageCompound(page_tail)); VM_BUG_ON(PageCompound(page_tail));
VM_BUG_ON(PageLRU(page_tail)); VM_BUG_ON(PageLRU(page_tail));
VM_BUG_ON(!spin_is_locked(&zone->lru_lock)); VM_BUG_ON(NR_CPUS != 1 && !spin_is_locked(&zone->lru_lock));
SetPageLRU(page_tail); SetPageLRU(page_tail);