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' (fixes from Andrew Morton)

Merge patches from Andrew Morton:
"22 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (22 commits)
kexec: purgatory: add clean-up for purgatory directory
Documentation/kdump/kdump.txt: add ARM description
flush_icache_range: export symbol to fix build errors
tools: selftests: fix build issue with make kselftests target
ocfs2: quorum: add a log for node not fenced
ocfs2: o2net: set tcp user timeout to max value
ocfs2: o2net: don't shutdown connection when idle timeout
ocfs2: do not write error flag to user structure we cannot copy from/to
x86/purgatory: use approprate -m64/-32 build flag for arch/x86/purgatory
drivers/rtc/rtc-s5m.c: re-add support for devices without irq specified
xattr: fix check for simultaneous glibc header inclusion
kexec: remove CONFIG_KEXEC dependency on crypto
kexec: create a new config option CONFIG_KEXEC_FILE for new syscall
x86,mm: fix pte_special versus pte_numa
hugetlb_cgroup: use lockdep_assert_held rather than spin_is_locked
mm/zpool: use prefixed module loading
zram: fix incorrect stat with failed_reads
lib: turn CONFIG_STACKTRACE into an actual option.
mm: actually clear pmd_numa before invalidating
memblock, memhotplug: fix wrong type in memblock_find_in_range_node().
...

