Skip to content

Commit

Permalink
Merge branch 'akpm' (Andrew's tree)
Browse files Browse the repository at this point in the history
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()
  • Loading branch information
Linus Torvalds committed Feb 9, 2012
2 parents e862f2e + 025e4ab commit 15a4635
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
4 changes: 2 additions & 2 deletions drivers/leds/leds-lm3530.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ static int lm3530_init_registers(struct lm3530_data *drvdata)

if (drvdata->mode == LM3530_BL_MODE_ALS) {
if (pltfm->als_vmax == 0) {
pltfm->als_vmin = als_vmin = 0;
pltfm->als_vmin = als_vmax = LM3530_ALS_WINDOW_mV;
pltfm->als_vmin = 0;
pltfm->als_vmax = LM3530_ALS_WINDOW_mV;
}

als_vmin = pltfm->als_vmin;
Expand Down
4 changes: 1 addition & 3 deletions drivers/pcmcia/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,10 +1269,8 @@ static int pcmcia_bus_add(struct pcmcia_socket *skt)

static int pcmcia_bus_early_resume(struct pcmcia_socket *skt)
{
if (!verify_cis_cache(skt)) {
pcmcia_put_socket(skt);
if (!verify_cis_cache(skt))
return 0;
}

dev_dbg(&skt->dev, "cis mismatch - different card\n");

Expand Down
2 changes: 2 additions & 0 deletions fs/nilfs2/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,8 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp,
nsegs = argv[4].v_nmembs;
if (argv[4].v_size != argsz[4])
goto out;
if (nsegs > UINT_MAX / sizeof(__u64))
goto out;

/*
* argv[4] points to segment numbers this ioctl cleans. We
Expand Down
11 changes: 10 additions & 1 deletion mm/compaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,17 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone,
continue;
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);
if (page_zone(page) != zone)
continue;

/* Skip if free */
if (PageBuddy(page))
continue;

Expand Down
4 changes: 2 additions & 2 deletions mm/huge_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2083,7 +2083,7 @@ static void collect_mm_slot(struct mm_slot *mm_slot)
{
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)) {
/* free mm_slot */
Expand Down Expand Up @@ -2113,7 +2113,7 @@ static unsigned int khugepaged_scan_mm_slot(unsigned int pages,
int progress = 0;

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)
mm_slot = khugepaged_scan.mm_slot;
Expand Down
2 changes: 1 addition & 1 deletion mm/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ void lru_add_page_tail(struct zone* zone,
VM_BUG_ON(!PageHead(page));
VM_BUG_ON(PageCompound(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);

Expand Down

0 comments on commit 15a4635

Please sign in to comment.