Skip to content

Instantly share code, notes, and snippets.

View kiryl's full-sized avatar

Kirill A. Shutemov kiryl

View GitHub Profile
diff --git a/mm/mprotect.c b/mm/mprotect.c
index f9c07f54dd62..187c14c001fd 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -33,34 +33,6 @@
#include "internal.h"
-/*
- * For a prot_numa update we only hold mmap_sem for read so there is a
[ 72.436449] usb 4-6.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 72.436453] usb 4-6.1.4: Product: USB3.0 Card Reader
[ 72.436455] usb 4-6.1.4: Manufacturer: Realtek
[ 72.436457] usb 4-6.1.4: SerialNumber: T14000015310
[ 72.444326] usb-storage 4-6.1.4:1.0: USB Mass Storage device detected
[ 72.444568] scsi host14: usb-storage 4-6.1.4:1.0
[ 72.444622] scsi host14: runtime PM trying to activate child device host14 but parent (4-6.1.4:1.0) is not active
[ 73.304204] [drm:intel_set_cpu_fifo_underrun_reporting] *ERROR* uncleared fifo underrun on pipe B
[ 73.304210] [drm:intel_cpu_fifo_underrun_irq_handler] *ERROR* CPU pipe B FIFO underrun
[ 73.470178] scsi 14:0:0:0: Direct-Access Generic- SD/MMC/MS/MSPRO 1.00 PQ: 0 ANSI: 6
#define _GNU_SOURCE
#include <fcntl.h>
#include <limits.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <linux/fs.h>
int main(int argc, char **argv)
{
[ 1.305879] ================================================================================
[ 1.306804] UBSAN: Undefined behaviour in /home/kas/linux/mm/drivers/acpi/acpica/dsutils.c:641:16
[ 1.307759] index -1 is out of range for type 'acpi_operand_object *[9]'
[ 1.308000] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.7.0-rc7-mm1-00435-g96dfe11ead9d-dirty #2930
[ 1.308000] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014
[ 1.308000] 0000000000000000 ffff8800790f7310 ffffffff81fe9286 0000000041b58ab3
[ 1.308000] ffffffff83544d87 ffffffff81fe91a0 ffff8800790f7338 ffff8800790f72d8
[ 1.308000] 0000000000000001 ffffffff83a02d58 ffffffff84a9d4c0 ffff8800790f73a0
[ 1.308000] Call Trace:
[ 1.308000] [<ffffffff81fe9286>] dump_stack+0xe6/0x160
[ 6.601024] swapper/1: page allocation failure: order:2, mode:0x2000000(GFP_NOWAIT)
[ 6.604886] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.7.0-rc7-mm1-00428-gc3e13e4dab1b-dirty #2878
[ 6.604886] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014
[ 6.604886] 0000000000000001 ffff88001f807690 ffffffff81c8fb0d 1ffff10003f00ed6
[ 6.604886] 0000000000000000 0000000000000002 ffff88001f807750 ffff88001f8077a8
[ 6.604886] ffffffff813e728b ffff88001f8077a8 0200000000000000 0000000041b58ab3
[ 6.604886] Call Trace:
[ 6.604886] <IRQ> [<ffffffff81c8fb0d>] dump_stack+0x95/0xe8
[ 6.604886] [<ffffffff813e728b>] warn_alloc_failed+0x1cb/0x250
[ 6.604886] [<ffffffff813e70c0>] ? zone_watermark_ok_safe+0x250/0x250
Screen 0: minimum 8 x 8, current 8 x 8, maximum 32767 x 32767
DP1 disconnected (normal left inverted right x axis y axis)
Identifier: 0x43
Timestamp: 746236
Subpixel: unknown
Clones: HDMI3
CRTCs: 0 1 2
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
[ 0.000000] Linux version 4.6.0-rc3 (kas@kshutemo-desk) (gcc version 5.3.0 (Gentoo 5.3.0 p1.0, pie-0.6.5) ) #37 SMP PREEMPT Mon Apr 11 18:18:13 MSK 2016
[ 0.000000] Command line: BOOT_IMAGE=../vmlinuz dolvm rw root=UUID=dc179bdb-77c0-4166-8d43-f828994c99a0 rootdelay=1 intel_mmu=igfx_off iommu=pt drm.debug=0xe initrd=../initramfs
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[ 0.000000] x86/fpu: Using 'eager' FPU context switches.
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d7ff] usable
diff --git a/mm/migrate.c b/mm/migrate.c
index 5c9cd90334ea..2e4fa4716de5 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -733,7 +733,7 @@ static int fallback_migrate_page(struct address_space *mapping,
* Buffers may be managed in a filesystem specific way.
* We must have no buffers or drop them.
*/
- if (page_has_private(page) &&
+ if ((PagePrivate(page) || page_has_private(page)) &&
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index 065c88f8e4b8..5eea5f56e0a6 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -52,6 +52,7 @@
#include "ubifs.h"
#include <linux/mount.h>
#include <linux/slab.h>
+#include <linux/migrate.h>
[ 0.000000] kasan: CONFIG_KASAN_INLINE enabled
[ 0.000000] kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC KASAN
[ 0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.5.0-rc5-00210-gb28b9eb94430 #1509
[ 0.000000] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.8.2-0-g33fbe13 by qemu-project.org 04/01/2014
[ 0.000000] task: ffffffff83016900 ti: ffffffff83000000 task.ti: ffffffff83000000
[ 0.000000] RIP: 0010:[<ffffffff814b587a>] [<ffffffff814b587a>] init_page_owner+0x35a/0x460
[ 0.000000] RSP: 0000:ffffffff83007e38 EFLAGS: 00010046
[ 0.000000] RAX: 0000000000000000 RBX: 0000000000340000 RCX: 0000000000000009
[ 0.000000] RDX: 0000000000000000 RSI: ffffffff8345d448 RDI: ffff8802bffddd10
[ 0.000000] RBP: ffffffff83007eb0 R08: ffffffff83007dc0 R09: 0000000000000000