+238 -177
+33 -3
Documentation/kdump/kdump.txt
··· 18 18 a remote system. 19 19 20 20 Kdump and kexec are currently supported on the x86, x86_64, ppc64, ia64, 21 - and s390x architectures. 21 + s390x and arm architectures. 22 22 23 23 When the system kernel boots, it reserves a small section of memory for 24 24 the dump-capture kernel. This ensures that ongoing Direct Memory Access ··· 112 112 2) Or use the system kernel binary itself as dump-capture kernel and there is 113 113 no need to build a separate dump-capture kernel. This is possible 114 114 only with the architectures which support a relocatable kernel. As 115 - of today, i386, x86_64, ppc64 and ia64 architectures support relocatable 115 + of today, i386, x86_64, ppc64, ia64 and arm architectures support relocatable 116 116 kernel. 117 117 118 118 Building a relocatable kernel is advantageous from the point of view that ··· 241 241 kernel will be aligned to 64Mb, so if the start address is not then 242 242 any space below the alignment point will be wasted. 243 243 244 + Dump-capture kernel config options (Arch Dependent, arm) 245 + ---------------------------------------------------------- 246 + 247 + - To use a relocatable kernel, 248 + Enable "AUTO_ZRELADDR" support under "Boot" options: 249 + 250 + AUTO_ZRELADDR=y 244 251 245 252 Extended crashkernel syntax 246 253 =========================== ··· 261 254 The syntax is: 262 255 263 256 crashkernel=<range1>:<size1>[,<range2>:<size2>,...][@offset] 257 + range=start-[end] 258 + 259 + Please note, on arm, the offset is required. 260 + crashkernel=<range1>:<size1>[,<range2>:<size2>,...]@offset 264 261 range=start-[end] 265 262 266 263 'start' is inclusive and 'end' is exclusive. ··· 307 296 on the memory consumption of the kdump system. In general this is not 308 297 dependent on the memory size of the production system. 309 298 299 + On arm, use "crashkernel=Y@X". Note that the start address of the kernel 300 + will be aligned to 128MiB (0x08000000), so if the start address is not then 301 + any space below the alignment point may be overwritten by the dump-capture kernel, 302 + which means it is possible that the vmcore is not that precise as expected. 303 + 304 + 310 305 Load the Dump-capture Kernel 311 306 ============================ 312 307 ··· 332 315 - Use vmlinux or vmlinuz.gz 333 316 For s390x: 334 317 - Use image or bzImage 335 - 318 + For arm: 319 + - Use zImage 336 320 337 321 If you are using a uncompressed vmlinux image then use following command 338 322 to load dump-capture kernel. ··· 348 330 kexec -p <dump-capture-kernel-bzImage> \ 349 331 --initrd=<initrd-for-dump-capture-kernel> \ 350 332 --append="root=<root-dev> <arch-specific-options>" 333 + 334 + If you are using a compressed zImage, then use following command 335 + to load dump-capture kernel. 336 + 337 + kexec --type zImage -p <dump-capture-kernel-bzImage> \ 338 + --initrd=<initrd-for-dump-capture-kernel> \ 339 + --dtb=<dtb-for-dump-capture-kernel> \ 340 + --append="root=<root-dev> <arch-specific-options>" 341 + 351 342 352 343 Please note, that --args-linux does not need to be specified for ia64. 353 344 It is planned to make this a no-op on that architecture, but for now ··· 373 346 374 347 For s390x: 375 348 "1 maxcpus=1 cgroup_disable=memory" 349 + 350 + For arm: 351 + "1 maxcpus=1 reset_devices" 376 352 377 353 Notes on loading the dump-capture kernel: 378 354
+1
arch/arc/mm/cache_arc700.c
··· 581 581 tot_sz -= sz; 582 582 } 583 583 } 584 + EXPORT_SYMBOL(flush_icache_range); 584 585 585 586 /* 586 587 * General purpose helper to make I and D cache lines consistent.
-2
arch/arm/Kconfig
··· 1983 1983 config KEXEC 1984 1984 bool "Kexec system call (EXPERIMENTAL)" 1985 1985 depends on (!SMP || PM_SLEEP_SMP) 1986 - select CRYPTO 1987 - select CRYPTO_SHA256 1988 1986 help 1989 1987 kexec is a system call that implements the ability to shutdown your 1990 1988 current kernel, and to start another kernel. It is like a reboot
+1
arch/hexagon/mm/cache.c
··· 68 68 ); 69 69 local_irq_restore(flags); 70 70 } 71 + EXPORT_SYMBOL(flush_icache_range); 71 72 72 73 void hexagon_clean_dcache_range(unsigned long start, unsigned long end) 73 74 {
-2
arch/ia64/Kconfig
··· 549 549 config KEXEC 550 550 bool "kexec system call" 551 551 depends on !IA64_HP_SIM && (!SMP || HOTPLUG_CPU) 552 - select CRYPTO 553 - select CRYPTO_SHA256 554 552 help 555 553 kexec is a system call that implements the ability to shutdown your 556 554 current kernel, and to start another kernel. It is like a reboot
-2
arch/m68k/Kconfig
··· 91 91 config KEXEC 92 92 bool "kexec system call" 93 93 depends on M68KCLASSIC 94 - select CRYPTO 95 - select CRYPTO_SHA256 96 94 help 97 95 kexec is a system call that implements the ability to shutdown your 98 96 current kernel, and to start another kernel. It is like a reboot
-2
arch/mips/Kconfig
··· 2396 2396 2397 2397 config KEXEC 2398 2398 bool "Kexec system call" 2399 - select CRYPTO 2400 - select CRYPTO_SHA256 2401 2399 help 2402 2400 kexec is a system call that implements the ability to shutdown your 2403 2401 current kernel, and to start another kernel. It is like a reboot
-2
arch/powerpc/Kconfig
··· 399 399 config KEXEC 400 400 bool "kexec system call" 401 401 depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) 402 - select CRYPTO 403 - select CRYPTO_SHA256 404 402 help 405 403 kexec is a system call that implements the ability to shutdown your 406 404 current kernel, and to start another kernel. It is like a reboot
-2
arch/s390/Kconfig
··· 48 48 49 49 config KEXEC 50 50 def_bool y 51 - select CRYPTO 52 - select CRYPTO_SHA256 53 51 54 52 config AUDIT_ARCH 55 53 def_bool y
-2
arch/sh/Kconfig
··· 598 598 config KEXEC 599 599 bool "kexec system call (EXPERIMENTAL)" 600 600 depends on SUPERH32 && MMU 601 - select CRYPTO 602 - select CRYPTO_SHA256 603 601 help 604 602 kexec is a system call that implements the ability to shutdown your 605 603 current kernel, and to start another kernel. It is like a reboot
+1
arch/sh/mm/cache.c
··· 229 229 230 230 cacheop_on_each_cpu(local_flush_icache_range, (void *)&data, 1); 231 231 } 232 + EXPORT_SYMBOL(flush_icache_range); 232 233 233 234 void flush_icache_page(struct vm_area_struct *vma, struct page *page) 234 235 {
-2
arch/tile/Kconfig
··· 191 191 192 192 config KEXEC 193 193 bool "kexec system call" 194 - select CRYPTO 195 - select CRYPTO_SHA256 196 194 ---help--- 197 195 kexec is a system call that implements the ability to shutdown your 198 196 current kernel, and to start another kernel. It is like a reboot
+1
arch/tile/kernel/smp.c
··· 183 183 preempt_enable(); 184 184 } 185 185 } 186 + EXPORT_SYMBOL(flush_icache_range); 186 187 187 188 188 189 /* Called when smp_send_reschedule() triggers IRQ_RESCHEDULE. */
+1 -3
arch/x86/Kbuild
··· 17 17 obj-y += platform/ 18 18 obj-y += net/ 19 19 20 - ifeq ($(CONFIG_X86_64),y) 21 - obj-$(CONFIG_KEXEC) += purgatory/ 22 - endif 20 + obj-$(CONFIG_KEXEC_FILE) += purgatory/
+14 -4
arch/x86/Kconfig
··· 1585 1585 1586 1586 config KEXEC 1587 1587 bool "kexec system call" 1588 - select BUILD_BIN2C 1589 - select CRYPTO 1590 - select CRYPTO_SHA256 1591 1588 ---help--- 1592 1589 kexec is a system call that implements the ability to shutdown your 1593 1590 current kernel, and to start another kernel. It is like a reboot ··· 1599 1602 interface is strongly in flux, so no good recommendation can be 1600 1603 made. 1601 1604 1605 + config KEXEC_FILE 1606 + bool "kexec file based system call" 1607 + select BUILD_BIN2C 1608 + depends on KEXEC 1609 + depends on X86_64 1610 + depends on CRYPTO=y 1611 + depends on CRYPTO_SHA256=y 1612 + ---help--- 1613 + This is new version of kexec system call. This system call is 1614 + file based and takes file descriptors as system call argument 1615 + for kernel and initramfs as opposed to list of segments as 1616 + accepted by previous system call. 1617 + 1602 1618 config KEXEC_VERIFY_SIG 1603 1619 bool "Verify kernel signature during kexec_file_load() syscall" 1604 - depends on KEXEC 1620 + depends on KEXEC_FILE 1605 1621 ---help--- 1606 1622 This option makes kernel signature verification mandatory for 1607 1623 kexec_file_load() syscall. If kernel is signature can not be
+2 -4
arch/x86/Makefile
··· 184 184 $(Q)$(MAKE) $(build)=arch/x86/syscalls all 185 185 186 186 archprepare: 187 - ifeq ($(CONFIG_KEXEC),y) 188 - # Build only for 64bit. No loaders for 32bit yet. 189 - ifeq ($(CONFIG_X86_64),y) 187 + ifeq ($(CONFIG_KEXEC_FILE),y) 190 188 $(Q)$(MAKE) $(build)=arch/x86/purgatory arch/x86/purgatory/kexec-purgatory.c 191 - endif 192 189 endif 193 190 194 191 ### ··· 251 254 $(Q)rm -rf $(objtree)/arch/x86_64 252 255 $(Q)$(MAKE) $(clean)=$(boot) 253 256 $(Q)$(MAKE) $(clean)=arch/x86/tools 257 + $(Q)$(MAKE) $(clean)=arch/x86/purgatory 254 258 255 259 PHONY += kvmconfig 256 260 kvmconfig:
+7 -2
arch/x86/include/asm/pgtable.h
··· 131 131 132 132 static inline int pte_special(pte_t pte) 133 133 { 134 - return (pte_flags(pte) & (_PAGE_PRESENT|_PAGE_SPECIAL)) == 135 - (_PAGE_PRESENT|_PAGE_SPECIAL); 134 + /* 135 + * See CONFIG_NUMA_BALANCING pte_numa in include/asm-generic/pgtable.h. 136 + * On x86 we have _PAGE_BIT_NUMA == _PAGE_BIT_GLOBAL+1 == 137 + * __PAGE_BIT_SOFTW1 == _PAGE_BIT_SPECIAL. 138 + */ 139 + return (pte_flags(pte) & _PAGE_SPECIAL) && 140 + (pte_flags(pte) & (_PAGE_PRESENT|_PAGE_PROTNONE)); 136 141 } 137 142 138 143 static inline unsigned long pte_pfn(pte_t pte)
+1 -1
arch/x86/kernel/Makefile
··· 71 71 obj-$(CONFIG_X86_TSC) += trace_clock.o 72 72 obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o 73 73 obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o 74 + obj-$(CONFIG_KEXEC_FILE) += kexec-bzimage64.o 74 75 obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o 75 76 obj-y += kprobes/ 76 77 obj-$(CONFIG_MODULES) += module.o ··· 119 118 120 119 obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o 121 120 obj-y += vsmp_64.o 122 - obj-$(CONFIG_KEXEC) += kexec-bzimage64.o 123 121 endif
+2 -4
arch/x86/kernel/crash.c
··· 182 182 crash_save_cpu(regs, safe_smp_processor_id()); 183 183 } 184 184 185 - #ifdef CONFIG_X86_64 186 - 185 + #ifdef CONFIG_KEXEC_FILE 187 186 static int get_nr_ram_ranges_callback(unsigned long start_pfn, 188 187 unsigned long nr_pfn, void *arg) 189 188 { ··· 695 696 696 697 return ret; 697 698 } 698 - 699 - #endif /* CONFIG_X86_64 */ 699 + #endif /* CONFIG_KEXEC_FILE */
+11
arch/x86/kernel/machine_kexec_64.c
··· 25 25 #include <asm/debugreg.h> 26 26 #include <asm/kexec-bzimage64.h> 27 27 28 + #ifdef CONFIG_KEXEC_FILE 28 29 static struct kexec_file_ops *kexec_file_loaders[] = { 29 30 &kexec_bzImage64_ops, 30 31 }; 32 + #endif 31 33 32 34 static void free_transition_pgtable(struct kimage *image) 33 35 { ··· 180 178 ); 181 179 } 182 180 181 + #ifdef CONFIG_KEXEC_FILE 183 182 /* Update purgatory as needed after various image segments have been prepared */ 184 183 static int arch_update_purgatory(struct kimage *image) 185 184 { ··· 212 209 213 210 return ret; 214 211 } 212 + #else /* !CONFIG_KEXEC_FILE */ 213 + static inline int arch_update_purgatory(struct kimage *image) 214 + { 215 + return 0; 216 + } 217 + #endif /* CONFIG_KEXEC_FILE */ 215 218 216 219 int machine_kexec_prepare(struct kimage *image) 217 220 { ··· 338 329 339 330 /* arch-dependent functionality related to kexec file-based syscall */ 340 331 332 + #ifdef CONFIG_KEXEC_FILE 341 333 int arch_kexec_kernel_image_probe(struct kimage *image, void *buf, 342 334 unsigned long buf_len) 343 335 { ··· 532 522 (int)ELF64_R_TYPE(rel[i].r_info), value); 533 523 return -ENOEXEC; 534 524 } 525 + #endif /* CONFIG_KEXEC_FILE */
+2 -4
arch/x86/purgatory/Makefile
··· 11 11 # sure how to relocate those. Like kexec-tools, use custom flags. 12 12 13 13 KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -fno-builtin -ffreestanding -c -MD -Os -mcmodel=large 14 + KBUILD_CFLAGS += -m$(BITS) 14 15 15 16 $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE 16 17 $(call if_changed,ld) ··· 25 24 $(call if_changed,bin2c) 26 25 27 26 28 - # No loaders for 32bits yet. 29 - ifeq ($(CONFIG_X86_64),y) 30 - obj-$(CONFIG_KEXEC) += kexec-purgatory.o 31 - endif 27 + obj-$(CONFIG_KEXEC_FILE) += kexec-purgatory.o
+1
arch/xtensa/kernel/smp.c
··· 571 571 }; 572 572 on_each_cpu(ipi_flush_icache_range, &fd, 1); 573 573 } 574 + EXPORT_SYMBOL(flush_icache_range); 574 575 575 576 /* ------------------------------------------------------------------------- */ 576 577
+7 -3
drivers/block/zram/zram_drv.c
··· 378 378 /* Should NEVER happen. Return bio error if it does. */ 379 379 if (unlikely(ret)) { 380 380 pr_err("Decompression failed! err=%d, page=%u\n", ret, index); 381 - atomic64_inc(&zram->stats.failed_reads); 382 381 return ret; 383 382 } 384 383 ··· 546 547 zcomp_strm_release(zram->comp, zstrm); 547 548 if (is_partial_io(bvec)) 548 549 kfree(uncmem); 549 - if (ret) 550 - atomic64_inc(&zram->stats.failed_writes); 551 550 return ret; 552 551 } 553 552 ··· 561 564 } else { 562 565 atomic64_inc(&zram->stats.num_writes); 563 566 ret = zram_bvec_write(zram, bvec, index, offset); 567 + } 568 + 569 + if (unlikely(ret)) { 570 + if (rw == READ) 571 + atomic64_inc(&zram->stats.failed_reads); 572 + else 573 + atomic64_inc(&zram->stats.failed_writes); 564 574 } 565 575 566 576 return ret;
+1 -1
drivers/block/zram/zram_drv.h
··· 84 84 atomic64_t compr_data_size; /* compressed size of pages stored */ 85 85 atomic64_t num_reads; /* failed + successful */ 86 86 atomic64_t num_writes; /* --do-- */ 87 - atomic64_t failed_reads; /* should NEVER! happen */ 87 + atomic64_t failed_reads; /* can happen when memory is too low */ 88 88 atomic64_t failed_writes; /* can happen when memory is too low */ 89 89 atomic64_t invalid_io; /* non-page-aligned I/O requests */ 90 90 atomic64_t notify_free; /* no. of swap slot free notifications */
+14 -7
drivers/rtc/rtc-s5m.c
··· 717 717 info->device_type = s5m87xx->device_type; 718 718 info->wtsr_smpl = s5m87xx->wtsr_smpl; 719 719 720 - info->irq = regmap_irq_get_virq(s5m87xx->irq_data, alarm_irq); 721 - if (info->irq <= 0) { 722 - ret = -EINVAL; 723 - dev_err(&pdev->dev, "Failed to get virtual IRQ %d\n", 720 + if (s5m87xx->irq_data) { 721 + info->irq = regmap_irq_get_virq(s5m87xx->irq_data, alarm_irq); 722 + if (info->irq <= 0) { 723 + ret = -EINVAL; 724 + dev_err(&pdev->dev, "Failed to get virtual IRQ %d\n", 724 725 alarm_irq); 725 - goto err; 726 + goto err; 727 + } 726 728 } 727 729 728 730 platform_set_drvdata(pdev, info); ··· 744 742 if (IS_ERR(info->rtc_dev)) { 745 743 ret = PTR_ERR(info->rtc_dev); 746 744 goto err; 745 + } 746 + 747 + if (!info->irq) { 748 + dev_info(&pdev->dev, "Alarm IRQ not available\n"); 749 + return 0; 747 750 } 748 751 749 752 ret = devm_request_threaded_irq(&pdev->dev, info->irq, NULL, ··· 809 802 struct s5m_rtc_info *info = dev_get_drvdata(dev); 810 803 int ret = 0; 811 804 812 - if (device_may_wakeup(dev)) 805 + if (info->irq && device_may_wakeup(dev)) 813 806 ret = disable_irq_wake(info->irq); 814 807 815 808 return ret; ··· 820 813 struct s5m_rtc_info *info = dev_get_drvdata(dev); 821 814 int ret = 0; 822 815 823 - if (device_may_wakeup(dev)) 816 + if (info->irq && device_may_wakeup(dev)) 824 817 ret = enable_irq_wake(info->irq); 825 818 826 819 return ret;
+11 -2
fs/ocfs2/cluster/quorum.c
··· 160 160 } 161 161 162 162 out: 163 - spin_unlock(&qs->qs_lock); 164 - if (fence) 163 + if (fence) { 164 + spin_unlock(&qs->qs_lock); 165 165 o2quo_fence_self(); 166 + } else { 167 + mlog(ML_NOTICE, "not fencing this node, heartbeating: %d, " 168 + "connected: %d, lowest: %d (%sreachable)\n", 169 + qs->qs_heartbeating, qs->qs_connected, lowest_hb, 170 + lowest_reachable ? "" : "un"); 171 + spin_unlock(&qs->qs_lock); 172 + 173 + } 174 + 166 175 } 167 176 168 177 static void o2quo_set_hold(struct o2quo_state *qs, u8 node)
+39 -6
fs/ocfs2/cluster/tcp.c
··· 1480 1480 return ret; 1481 1481 } 1482 1482 1483 + static int o2net_set_usertimeout(struct socket *sock) 1484 + { 1485 + int user_timeout = O2NET_TCP_USER_TIMEOUT; 1486 + 1487 + return kernel_setsockopt(sock, SOL_TCP, TCP_USER_TIMEOUT, 1488 + (char *)&user_timeout, sizeof(user_timeout)); 1489 + } 1490 + 1483 1491 static void o2net_initialize_handshake(void) 1484 1492 { 1485 1493 o2net_hand->o2hb_heartbeat_timeout_ms = cpu_to_be32( ··· 1544 1536 #endif 1545 1537 1546 1538 printk(KERN_NOTICE "o2net: Connection to " SC_NODEF_FMT " has been " 1547 - "idle for %lu.%lu secs, shutting it down.\n", SC_NODEF_ARGS(sc), 1548 - msecs / 1000, msecs % 1000); 1539 + "idle for %lu.%lu secs.\n", 1540 + SC_NODEF_ARGS(sc), msecs / 1000, msecs % 1000); 1549 1541 1550 - /* 1551 - * Initialize the nn_timeout so that the next connection attempt 1552 - * will continue in o2net_start_connect. 1542 + /* idle timerout happen, don't shutdown the connection, but 1543 + * make fence decision. Maybe the connection can recover before 1544 + * the decision is made. 1553 1545 */ 1554 1546 atomic_set(&nn->nn_timeout, 1); 1547 + o2quo_conn_err(o2net_num_from_nn(nn)); 1548 + queue_delayed_work(o2net_wq, &nn->nn_still_up, 1549 + msecs_to_jiffies(O2NET_QUORUM_DELAY_MS)); 1555 1550 1556 - o2net_sc_queue_work(sc, &sc->sc_shutdown_work); 1551 + o2net_sc_reset_idle_timer(sc); 1552 + 1557 1553 } 1558 1554 1559 1555 static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc) ··· 1572 1560 1573 1561 static void o2net_sc_postpone_idle(struct o2net_sock_container *sc) 1574 1562 { 1563 + struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num); 1564 + 1565 + /* clear fence decision since the connection recover from timeout*/ 1566 + if (atomic_read(&nn->nn_timeout)) { 1567 + o2quo_conn_up(o2net_num_from_nn(nn)); 1568 + cancel_delayed_work(&nn->nn_still_up); 1569 + atomic_set(&nn->nn_timeout, 0); 1570 + } 1571 + 1575 1572 /* Only push out an existing timer */ 1576 1573 if (timer_pending(&sc->sc_idle_timeout)) 1577 1574 o2net_sc_reset_idle_timer(sc); ··· 1668 1647 ret = o2net_set_nodelay(sc->sc_sock); 1669 1648 if (ret) { 1670 1649 mlog(ML_ERROR, "setting TCP_NODELAY failed with %d\n", ret); 1650 + goto out; 1651 + } 1652 + 1653 + ret = o2net_set_usertimeout(sock); 1654 + if (ret) { 1655 + mlog(ML_ERROR, "set TCP_USER_TIMEOUT failed with %d\n", ret); 1671 1656 goto out; 1672 1657 } 1673 1658 ··· 1855 1828 ret = o2net_set_nodelay(new_sock); 1856 1829 if (ret) { 1857 1830 mlog(ML_ERROR, "setting TCP_NODELAY failed with %d\n", ret); 1831 + goto out; 1832 + } 1833 + 1834 + ret = o2net_set_usertimeout(new_sock); 1835 + if (ret) { 1836 + mlog(ML_ERROR, "set TCP_USER_TIMEOUT failed with %d\n", ret); 1858 1837 goto out; 1859 1838 } 1860 1839
+1
fs/ocfs2/cluster/tcp.h
··· 63 63 #define O2NET_KEEPALIVE_DELAY_MS_DEFAULT 2000 64 64 #define O2NET_IDLE_TIMEOUT_MS_DEFAULT 30000 65 65 66 + #define O2NET_TCP_USER_TIMEOUT 0x7fffffff 66 67 67 68 /* TODO: figure this out.... */ 68 69 static inline int o2net_link_down(int err, struct socket *sock)
+43 -86
fs/ocfs2/ioctl.c
··· 35 35 copy_to_user((typeof(a) __user *)b, &(a), sizeof(a)) 36 36 37 37 /* 38 - * This call is void because we are already reporting an error that may 39 - * be -EFAULT. The error will be returned from the ioctl(2) call. It's 40 - * just a best-effort to tell userspace that this request caused the error. 38 + * This is just a best-effort to tell userspace that this request 39 + * caused the error. 41 40 */ 42 41 static inline void o2info_set_request_error(struct ocfs2_info_request *kreq, 43 42 struct ocfs2_info_request __user *req) ··· 145 146 static int ocfs2_info_handle_blocksize(struct inode *inode, 146 147 struct ocfs2_info_request __user *req) 147 148 { 148 - int status = -EFAULT; 149 149 struct ocfs2_info_blocksize oib; 150 150 151 151 if (o2info_from_user(oib, req)) 152 - goto bail; 152 + return -EFAULT; 153 153 154 154 oib.ib_blocksize = inode->i_sb->s_blocksize; 155 155 156 156 o2info_set_request_filled(&oib.ib_req); 157 157 158 158 if (o2info_to_user(oib, req)) 159 - goto bail; 159 + return -EFAULT; 160 160 161 - status = 0; 162 - bail: 163 - if (status) 164 - o2info_set_request_error(&oib.ib_req, req); 165 - 166 - return status; 161 + return 0; 167 162 } 168 163 169 164 static int ocfs2_info_handle_clustersize(struct inode *inode, 170 165 struct ocfs2_info_request __user *req) 171 166 { 172 - int status = -EFAULT; 173 167 struct ocfs2_info_clustersize oic; 174 168 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 175 169 176 170 if (o2info_from_user(oic, req)) 177 - goto bail; 171 + return -EFAULT; 178 172 179 173 oic.ic_clustersize = osb->s_clustersize; 180 174 181 175 o2info_set_request_filled(&oic.ic_req); 182 176 183 177 if (o2info_to_user(oic, req)) 184 - goto bail; 178 + return -EFAULT; 185 179 186 - status = 0; 187 - bail: 188 - if (status) 189 - o2info_set_request_error(&oic.ic_req, req); 190 - 191 - return status; 180 + return 0; 192 181 } 193 182 194 183 static int ocfs2_info_handle_maxslots(struct inode *inode, 195 184 struct ocfs2_info_request __user *req) 196 185 { 197 - int status = -EFAULT; 198 186 struct ocfs2_info_maxslots oim; 199 187 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 200 188 201 189 if (o2info_from_user(oim, req)) 202 - goto bail; 190 + return -EFAULT; 203 191 204 192 oim.im_max_slots = osb->max_slots; 205 193 206 194 o2info_set_request_filled(&oim.im_req); 207 195 208 196 if (o2info_to_user(oim, req)) 209 - goto bail; 197 + return -EFAULT; 210 198 211 - status = 0; 212 - bail: 213 - if (status) 214 - o2info_set_request_error(&oim.im_req, req); 215 - 216 - return status; 199 + return 0; 217 200 } 218 201 219 202 static int ocfs2_info_handle_label(struct inode *inode, 220 203 struct ocfs2_info_request __user *req) 221 204 { 222 - int status = -EFAULT; 223 205 struct ocfs2_info_label oil; 224 206 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 225 207 226 208 if (o2info_from_user(oil, req)) 227 - goto bail; 209 + return -EFAULT; 228 210 229 211 memcpy(oil.il_label, osb->vol_label, OCFS2_MAX_VOL_LABEL_LEN); 230 212 231 213 o2info_set_request_filled(&oil.il_req); 232 214 233 215 if (o2info_to_user(oil, req)) 234 - goto bail; 216 + return -EFAULT; 235 217 236 - status = 0; 237 - bail: 238 - if (status) 239 - o2info_set_request_error(&oil.il_req, req); 240 - 241 - return status; 218 + return 0; 242 219 } 243 220 244 221 static int ocfs2_info_handle_uuid(struct inode *inode, 245 222 struct ocfs2_info_request __user *req) 246 223 { 247 - int status = -EFAULT; 248 224 struct ocfs2_info_uuid oiu; 249 225 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 250 226 251 227 if (o2info_from_user(oiu, req)) 252 - goto bail; 228 + return -EFAULT; 253 229 254 230 memcpy(oiu.iu_uuid_str, osb->uuid_str, OCFS2_TEXT_UUID_LEN + 1); 255 231 256 232 o2info_set_request_filled(&oiu.iu_req); 257 233 258 234 if (o2info_to_user(oiu, req)) 259 - goto bail; 235 + return -EFAULT; 260 236 261 - status = 0; 262 - bail: 263 - if (status) 264 - o2info_set_request_error(&oiu.iu_req, req); 265 - 266 - return status; 237 + return 0; 267 238 } 268 239 269 240 static int ocfs2_info_handle_fs_features(struct inode *inode, 270 241 struct ocfs2_info_request __user *req) 271 242 { 272 - int status = -EFAULT; 273 243 struct ocfs2_info_fs_features oif; 274 244 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 275 245 276 246 if (o2info_from_user(oif, req)) 277 - goto bail; 247 + return -EFAULT; 278 248 279 249 oif.if_compat_features = osb->s_feature_compat; 280 250 oif.if_incompat_features = osb->s_feature_incompat; ··· 252 284 o2info_set_request_filled(&oif.if_req); 253 285 254 286 if (o2info_to_user(oif, req)) 255 - goto bail; 287 + return -EFAULT; 256 288 257 - status = 0; 258 - bail: 259 - if (status) 260 - o2info_set_request_error(&oif.if_req, req); 261 - 262 - return status; 289 + return 0; 263 290 } 264 291 265 292 static int ocfs2_info_handle_journal_size(struct inode *inode, 266 293 struct ocfs2_info_request __user *req) 267 294 { 268 - int status = -EFAULT; 269 295 struct ocfs2_info_journal_size oij; 270 296 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 271 297 272 298 if (o2info_from_user(oij, req)) 273 - goto bail; 299 + return -EFAULT; 274 300 275 301 oij.ij_journal_size = i_size_read(osb->journal->j_inode); 276 302 277 303 o2info_set_request_filled(&oij.ij_req); 278 304 279 305 if (o2info_to_user(oij, req)) 280 - goto bail; 306 + return -EFAULT; 281 307 282 - status = 0; 283 - bail: 284 - if (status) 285 - o2info_set_request_error(&oij.ij_req, req); 286 - 287 - return status; 308 + return 0; 288 309 } 289 310 290 311 static int ocfs2_info_scan_inode_alloc(struct ocfs2_super *osb, ··· 330 373 u32 i; 331 374 u64 blkno = -1; 332 375 char namebuf[40]; 333 - int status = -EFAULT, type = INODE_ALLOC_SYSTEM_INODE; 376 + int status, type = INODE_ALLOC_SYSTEM_INODE; 334 377 struct ocfs2_info_freeinode *oifi = NULL; 335 378 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 336 379 struct inode *inode_alloc = NULL; ··· 342 385 goto out_err; 343 386 } 344 387 345 - if (o2info_from_user(*oifi, req)) 346 - goto bail; 388 + if (o2info_from_user(*oifi, req)) { 389 + status = -EFAULT; 390 + goto out_free; 391 + } 347 392 348 393 oifi->ifi_slotnum = osb->max_slots; 349 394 ··· 383 424 384 425 o2info_set_request_filled(&oifi->ifi_req); 385 426 386 - if (o2info_to_user(*oifi, req)) 387 - goto bail; 427 + if (o2info_to_user(*oifi, req)) { 428 + status = -EFAULT; 429 + goto out_free; 430 + } 388 431 389 432 status = 0; 390 433 bail: 391 434 if (status) 392 435 o2info_set_request_error(&oifi->ifi_req, req); 393 - 436 + out_free: 394 437 kfree(oifi); 395 438 out_err: 396 439 return status; ··· 619 658 { 620 659 u64 blkno = -1; 621 660 char namebuf[40]; 622 - int status = -EFAULT, type = GLOBAL_BITMAP_SYSTEM_INODE; 661 + int status, type = GLOBAL_BITMAP_SYSTEM_INODE; 623 662 624 663 struct ocfs2_info_freefrag *oiff; 625 664 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); ··· 632 671 goto out_err; 633 672 } 634 673 635 - if (o2info_from_user(*oiff, req)) 636 - goto bail; 674 + if (o2info_from_user(*oiff, req)) { 675 + status = -EFAULT; 676 + goto out_free; 677 + } 637 678 /* 638 679 * chunksize from userspace should be power of 2. 639 680 */ ··· 674 711 675 712 if (o2info_to_user(*oiff, req)) { 676 713 status = -EFAULT; 677 - goto bail; 714 + goto out_free; 678 715 } 679 716 680 717 status = 0; 681 718 bail: 682 719 if (status) 683 720 o2info_set_request_error(&oiff->iff_req, req); 684 - 721 + out_free: 685 722 kfree(oiff); 686 723 out_err: 687 724 return status; ··· 690 727 static int ocfs2_info_handle_unknown(struct inode *inode, 691 728 struct ocfs2_info_request __user *req) 692 729 { 693 - int status = -EFAULT; 694 730 struct ocfs2_info_request oir; 695 731 696 732 if (o2info_from_user(oir, req)) 697 - goto bail; 733 + return -EFAULT; 698 734 699 735 o2info_clear_request_filled(&oir); 700 736 701 737 if (o2info_to_user(oir, req)) 702 - goto bail; 738 + return -EFAULT; 703 739 704 - status = 0; 705 - bail: 706 - if (status) 707 - o2info_set_request_error(&oir, req); 708 - 709 - return status; 740 + return 0; 710 741 } 711 742 712 743 /*
+1 -1
include/uapi/linux/xattr.h
··· 13 13 #ifndef _UAPI_LINUX_XATTR_H 14 14 #define _UAPI_LINUX_XATTR_H 15 15 16 - #ifdef __UAPI_DEF_XATTR 16 + #if __UAPI_DEF_XATTR 17 17 #define __USE_KERNEL_XATTR_DEFS 18 18 19 19 #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */
+11
kernel/kexec.c
··· 64 64 char __weak kexec_purgatory[0]; 65 65 size_t __weak kexec_purgatory_size = 0; 66 66 67 + #ifdef CONFIG_KEXEC_FILE 67 68 static int kexec_calculate_store_digests(struct kimage *image); 69 + #endif 68 70 69 71 /* Location of the reserved area for the crash kernel */ 70 72 struct resource crashk_res = { ··· 343 341 return ret; 344 342 } 345 343 344 + #ifdef CONFIG_KEXEC_FILE 346 345 static int copy_file_from_fd(int fd, void **buf, unsigned long *buf_len) 347 346 { 348 347 struct fd f = fdget(fd); ··· 615 612 kfree(image); 616 613 return ret; 617 614 } 615 + #else /* CONFIG_KEXEC_FILE */ 616 + static inline void kimage_file_post_load_cleanup(struct kimage *image) { } 617 + #endif /* CONFIG_KEXEC_FILE */ 618 618 619 619 static int kimage_is_destination_range(struct kimage *image, 620 620 unsigned long start, ··· 1381 1375 } 1382 1376 #endif 1383 1377 1378 + #ifdef CONFIG_KEXEC_FILE 1384 1379 SYSCALL_DEFINE5(kexec_file_load, int, kernel_fd, int, initrd_fd, 1385 1380 unsigned long, cmdline_len, const char __user *, cmdline_ptr, 1386 1381 unsigned long, flags) ··· 1457 1450 kimage_free(image); 1458 1451 return ret; 1459 1452 } 1453 + 1454 + #endif /* CONFIG_KEXEC_FILE */ 1460 1455 1461 1456 void crash_kexec(struct pt_regs *regs) 1462 1457 { ··· 2015 2006 2016 2007 subsys_initcall(crash_save_vmcoreinfo_init); 2017 2008 2009 + #ifdef CONFIG_KEXEC_FILE 2018 2010 static int __kexec_add_segment(struct kimage *image, char *buf, 2019 2011 unsigned long bufsz, unsigned long mem, 2020 2012 unsigned long memsz) ··· 2692 2682 2693 2683 return 0; 2694 2684 } 2685 + #endif /* CONFIG_KEXEC_FILE */ 2695 2686 2696 2687 /* 2697 2688 * Move into place and start executing a preloaded standalone
+4 -7
kernel/resource.c
··· 351 351 end = res->end; 352 352 BUG_ON(start >= end); 353 353 354 + if (first_level_children_only) 355 + sibling_only = true; 356 + 354 357 read_lock(&resource_lock); 355 358 356 - if (first_level_children_only) { 357 - p = iomem_resource.child; 358 - sibling_only = true; 359 - } else 360 - p = &iomem_resource; 361 - 362 - while ((p = next_resource(p, sibling_only))) { 359 + for (p = iomem_resource.child; p; p = next_resource(p, sibling_only)) { 363 360 if (p->flags != res->flags) 364 361 continue; 365 362 if (name && strcmp(p->name, name))
+6 -1
lib/Kconfig.debug
··· 1036 1036 either tracing or lock debugging. 1037 1037 1038 1038 config STACKTRACE 1039 - bool 1039 + bool "Stack backtrace support" 1040 1040 depends on STACKTRACE_SUPPORT 1041 + help 1042 + This option causes the kernel to create a /proc/pid/stack for 1043 + every process, showing its current stack trace. 1044 + It is also used by various kernel debugging features that require 1045 + stack trace generation. 1041 1046 1042 1047 config DEBUG_KOBJECT 1043 1048 bool "kobject debugging"
+1 -1
mm/hugetlb_cgroup.c
··· 217 217 218 218 if (hugetlb_cgroup_disabled()) 219 219 return; 220 - VM_BUG_ON(!spin_is_locked(&hugetlb_lock)); 220 + lockdep_assert_held(&hugetlb_lock); 221 221 h_cg = hugetlb_cgroup_from_page(page); 222 222 if (unlikely(!h_cg)) 223 223 return;
+1 -2
mm/memblock.c
··· 192 192 phys_addr_t align, phys_addr_t start, 193 193 phys_addr_t end, int nid) 194 194 { 195 - int ret; 196 - phys_addr_t kernel_end; 195 + phys_addr_t kernel_end, ret; 197 196 198 197 /* pump up @end */ 199 198 if (end == MEMBLOCK_ALLOC_ACCESSIBLE)
+3 -4
mm/memory.c
··· 751 751 unsigned long pfn = pte_pfn(pte); 752 752 753 753 if (HAVE_PTE_SPECIAL) { 754 - if (likely(!pte_special(pte) || pte_numa(pte))) 754 + if (likely(!pte_special(pte))) 755 755 goto check_pfn; 756 756 if (vma->vm_flags & (VM_PFNMAP | VM_MIXEDMAP)) 757 757 return NULL; ··· 777 777 } 778 778 } 779 779 780 + if (is_zero_pfn(pfn)) 781 + return NULL; 780 782 check_pfn: 781 783 if (unlikely(pfn > highest_memmap_pfn)) { 782 784 print_bad_pte(vma, addr, pte, NULL); 783 785 return NULL; 784 786 } 785 - 786 - if (is_zero_pfn(pfn)) 787 - return NULL; 788 787 789 788 /* 790 789 * NOTE! We still have PageReserved() pages in the page tables.
+1 -1
mm/pgtable-generic.c
··· 195 195 pmd_t entry = *pmdp; 196 196 if (pmd_numa(entry)) 197 197 entry = pmd_mknonnuma(entry); 198 - set_pmd_at(vma->vm_mm, address, pmdp, pmd_mknotpresent(*pmdp)); 198 + set_pmd_at(vma->vm_mm, address, pmdp, pmd_mknotpresent(entry)); 199 199 flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE); 200 200 } 201 201 #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
+1
mm/zbud.c
··· 195 195 .total_size = zbud_zpool_total_size, 196 196 }; 197 197 198 + MODULE_ALIAS("zpool-zbud"); 198 199 #endif /* CONFIG_ZPOOL */ 199 200 200 201 /*****************
+1 -1
mm/zpool.c
··· 150 150 driver = zpool_get_driver(type); 151 151 152 152 if (!driver) { 153 - request_module(type); 153 + request_module("zpool-%s", type); 154 154 driver = zpool_get_driver(type); 155 155 } 156 156
+1
mm/zsmalloc.c
··· 315 315 .total_size = zs_zpool_total_size, 316 316 }; 317 317 318 + MODULE_ALIAS("zpool-zsmalloc"); 318 319 #endif /* CONFIG_ZPOOL */ 319 320 320 321 /* per-cpu VM mapping areas for zspage accesses that cross page boundaries */
+2 -2
scripts/checkpatch.pl
··· 2133 2133 # Check for improperly formed commit descriptions 2134 2134 if ($in_commit_log && 2135 2135 $line =~ /\bcommit\s+[0-9a-f]{5,}/i && 2136 - $line !~ /\b[Cc]ommit [0-9a-f]{12,16} \("/) { 2136 + $line !~ /\b[Cc]ommit [0-9a-f]{12,40} \("/) { 2137 2137 $line =~ /\b(c)ommit\s+([0-9a-f]{5,})/i; 2138 2138 my $init_char = $1; 2139 2139 my $orig_commit = lc($2); ··· 2141 2141 my $desc = 'commit description'; 2142 2142 ($id, $desc) = git_commit_info($orig_commit, $id, $desc); 2143 2143 ERROR("GIT_COMMIT_ID", 2144 - "Please use 12 to 16 chars for the git commit ID like: '${init_char}ommit $id (\"$desc\")'\n" . $herecurr); 2144 + "Please use 12 or more chars for the git commit ID like: '${init_char}ommit $id (\"$desc\")'\n" . $herecurr); 2145 2145 } 2146 2146 2147 2147 # Check for added, moved or deleted files
+3 -3
tools/testing/selftests/ipc/Makefile
··· 1 1 uname_M := $(shell uname -m 2>/dev/null || echo not) 2 2 ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/) 3 3 ifeq ($(ARCH),i386) 4 - ARCH := X86 4 + ARCH := x86 5 5 CFLAGS := -DCONFIG_X86_32 -D__i386__ 6 6 endif 7 7 ifeq ($(ARCH),x86_64) 8 - ARCH := X86 8 + ARCH := x86 9 9 CFLAGS := -DCONFIG_X86_64 -D__x86_64__ 10 10 endif 11 11 12 12 CFLAGS += -I../../../../usr/include/ 13 13 14 14 all: 15 - ifeq ($(ARCH),X86) 15 + ifeq ($(ARCH),x86) 16 16 gcc $(CFLAGS) msgque.c -o msgque_test 17 17 else 18 18 echo "Not an x86 target, can't build msgque selftest"
+3 -3
tools/testing/selftests/kcmp/Makefile
··· 1 1 uname_M := $(shell uname -m 2>/dev/null || echo not) 2 2 ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/) 3 3 ifeq ($(ARCH),i386) 4 - ARCH := X86 4 + ARCH := x86 5 5 CFLAGS := -DCONFIG_X86_32 -D__i386__ 6 6 endif 7 7 ifeq ($(ARCH),x86_64) 8 - ARCH := X86 8 + ARCH := x86 9 9 CFLAGS := -DCONFIG_X86_64 -D__x86_64__ 10 10 endif 11 11 ··· 15 15 CFLAGS += -I../../../../arch/x86/include/ 16 16 17 17 all: 18 - ifeq ($(ARCH),X86) 18 + ifeq ($(ARCH),x86) 19 19 gcc $(CFLAGS) kcmp_test.c -o kcmp_test 20 20 else 21 21 echo "Not an x86 target, can't build kcmp selftest"
+5 -5
tools/testing/selftests/memfd/Makefile
··· 1 1 uname_M := $(shell uname -m 2>/dev/null || echo not) 2 2 ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/) 3 3 ifeq ($(ARCH),i386) 4 - ARCH := X86 4 + ARCH := x86 5 5 endif 6 6 ifeq ($(ARCH),x86_64) 7 - ARCH := X86 7 + ARCH := x86 8 8 endif 9 9 10 10 CFLAGS += -D_FILE_OFFSET_BITS=64 ··· 14 14 CFLAGS += -I../../../../include/ 15 15 16 16 all: 17 - ifeq ($(ARCH),X86) 17 + ifeq ($(ARCH),x86) 18 18 gcc $(CFLAGS) memfd_test.c -o memfd_test 19 19 else 20 20 echo "Not an x86 target, can't build memfd selftest" 21 21 endif 22 22 23 23 run_tests: all 24 - ifeq ($(ARCH),X86) 24 + ifeq ($(ARCH),x86) 25 25 gcc $(CFLAGS) memfd_test.c -o memfd_test 26 26 endif 27 27 @./memfd_test || echo "memfd_test: [FAIL]" 28 28 29 29 build_fuse: 30 - ifeq ($(ARCH),X86) 30 + ifeq ($(ARCH),x86) 31 31 gcc $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt 32 32 gcc $(CFLAGS) fuse_test.c -o fuse_test 33 33 else