Merge branch 'akpm' (Andrew's patch-bomb)
Merge fixes from Andrew Morton: "13 fixes. The acerhdf patches aren't (really) fixes. But they've been stuck in my tree for up to two years, sent to Matthew multiple times and the developers are unhappy." * emailed from Andrew Morton <akpm@linux-foundation.org>: (13 patches) mm: fix NULL ptr dereference in move_pages mm: fix NULL ptr dereference in migrate_pages revert "proc: clear_refs: do not clear reserved pages" drivers/rtc/rtc-ds1307.c: fix BUG shown with lock debugging enabled arch/arm/mach-ux500/mbox-db5500.c: world-writable sysfs fifo file hugetlbfs: lockdep annotate root inode properly acerhdf: lowered default temp fanon/fanoff values acerhdf: add support for new hardware acerhdf: add support for Aspire 1410 BIOS v1.3314 fs/buffer.c: remove BUG() in possible but rare condition mm: fix up the vmscan stat in vmstat epoll: clear the tfile_check_list on -ELOOP mm/hugetlb: fix warning in alloc_huge_page/dequeue_huge_page_vma
This commit is contained in:
commit
110a5c8b38
|
@ -168,7 +168,7 @@ static ssize_t mbox_read_fifo(struct device *dev,
|
|||
return sprintf(buf, "0x%X\n", mbox_value);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(fifo, S_IWUGO | S_IRUGO, mbox_read_fifo, mbox_write_fifo);
|
||||
static DEVICE_ATTR(fifo, S_IWUSR | S_IRUGO, mbox_read_fifo, mbox_write_fifo);
|
||||
|
||||
static int mbox_show(struct seq_file *s, void *data)
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
*/
|
||||
#undef START_IN_KERNEL_MODE
|
||||
|
||||
#define DRV_VER "0.5.24"
|
||||
#define DRV_VER "0.5.26"
|
||||
|
||||
/*
|
||||
* According to the Atom N270 datasheet,
|
||||
|
@ -83,8 +83,8 @@ static int kernelmode;
|
|||
#endif
|
||||
|
||||
static unsigned int interval = 10;
|
||||
static unsigned int fanon = 63000;
|
||||
static unsigned int fanoff = 58000;
|
||||
static unsigned int fanon = 60000;
|
||||
static unsigned int fanoff = 53000;
|
||||
static unsigned int verbose;
|
||||
static unsigned int fanstate = ACERHDF_FAN_AUTO;
|
||||
static char force_bios[16];
|
||||
|
@ -150,6 +150,8 @@ static const struct bios_settings_t bios_tbl[] = {
|
|||
{"Acer", "AOA150", "v0.3308", 0x55, 0x58, {0x20, 0x00} },
|
||||
{"Acer", "AOA150", "v0.3309", 0x55, 0x58, {0x20, 0x00} },
|
||||
{"Acer", "AOA150", "v0.3310", 0x55, 0x58, {0x20, 0x00} },
|
||||
/* LT1005u */
|
||||
{"Acer", "LT-10Q", "v0.3310", 0x55, 0x58, {0x20, 0x00} },
|
||||
/* Acer 1410 */
|
||||
{"Acer", "Aspire 1410", "v0.3108", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Acer", "Aspire 1410", "v0.3113", 0x55, 0x58, {0x9e, 0x00} },
|
||||
|
@ -161,6 +163,7 @@ static const struct bios_settings_t bios_tbl[] = {
|
|||
{"Acer", "Aspire 1410", "v1.3303", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Acer", "Aspire 1410", "v1.3308", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Acer", "Aspire 1410", "v1.3310", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Acer", "Aspire 1410", "v1.3314", 0x55, 0x58, {0x9e, 0x00} },
|
||||
/* Acer 1810xx */
|
||||
{"Acer", "Aspire 1810TZ", "v0.3108", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Acer", "Aspire 1810T", "v0.3108", 0x55, 0x58, {0x9e, 0x00} },
|
||||
|
@ -183,29 +186,44 @@ static const struct bios_settings_t bios_tbl[] = {
|
|||
{"Acer", "Aspire 1810TZ", "v1.3310", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Acer", "Aspire 1810T", "v1.3310", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Acer", "Aspire 1810TZ", "v1.3314", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Acer", "Aspire 1810T", "v1.3314", 0x55, 0x58, {0x9e, 0x00} },
|
||||
/* Acer 531 */
|
||||
{"Acer", "AO531h", "v0.3104", 0x55, 0x58, {0x20, 0x00} },
|
||||
{"Acer", "AO531h", "v0.3201", 0x55, 0x58, {0x20, 0x00} },
|
||||
{"Acer", "AO531h", "v0.3304", 0x55, 0x58, {0x20, 0x00} },
|
||||
/* Acer 751 */
|
||||
{"Acer", "AO751h", "V0.3212", 0x55, 0x58, {0x21, 0x00} },
|
||||
/* Acer 1825 */
|
||||
{"Acer", "Aspire 1825PTZ", "V1.3118", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Acer", "Aspire 1825PTZ", "V1.3127", 0x55, 0x58, {0x9e, 0x00} },
|
||||
/* Acer TravelMate 7730 */
|
||||
{"Acer", "TravelMate 7730G", "v0.3509", 0x55, 0x58, {0xaf, 0x00} },
|
||||
/* Gateway */
|
||||
{"Gateway", "AOA110", "v0.3103", 0x55, 0x58, {0x21, 0x00} },
|
||||
{"Gateway", "AOA150", "v0.3103", 0x55, 0x58, {0x20, 0x00} },
|
||||
{"Gateway", "LT31", "v1.3103", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Gateway", "LT31", "v1.3201", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Gateway", "LT31", "v1.3302", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Gateway", "AOA110", "v0.3103", 0x55, 0x58, {0x21, 0x00} },
|
||||
{"Gateway", "AOA150", "v0.3103", 0x55, 0x58, {0x20, 0x00} },
|
||||
{"Gateway", "LT31", "v1.3103", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Gateway", "LT31", "v1.3201", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Gateway", "LT31", "v1.3302", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Gateway", "LT31", "v1.3303t", 0x55, 0x58, {0x9e, 0x00} },
|
||||
/* Packard Bell */
|
||||
{"Packard Bell", "DOA150", "v0.3104", 0x55, 0x58, {0x21, 0x00} },
|
||||
{"Packard Bell", "DOA150", "v0.3105", 0x55, 0x58, {0x20, 0x00} },
|
||||
{"Packard Bell", "AOA110", "v0.3105", 0x55, 0x58, {0x21, 0x00} },
|
||||
{"Packard Bell", "AOA150", "v0.3105", 0x55, 0x58, {0x20, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v1.3303", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v0.3120", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v0.3108", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v0.3113", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v0.3115", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v0.3117", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v0.3119", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v1.3204", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMA", "v1.3201", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMA", "v1.3302", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOA150", "v0.3104", 0x55, 0x58, {0x21, 0x00} },
|
||||
{"Packard Bell", "DOA150", "v0.3105", 0x55, 0x58, {0x20, 0x00} },
|
||||
{"Packard Bell", "AOA110", "v0.3105", 0x55, 0x58, {0x21, 0x00} },
|
||||
{"Packard Bell", "AOA150", "v0.3105", 0x55, 0x58, {0x20, 0x00} },
|
||||
{"Packard Bell", "ENBFT", "V1.3118", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "ENBFT", "V1.3127", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v1.3303", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v0.3120", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v0.3108", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v0.3113", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v0.3115", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v0.3117", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v0.3119", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMU", "v1.3204", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMA", "v1.3201", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMA", "v1.3302", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTMA", "v1.3303t", 0x55, 0x58, {0x9e, 0x00} },
|
||||
{"Packard Bell", "DOTVR46", "v1.3308", 0x55, 0x58, {0x9e, 0x00} },
|
||||
/* pewpew-terminator */
|
||||
{"", "", "", 0, 0, {0, 0} }
|
||||
};
|
||||
|
@ -701,15 +719,20 @@ MODULE_LICENSE("GPL");
|
|||
MODULE_AUTHOR("Peter Feuerer");
|
||||
MODULE_DESCRIPTION("Aspire One temperature and fan driver");
|
||||
MODULE_ALIAS("dmi:*:*Acer*:pnAOA*:");
|
||||
MODULE_ALIAS("dmi:*:*Acer*:pnAO751h*:");
|
||||
MODULE_ALIAS("dmi:*:*Acer*:pnAspire*1410*:");
|
||||
MODULE_ALIAS("dmi:*:*Acer*:pnAspire*1810*:");
|
||||
MODULE_ALIAS("dmi:*:*Acer*:pnAspire*1825PTZ:");
|
||||
MODULE_ALIAS("dmi:*:*Acer*:pnAO531*:");
|
||||
MODULE_ALIAS("dmi:*:*Acer*:TravelMate*7730G:");
|
||||
MODULE_ALIAS("dmi:*:*Gateway*:pnAOA*:");
|
||||
MODULE_ALIAS("dmi:*:*Gateway*:pnLT31*:");
|
||||
MODULE_ALIAS("dmi:*:*Packard*Bell*:pnAOA*:");
|
||||
MODULE_ALIAS("dmi:*:*Packard*Bell*:pnDOA*:");
|
||||
MODULE_ALIAS("dmi:*:*Packard*Bell*:pnDOTMU*:");
|
||||
MODULE_ALIAS("dmi:*:*Packard*Bell*:pnENBFT*:");
|
||||
MODULE_ALIAS("dmi:*:*Packard*Bell*:pnDOTMA*:");
|
||||
MODULE_ALIAS("dmi:*:*Packard*Bell*:pnDOTVR46*:");
|
||||
|
||||
module_init(acerhdf_init);
|
||||
module_exit(acerhdf_exit);
|
||||
|
|
|
@ -902,6 +902,7 @@ read_rtc:
|
|||
}
|
||||
ds1307->nvram->attr.name = "nvram";
|
||||
ds1307->nvram->attr.mode = S_IRUGO | S_IWUSR;
|
||||
sysfs_bin_attr_init(ds1307->nvram);
|
||||
ds1307->nvram->read = ds1307_nvram_read,
|
||||
ds1307->nvram->write = ds1307_nvram_write,
|
||||
ds1307->nvram->size = chip->nvram_size;
|
||||
|
|
|
@ -985,7 +985,6 @@ grow_dev_page(struct block_device *bdev, sector_t block,
|
|||
return page;
|
||||
|
||||
failed:
|
||||
BUG();
|
||||
unlock_page(page);
|
||||
page_cache_release(page);
|
||||
return NULL;
|
||||
|
|
|
@ -1663,8 +1663,10 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd,
|
|||
if (op == EPOLL_CTL_ADD) {
|
||||
if (is_file_epoll(tfile)) {
|
||||
error = -ELOOP;
|
||||
if (ep_loop_check(ep, tfile) != 0)
|
||||
if (ep_loop_check(ep, tfile) != 0) {
|
||||
clear_tfile_check_list();
|
||||
goto error_tgt_fput;
|
||||
}
|
||||
} else
|
||||
list_add(&tfile->f_tfile_llink, &tfile_check_list);
|
||||
}
|
||||
|
|
|
@ -485,6 +485,7 @@ static struct inode *hugetlbfs_get_root(struct super_block *sb,
|
|||
inode->i_fop = &simple_dir_operations;
|
||||
/* directory inodes start off with i_nlink == 2 (for "." entry) */
|
||||
inc_nlink(inode);
|
||||
lockdep_annotate_inode_mutex_key(inode);
|
||||
}
|
||||
return inode;
|
||||
}
|
||||
|
|
|
@ -597,9 +597,6 @@ static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr,
|
|||
if (!page)
|
||||
continue;
|
||||
|
||||
if (PageReserved(page))
|
||||
continue;
|
||||
|
||||
/* Clear accessed and referenced bits. */
|
||||
ptep_test_and_clear_young(vma, addr, pte);
|
||||
ClearPageReferenced(page);
|
||||
|
|
|
@ -26,13 +26,14 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
|
|||
PGFREE, PGACTIVATE, PGDEACTIVATE,
|
||||
PGFAULT, PGMAJFAULT,
|
||||
FOR_ALL_ZONES(PGREFILL),
|
||||
FOR_ALL_ZONES(PGSTEAL),
|
||||
FOR_ALL_ZONES(PGSTEAL_KSWAPD),
|
||||
FOR_ALL_ZONES(PGSTEAL_DIRECT),
|
||||
FOR_ALL_ZONES(PGSCAN_KSWAPD),
|
||||
FOR_ALL_ZONES(PGSCAN_DIRECT),
|
||||
#ifdef CONFIG_NUMA
|
||||
PGSCAN_ZONE_RECLAIM_FAILED,
|
||||
#endif
|
||||
PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL,
|
||||
PGINODESTEAL, SLABS_SCANNED, KSWAPD_INODESTEAL,
|
||||
KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY,
|
||||
KSWAPD_SKIP_CONGESTION_WAIT,
|
||||
PAGEOUTRUN, ALLOCSTALL, PGROTATED,
|
||||
|
|
|
@ -532,7 +532,7 @@ static struct page *dequeue_huge_page_vma(struct hstate *h,
|
|||
struct vm_area_struct *vma,
|
||||
unsigned long address, int avoid_reserve)
|
||||
{
|
||||
struct page *page;
|
||||
struct page *page = NULL;
|
||||
struct mempolicy *mpol;
|
||||
nodemask_t *nodemask;
|
||||
struct zonelist *zonelist;
|
||||
|
|
|
@ -1361,11 +1361,14 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
|
|||
|
||||
mm = get_task_mm(task);
|
||||
put_task_struct(task);
|
||||
if (mm)
|
||||
err = do_migrate_pages(mm, old, new,
|
||||
capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
|
||||
else
|
||||
|
||||
if (!mm) {
|
||||
err = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = do_migrate_pages(mm, old, new,
|
||||
capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
|
||||
|
||||
mmput(mm);
|
||||
out:
|
||||
|
|
16
mm/migrate.c
16
mm/migrate.c
|
@ -1388,14 +1388,14 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
|
|||
mm = get_task_mm(task);
|
||||
put_task_struct(task);
|
||||
|
||||
if (mm) {
|
||||
if (nodes)
|
||||
err = do_pages_move(mm, task_nodes, nr_pages, pages,
|
||||
nodes, status, flags);
|
||||
else
|
||||
err = do_pages_stat(mm, nr_pages, pages, status);
|
||||
} else
|
||||
err = -EINVAL;
|
||||
if (!mm)
|
||||
return -EINVAL;
|
||||
|
||||
if (nodes)
|
||||
err = do_pages_move(mm, task_nodes, nr_pages, pages,
|
||||
nodes, status, flags);
|
||||
else
|
||||
err = do_pages_stat(mm, nr_pages, pages, status);
|
||||
|
||||
mmput(mm);
|
||||
return err;
|
||||
|
|
11
mm/vmscan.c
11
mm/vmscan.c
|
@ -1568,9 +1568,14 @@ shrink_inactive_list(unsigned long nr_to_scan, struct mem_cgroup_zone *mz,
|
|||
reclaim_stat->recent_scanned[0] += nr_anon;
|
||||
reclaim_stat->recent_scanned[1] += nr_file;
|
||||
|
||||
if (current_is_kswapd())
|
||||
__count_vm_events(KSWAPD_STEAL, nr_reclaimed);
|
||||
__count_zone_vm_events(PGSTEAL, zone, nr_reclaimed);
|
||||
if (global_reclaim(sc)) {
|
||||
if (current_is_kswapd())
|
||||
__count_zone_vm_events(PGSTEAL_KSWAPD, zone,
|
||||
nr_reclaimed);
|
||||
else
|
||||
__count_zone_vm_events(PGSTEAL_DIRECT, zone,
|
||||
nr_reclaimed);
|
||||
}
|
||||
|
||||
putback_inactive_pages(mz, &page_list);
|
||||
|
||||
|
|
|
@ -738,7 +738,8 @@ const char * const vmstat_text[] = {
|
|||
"pgmajfault",
|
||||
|
||||
TEXTS_FOR_ZONES("pgrefill")
|
||||
TEXTS_FOR_ZONES("pgsteal")
|
||||
TEXTS_FOR_ZONES("pgsteal_kswapd")
|
||||
TEXTS_FOR_ZONES("pgsteal_direct")
|
||||
TEXTS_FOR_ZONES("pgscan_kswapd")
|
||||
TEXTS_FOR_ZONES("pgscan_direct")
|
||||
|
||||
|
@ -747,7 +748,6 @@ const char * const vmstat_text[] = {
|
|||
#endif
|
||||
"pginodesteal",
|
||||
"slabs_scanned",
|
||||
"kswapd_steal",
|
||||
"kswapd_inodesteal",
|
||||
"kswapd_low_wmark_hit_quickly",
|
||||
"kswapd_high_wmark_hit_quickly",
|
||||
|
|
Loading…
Reference in New Issue