Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
"13 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
mm: add missing __PAGETABLE_{PUD,PMD}_FOLDED defines
mm: page_alloc: revert inadvertent !__GFP_FS retry behavior change
kernel/sys.c: fix UNAME26 for 4.0
mm: memcontrol: use "max" instead of "infinity" in control knobs
zram: use proper type to update max_used_pages
drivers/rtc/rtc-ds1685.c: fix conditional in ds1685_rtc_sysfs_time_regs_{show,store}
nilfs2: fix potential memory overrun on inode
scripts/gdb: add empty package initialization script
rtc: ds1685: remove superfluous checks for out-of-range u8 values
rtc: ds1685: fix ds1685_rtc_alarm_irq_enable build error
memcg: fix low limit calculation
mm/nommu: fix memory leak
ocfs2: update web page + git tree in documentation

+90 -35
+2 -2
Documentation/cgroups/unified-hierarchy.txt
··· 404 404 be understood as an underflow into the highest possible value, -2 or 405 405 -10M etc. do not work, so it's not consistent. 406 406 407 - memory.low, memory.high, and memory.max will use the string 408 - "infinity" to indicate and set the highest possible value. 407 + memory.low, memory.high, and memory.max will use the string "max" to 408 + indicate and set the highest possible value. 409 409 410 410 5. Planned Changes 411 411
+2 -2
Documentation/filesystems/dlmfs.txt
··· 5 5 6 6 dlmfs is built with OCFS2 as it requires most of its infrastructure. 7 7 8 - Project web page: http://oss.oracle.com/projects/ocfs2 9 - Tools web page: http://oss.oracle.com/projects/ocfs2-tools 8 + Project web page: http://ocfs2.wiki.kernel.org 9 + Tools web page: https://github.com/markfasheh/ocfs2-tools 10 10 OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/ 11 11 12 12 All code copyright 2005 Oracle except when otherwise noted.
+2 -2
Documentation/filesystems/ocfs2.txt
··· 8 8 You'll want to install the ocfs2-tools package in order to at least 9 9 get "mount.ocfs2" and "ocfs2_hb_ctl". 10 10 11 - Project web page: http://oss.oracle.com/projects/ocfs2 12 - Tools web page: http://oss.oracle.com/projects/ocfs2-tools 11 + Project web page: http://ocfs2.wiki.kernel.org 12 + Tools git tree: https://github.com/markfasheh/ocfs2-tools 13 13 OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/ 14 14 15 15 All code copyright 2005 Oracle except when otherwise noted.
+1 -2
MAINTAINERS
··· 7213 7213 M: Mark Fasheh <mfasheh@suse.com> 7214 7214 M: Joel Becker <jlbec@evilplan.org> 7215 7215 L: ocfs2-devel@oss.oracle.com (moderated for non-subscribers) 7216 - W: http://oss.oracle.com/projects/ocfs2/ 7217 - T: git git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2.git 7216 + W: http://ocfs2.wiki.kernel.org 7218 7217 S: Supported 7219 7218 F: Documentation/filesystems/ocfs2.txt 7220 7219 F: Documentation/filesystems/dlmfs.txt
+2
arch/frv/include/asm/pgtable.h
··· 123 123 #define PGDIR_MASK (~(PGDIR_SIZE - 1)) 124 124 #define PTRS_PER_PGD 64 125 125 126 + #define __PAGETABLE_PUD_FOLDED 126 127 #define PUD_SHIFT 26 127 128 #define PTRS_PER_PUD 1 128 129 #define PUD_SIZE (1UL << PUD_SHIFT) 129 130 #define PUD_MASK (~(PUD_SIZE - 1)) 130 131 #define PUE_SIZE 256 131 132 133 + #define __PAGETABLE_PMD_FOLDED 132 134 #define PMD_SHIFT 26 133 135 #define PMD_SIZE (1UL << PMD_SHIFT) 134 136 #define PMD_MASK (~(PMD_SIZE - 1))
+1
arch/m32r/include/asm/pgtable-2level.h
··· 13 13 * the M32R is two-level, so we don't really have any 14 14 * PMD directory physically. 15 15 */ 16 + #define __PAGETABLE_PMD_FOLDED 16 17 #define PMD_SHIFT 22 17 18 #define PTRS_PER_PMD 1 18 19
+2
arch/m68k/include/asm/pgtable_mm.h
··· 54 54 */ 55 55 #ifdef CONFIG_SUN3 56 56 #define PTRS_PER_PTE 16 57 + #define __PAGETABLE_PMD_FOLDED 57 58 #define PTRS_PER_PMD 1 58 59 #define PTRS_PER_PGD 2048 59 60 #elif defined(CONFIG_COLDFIRE) 60 61 #define PTRS_PER_PTE 512 62 + #define __PAGETABLE_PMD_FOLDED 61 63 #define PTRS_PER_PMD 1 62 64 #define PTRS_PER_PGD 1024 63 65 #else
+2
arch/mn10300/include/asm/pgtable.h
··· 56 56 #define PGDIR_SHIFT 22 57 57 #define PTRS_PER_PGD 1024 58 58 #define PTRS_PER_PUD 1 /* we don't really have any PUD physically */ 59 + #define __PAGETABLE_PUD_FOLDED 59 60 #define PTRS_PER_PMD 1 /* we don't really have any PMD physically */ 61 + #define __PAGETABLE_PMD_FOLDED 60 62 #define PTRS_PER_PTE 1024 61 63 62 64 #define PGD_SIZE PAGE_SIZE
+1
arch/parisc/include/asm/pgtable.h
··· 96 96 #if PT_NLEVELS == 3 97 97 #define BITS_PER_PMD (PAGE_SHIFT + PMD_ORDER - BITS_PER_PMD_ENTRY) 98 98 #else 99 + #define __PAGETABLE_PMD_FOLDED 99 100 #define BITS_PER_PMD 0 100 101 #endif 101 102 #define PTRS_PER_PMD (1UL << BITS_PER_PMD)
+2
arch/s390/include/asm/pgtable.h
··· 91 91 */ 92 92 #define PTRS_PER_PTE 256 93 93 #ifndef CONFIG_64BIT 94 + #define __PAGETABLE_PUD_FOLDED 94 95 #define PTRS_PER_PMD 1 96 + #define __PAGETABLE_PMD_FOLDED 95 97 #define PTRS_PER_PUD 1 96 98 #else /* CONFIG_64BIT */ 97 99 #define PTRS_PER_PMD 2048
+1 -1
drivers/block/zram/zram_drv.c
··· 528 528 static inline void update_used_max(struct zram *zram, 529 529 const unsigned long pages) 530 530 { 531 - int old_max, cur_max; 531 + unsigned long old_max, cur_max; 532 532 533 533 old_max = atomic_long_read(&zram->stats.max_used_pages); 534 534
+8 -10
drivers/rtc/rtc-ds1685.c
··· 399 399 * of this RTC chip. We check for it anyways in case support is 400 400 * added in the future. 401 401 */ 402 - if (unlikely((seconds >= 0xc0) && (seconds <= 0xff))) 402 + if (unlikely(seconds >= 0xc0)) 403 403 alrm->time.tm_sec = -1; 404 404 else 405 405 alrm->time.tm_sec = ds1685_rtc_bcd2bin(rtc, seconds, 406 406 RTC_SECS_BCD_MASK, 407 407 RTC_SECS_BIN_MASK); 408 408 409 - if (unlikely((minutes >= 0xc0) && (minutes <= 0xff))) 409 + if (unlikely(minutes >= 0xc0)) 410 410 alrm->time.tm_min = -1; 411 411 else 412 412 alrm->time.tm_min = ds1685_rtc_bcd2bin(rtc, minutes, 413 413 RTC_MINS_BCD_MASK, 414 414 RTC_MINS_BIN_MASK); 415 415 416 - if (unlikely((hours >= 0xc0) && (hours <= 0xff))) 416 + if (unlikely(hours >= 0xc0)) 417 417 alrm->time.tm_hour = -1; 418 418 else 419 419 alrm->time.tm_hour = ds1685_rtc_bcd2bin(rtc, hours, ··· 472 472 * field, and we only support four fields. We put the support 473 473 * here anyways for the future. 474 474 */ 475 - if (unlikely((seconds >= 0xc0) && (seconds <= 0xff))) 475 + if (unlikely(seconds >= 0xc0)) 476 476 seconds = 0xff; 477 477 478 - if (unlikely((minutes >= 0xc0) && (minutes <= 0xff))) 478 + if (unlikely(minutes >= 0xc0)) 479 479 minutes = 0xff; 480 480 481 - if (unlikely((hours >= 0xc0) && (hours <= 0xff))) 481 + if (unlikely(hours >= 0xc0)) 482 482 hours = 0xff; 483 483 484 484 alrm->time.tm_mon = -1; ··· 528 528 /* ----------------------------------------------------------------------- */ 529 529 /* /dev/rtcX Interface functions */ 530 530 531 - #ifdef CONFIG_RTC_INTF_DEV 532 531 /** 533 532 * ds1685_rtc_alarm_irq_enable - replaces ioctl() RTC_AIE on/off. 534 533 * @dev: pointer to device structure. ··· 556 557 557 558 return 0; 558 559 } 559 - #endif 560 560 /* ----------------------------------------------------------------------- */ 561 561 562 562 ··· 1610 1612 ds1685_rtc_sysfs_time_regs_lookup(attr->attr.name, false); 1611 1613 1612 1614 /* Make sure we actually matched something. */ 1613 - if (!bcd_reg_info && !bin_reg_info) 1615 + if (!bcd_reg_info || !bin_reg_info) 1614 1616 return -EINVAL; 1615 1617 1616 1618 /* bcd_reg_info->reg == bin_reg_info->reg. */ ··· 1648 1650 return -EINVAL; 1649 1651 1650 1652 /* Make sure we actually matched something. */ 1651 - if (!bcd_reg_info && !bin_reg_info) 1653 + if (!bcd_reg_info || !bin_reg_info) 1652 1654 return -EINVAL; 1653 1655 1654 1656 /* Check for a valid range. */
+44 -3
fs/nilfs2/btree.c
··· 31 31 #include "alloc.h" 32 32 #include "dat.h" 33 33 34 + static void __nilfs_btree_init(struct nilfs_bmap *bmap); 35 + 34 36 static struct nilfs_btree_path *nilfs_btree_alloc_path(void) 35 37 { 36 38 struct nilfs_btree_path *path; ··· 365 363 printk(KERN_CRIT "NILFS: bad btree node (blocknr=%llu): " 366 364 "level = %d, flags = 0x%x, nchildren = %d\n", 367 365 (unsigned long long)blocknr, level, flags, nchildren); 366 + ret = 1; 367 + } 368 + return ret; 369 + } 370 + 371 + /** 372 + * nilfs_btree_root_broken - verify consistency of btree root node 373 + * @node: btree root node to be examined 374 + * @ino: inode number 375 + * 376 + * Return Value: If node is broken, 1 is returned. Otherwise, 0 is returned. 377 + */ 378 + static int nilfs_btree_root_broken(const struct nilfs_btree_node *node, 379 + unsigned long ino) 380 + { 381 + int level, flags, nchildren; 382 + int ret = 0; 383 + 384 + level = nilfs_btree_node_get_level(node); 385 + flags = nilfs_btree_node_get_flags(node); 386 + nchildren = nilfs_btree_node_get_nchildren(node); 387 + 388 + if (unlikely(level < NILFS_BTREE_LEVEL_NODE_MIN || 389 + level > NILFS_BTREE_LEVEL_MAX || 390 + nchildren < 0 || 391 + nchildren > NILFS_BTREE_ROOT_NCHILDREN_MAX)) { 392 + pr_crit("NILFS: bad btree root (inode number=%lu): level = %d, flags = 0x%x, nchildren = %d\n", 393 + ino, level, flags, nchildren); 368 394 ret = 1; 369 395 } 370 396 return ret; ··· 1743 1713 1744 1714 /* convert and insert */ 1745 1715 dat = NILFS_BMAP_USE_VBN(btree) ? nilfs_bmap_get_dat(btree) : NULL; 1746 - nilfs_btree_init(btree); 1716 + __nilfs_btree_init(btree); 1747 1717 if (nreq != NULL) { 1748 1718 nilfs_bmap_commit_alloc_ptr(btree, dreq, dat); 1749 1719 nilfs_bmap_commit_alloc_ptr(btree, nreq, dat); ··· 2324 2294 .bop_gather_data = NULL, 2325 2295 }; 2326 2296 2327 - int nilfs_btree_init(struct nilfs_bmap *bmap) 2297 + static void __nilfs_btree_init(struct nilfs_bmap *bmap) 2328 2298 { 2329 2299 bmap->b_ops = &nilfs_btree_ops; 2330 2300 bmap->b_nchildren_per_block = 2331 2301 NILFS_BTREE_NODE_NCHILDREN_MAX(nilfs_btree_node_size(bmap)); 2332 - return 0; 2302 + } 2303 + 2304 + int nilfs_btree_init(struct nilfs_bmap *bmap) 2305 + { 2306 + int ret = 0; 2307 + 2308 + __nilfs_btree_init(bmap); 2309 + 2310 + if (nilfs_btree_root_broken(nilfs_btree_get_root(bmap), 2311 + bmap->b_inode->i_ino)) 2312 + ret = -EIO; 2313 + return ret; 2333 2314 } 2334 2315 2335 2316 void nilfs_btree_init_gc(struct nilfs_bmap *bmap)
+2 -1
kernel/sys.c
··· 1108 1108 /* 1109 1109 * Work around broken programs that cannot handle "Linux 3.0". 1110 1110 * Instead we map 3.x to 2.6.40+x, so e.g. 3.0 would be 2.6.40 1111 + * And we map 4.x to 2.6.60+x, so 4.0 would be 2.6.60. 1111 1112 */ 1112 1113 static int override_release(char __user *release, size_t len) 1113 1114 { ··· 1128 1127 break; 1129 1128 rest++; 1130 1129 } 1131 - v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 40; 1130 + v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 60; 1132 1131 copy = clamp_t(size_t, len, 1, sizeof(buf)); 1133 1132 copy = scnprintf(buf, copy, "2.6.%u%s", v, rest); 1134 1133 ret = copy_to_user(release, buf, copy + 1);
+8 -8
mm/memcontrol.c
··· 5247 5247 unsigned long low = ACCESS_ONCE(memcg->low); 5248 5248 5249 5249 if (low == PAGE_COUNTER_MAX) 5250 - seq_puts(m, "infinity\n"); 5250 + seq_puts(m, "max\n"); 5251 5251 else 5252 5252 seq_printf(m, "%llu\n", (u64)low * PAGE_SIZE); 5253 5253 ··· 5262 5262 int err; 5263 5263 5264 5264 buf = strstrip(buf); 5265 - err = page_counter_memparse(buf, "infinity", &low); 5265 + err = page_counter_memparse(buf, "max", &low); 5266 5266 if (err) 5267 5267 return err; 5268 5268 ··· 5277 5277 unsigned long high = ACCESS_ONCE(memcg->high); 5278 5278 5279 5279 if (high == PAGE_COUNTER_MAX) 5280 - seq_puts(m, "infinity\n"); 5280 + seq_puts(m, "max\n"); 5281 5281 else 5282 5282 seq_printf(m, "%llu\n", (u64)high * PAGE_SIZE); 5283 5283 ··· 5292 5292 int err; 5293 5293 5294 5294 buf = strstrip(buf); 5295 - err = page_counter_memparse(buf, "infinity", &high); 5295 + err = page_counter_memparse(buf, "max", &high); 5296 5296 if (err) 5297 5297 return err; 5298 5298 ··· 5307 5307 unsigned long max = ACCESS_ONCE(memcg->memory.limit); 5308 5308 5309 5309 if (max == PAGE_COUNTER_MAX) 5310 - seq_puts(m, "infinity\n"); 5310 + seq_puts(m, "max\n"); 5311 5311 else 5312 5312 seq_printf(m, "%llu\n", (u64)max * PAGE_SIZE); 5313 5313 ··· 5322 5322 int err; 5323 5323 5324 5324 buf = strstrip(buf); 5325 - err = page_counter_memparse(buf, "infinity", &max); 5325 + err = page_counter_memparse(buf, "max", &max); 5326 5326 if (err) 5327 5327 return err; 5328 5328 ··· 5426 5426 if (memcg == root_mem_cgroup) 5427 5427 return false; 5428 5428 5429 - if (page_counter_read(&memcg->memory) > memcg->low) 5429 + if (page_counter_read(&memcg->memory) >= memcg->low) 5430 5430 return false; 5431 5431 5432 5432 while (memcg != root) { ··· 5435 5435 if (memcg == root_mem_cgroup) 5436 5436 break; 5437 5437 5438 - if (page_counter_read(&memcg->memory) > memcg->low) 5438 + if (page_counter_read(&memcg->memory) >= memcg->low) 5439 5439 return false; 5440 5440 } 5441 5441 return true;
+1 -3
mm/nommu.c
··· 1213 1213 if (sysctl_nr_trim_pages && total - point >= sysctl_nr_trim_pages) { 1214 1214 total = point; 1215 1215 kdebug("try to alloc exact %lu pages", total); 1216 - base = alloc_pages_exact(len, GFP_KERNEL); 1217 - } else { 1218 - base = (void *)__get_free_pages(GFP_KERNEL, order); 1219 1216 } 1220 1217 1218 + base = alloc_pages_exact(total << PAGE_SHIFT, GFP_KERNEL); 1221 1219 if (!base) 1222 1220 goto enomem; 1223 1221
+8 -1
mm/page_alloc.c
··· 2353 2353 if (ac->high_zoneidx < ZONE_NORMAL) 2354 2354 goto out; 2355 2355 /* The OOM killer does not compensate for light reclaim */ 2356 - if (!(gfp_mask & __GFP_FS)) 2356 + if (!(gfp_mask & __GFP_FS)) { 2357 + /* 2358 + * XXX: Page reclaim didn't yield anything, 2359 + * and the OOM killer can't be invoked, but 2360 + * keep looping as per should_alloc_retry(). 2361 + */ 2362 + *did_some_progress = 1; 2357 2363 goto out; 2364 + } 2358 2365 /* 2359 2366 * GFP_THISNODE contains __GFP_NORETRY and we never hit this. 2360 2367 * Sanity check for bare calls of __GFP_THISNODE, not real OOM.
+1
scripts/gdb/linux/__init__.py
··· 1 + # nothing to do for the initialization of this package