fixed a typo #73

Open
wants to merge 1 commit into
from

1 participant

@vadik2014

fixed a typo in .gitignore

vadik2013 fixed a typo
fixed a typo in .gitignore
8f6bad2
@retornaz retornaz pushed a commit to retornaz/linux that referenced this pull request Feb 24, 2014
Borislav Petkov x86/boot: Further compress CPUs bootup message
Turn it into (for example):

[    0.073380] x86: Booting SMP configuration:
[    0.074005] .... node   #0, CPUs:          #1   #2   #3   #4   #5   #6   #7
[    0.603005] .... node   #1, CPUs:     #8   #9  #10  #11  #12  #13  #14  #15
[    1.200005] .... node   #2, CPUs:    #16  #17  #18  #19  #20  #21  #22  #23
[    1.796005] .... node   #3, CPUs:    #24  #25  #26  #27  #28  #29  #30  #31
[    2.393005] .... node   #4, CPUs:    #32  #33  #34  #35  #36  #37  #38  #39
[    2.996005] .... node   #5, CPUs:    #40  #41  #42  #43  #44  #45  #46  #47
[    3.600005] .... node   #6, CPUs:    #48  #49  #50  #51  #52  #53  #54  #55
[    4.202005] .... node   #7, CPUs:    #56  #57  #58  #59  #60  #61  #62  #63
[    4.811005] .... node   #8, CPUs:    #64  #65  #66  #67  #68  #69  #70  #71
[    5.421006] .... node   #9, CPUs:    #72  #73  #74  #75  #76  #77  #78  #79
[    6.032005] .... node  #10, CPUs:    #80  #81  #82  #83  #84  #85  #86  #87
[    6.648006] .... node  #11, CPUs:    #88  #89  #90  #91  #92  #93  #94  #95
[    7.262005] .... node  #12, CPUs:    #96  #97  #98  #99 #100 #101 #102 #103
[    7.865005] .... node  #13, CPUs:   #104 #105 #106 #107 #108 #109 #110 #111
[    8.466005] .... node  #14, CPUs:   #112 #113 #114 #115 #116 #117 #118 #119
[    9.073006] .... node  #15, CPUs:   #120 #121 #122 #123 #124 #125 #126 #127
[    9.679901] x86: Booted up 16 nodes, 128 CPUs

and drop useless elements.

Change num_digits() to hpa's division-avoiding, cell-phone-typed
version which he went at great lengths and pains to submit on a
Saturday evening.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: huawei.libin@huawei.com
Cc: wangyijing@huawei.com
Cc: fenghua.yu@intel.com
Cc: guohanjun@huawei.com
Cc: paul.gortmaker@windriver.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20130930095624.GB16383@pd.tnic
Signed-off-by: Ingo Molnar <mingo@kernel.org>
a17bce4
@retornaz retornaz pushed a commit to retornaz/linux that referenced this pull request Feb 24, 2014
Alexei Starovoitov net: fix rtnl notification in atomic context
commit 991fb3f "dev: always advertise rx_flags changes via netlink"
introduced rtnl notification from __dev_set_promiscuity(),
which can be called in atomic context.

Steps to reproduce:
ip tuntap add dev tap1 mode tap
ifconfig tap1 up
tcpdump -nei tap1 &
ip tuntap del dev tap1 mode tap

[  271.627994] device tap1 left promiscuous mode
[  271.639897] BUG: sleeping function called from invalid context at mm/slub.c:940
[  271.664491] in_atomic(): 1, irqs_disabled(): 0, pid: 3394, name: ip
[  271.677525] INFO: lockdep is turned off.
[  271.690503] CPU: 0 PID: 3394 Comm: ip Tainted: G        W    3.12.0-rc3+ #73
[  271.703996] Hardware name: System manufacturer System Product Name/P8Z77 WS, BIOS 3007 07/26/2012
[  271.731254]  ffffffff81a58506 ffff8807f0d57a58 ffffffff817544e5 ffff88082fa0f428
[  271.760261]  ffff8808071f5f40 ffff8807f0d57a88 ffffffff8108bad1 ffffffff81110ff8
[  271.790683]  0000000000000010 00000000000000d0 00000000000000d0 ffff8807f0d57af8
[  271.822332] Call Trace:
[  271.838234]  [<ffffffff817544e5>] dump_stack+0x55/0x76
[  271.854446]  [<ffffffff8108bad1>] __might_sleep+0x181/0x240
[  271.870836]  [<ffffffff81110ff8>] ? rcu_irq_exit+0x68/0xb0
[  271.887076]  [<ffffffff811a80be>] kmem_cache_alloc_node+0x4e/0x2a0
[  271.903368]  [<ffffffff810b4ddc>] ? vprintk_emit+0x1dc/0x5a0
[  271.919716]  [<ffffffff81614d67>] ? __alloc_skb+0x57/0x2a0
[  271.936088]  [<ffffffff810b4de0>] ? vprintk_emit+0x1e0/0x5a0
[  271.952504]  [<ffffffff81614d67>] __alloc_skb+0x57/0x2a0
[  271.968902]  [<ffffffff8163a0b2>] rtmsg_ifinfo+0x52/0x100
[  271.985302]  [<ffffffff8162ac6d>] __dev_notify_flags+0xad/0xc0
[  272.001642]  [<ffffffff8162ad0c>] __dev_set_promiscuity+0x8c/0x1c0
[  272.017917]  [<ffffffff81731ea5>] ? packet_notifier+0x5/0x380
[  272.033961]  [<ffffffff8162b109>] dev_set_promiscuity+0x29/0x50
[  272.049855]  [<ffffffff8172e937>] packet_dev_mc+0x87/0xc0
[  272.065494]  [<ffffffff81732052>] packet_notifier+0x1b2/0x380
[  272.080915]  [<ffffffff81731ea5>] ? packet_notifier+0x5/0x380
[  272.096009]  [<ffffffff81761c66>] notifier_call_chain+0x66/0x150
[  272.110803]  [<ffffffff8108503e>] __raw_notifier_call_chain+0xe/0x10
[  272.125468]  [<ffffffff81085056>] raw_notifier_call_chain+0x16/0x20
[  272.139984]  [<ffffffff81620190>] call_netdevice_notifiers_info+0x40/0x70
[  272.154523]  [<ffffffff816201d6>] call_netdevice_notifiers+0x16/0x20
[  272.168552]  [<ffffffff816224c5>] rollback_registered_many+0x145/0x240
[  272.182263]  [<ffffffff81622641>] rollback_registered+0x31/0x40
[  272.195369]  [<ffffffff816229c8>] unregister_netdevice_queue+0x58/0x90
[  272.208230]  [<ffffffff81547ca0>] __tun_detach+0x140/0x340
[  272.220686]  [<ffffffff81547ed6>] tun_chr_close+0x36/0x60

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7f29405
@dongsupark dongsupark pushed a commit to dongsupark/linux that referenced this pull request Dec 17, 2014
Ming Lin virtio_blk: allow blk-mq to merge scatter gather lists
As it's now possible to have arbitrary number of segments, mq-capable
block drivers should set BLK_MQ_F_SG_MERGE in q->queue_flags.
Especially virtio_blk must do it, __blk_segment_map_sg() may create
too large sg lists. When QUEUE_FLAG_NO_SG_MERGE turned on, such sg lists
could later trigger BUG_ON(total_sg > vq->vring.num) in virtqueue_add().

[   26.763457] ------------[ cut here ]------------
[   26.764147] kernel BUG at /home/mlin/linux/drivers/virtio/virtio_ring.c:160!
[   26.765010] invalid opcode: 0000 [#1] PREEMPT SMP
[   26.765273] Modules linked in:
[   26.765273] CPU: 3 PID: 25 Comm: kworker/u8:1 Not tainted 3.18.0-00030-g141405f #73
[   26.765273] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org 04/01/2014
[   26.765273] Workqueue: writeback bdi_writeback_workfn (flush-254:0)
[   26.765273] task: ffff88001ebf0950 ti: ffff88001ebfc000 task.ti: ffff88001ebfc000
[   26.765273] RIP: 0010:[<ffffffff81314359>]  [<ffffffff81314359>] virtqueue_add_sgs+0x70/0x2fe
[   26.765273] RSP: 0000:ffff88001ebff6a8  EFLAGS: 00010002
[   26.765273] RAX: 0000000000000000 RBX: ffff88001e1ad000 RCX: ffffea0000698540
[   26.765273] RDX: ffffea0000698500 RSI: ffff88001ebff7c8 RDI: ffff88001ebff748
[   26.765273] RBP: ffff88001ebff708 R08: ffff88001d911330 R09: 0000000000000020
[   26.765273] R10: 0000160000000000 R11: ffff88001d7f0000 R12: ffff88001ebff7c8
[   26.765273] R13: 0000000000000002 R14: 0000000000000082 R15: 0000000000000003
[   26.777232] FS:  0000000000000000(0000) GS:ffff88001fd80000(0000) knlGS:0000000000000000
[   26.777232] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   26.777232] CR2: 00007fd84f9e5000 CR3: 000000001cf6a000 CR4: 00000000000006e0
[   26.777232] Stack:
[   26.777232]  ffff88000000007f ffff880000000020 ffff88001ebff7d8 ffff88001d911330
[   26.777232]  01ffea0000000003 0000007f00000080 0000000000000418 0000000000000000
[   26.777232]  ffff88001ebff748 ffff88001d911360 0000000000000002 ffff88001d911330
[   26.777232] Call Trace:
[   26.777232]  [<ffffffff81346b3b>] __virtblk_add_req+0x137/0x149
[   26.777232]  [<ffffffff812c027e>] ? part_round_stats+0x52/0x59
[   26.777232]  [<ffffffff812c6c2f>] ? __blk_segment_map_sg+0xbd/0x190
[   26.777232]  [<ffffffff812c6e07>] ? blk_rq_map_sg+0xb6/0x1cc
[   26.777232]  [<ffffffff81346c9b>] virtio_queue_rq+0x14e/0x1ee
[   26.777232]  [<ffffffff812ca138>] __blk_mq_run_hw_queue+0x1ac/0x2ad
[   26.777232]  [<ffffffff812ca7f2>] blk_mq_run_hw_queue+0x3d/0x77
[   26.777232]  [<ffffffff812caf81>] blk_mq_insert_requests+0x103/0x156
[   26.777232]  [<ffffffff812cbdd5>] blk_mq_flush_plug_list+0xeb/0xfa
[   26.777232]  [<ffffffff812c365f>] blk_flush_plug_list+0xb8/0x1e1
[   26.777232]  [<ffffffff812c379e>] blk_finish_plug+0x16/0x38
[   26.777232]  [<ffffffff811af1f9>] ext4_writepages+0x973/0xb66
[   26.777232]  [<ffffffff810dd9ff>] do_writepages+0x1e/0x2c
[   26.777232]  [<ffffffff81145118>] __writeback_single_inode+0x84/0x298
[   26.777232]  [<ffffffff8106aa0d>] ? wake_up_bit+0x25/0x2a
[   26.777232]  [<ffffffff8114638f>] writeback_sb_inodes+0x1fc/0x33d
[   26.777232]  [<ffffffff81146544>] __writeback_inodes_wb+0x74/0xb9
[   26.777232]  [<ffffffff811466d5>] wb_writeback+0x14c/0x2eb
[   26.777232]  [<ffffffff810dc7b1>] ? global_dirty_limits+0x1b/0x117
[   26.777232]  [<ffffffff81146b92>] bdi_writeback_workfn+0x1f6/0x40c
[   26.777232]  [<ffffffff8104ded7>] process_one_work+0x1ca/0x376
[   26.777232]  [<ffffffff8104e319>] worker_thread+0x267/0x366
[   26.777232]  [<ffffffff8104e0b2>] ? process_scheduled_works+0x2f/0x2f
[   26.777232]  [<ffffffff81051e7c>] kthread+0xd2/0xda
[   26.777232]  [<ffffffff81490000>] ? ldsem_down_write+0x6/0x19f
[   26.777232]  [<ffffffff81051daa>] ? kthread_freezable_should_stop+0x48/0x48
[   26.777232]  [<ffffffff81490b6c>] ret_from_fork+0x7c/0xb0
[   26.777232]  [<ffffffff81051daa>] ? kthread_freezable_should_stop+0x48/0x48

Signed-off-by: Ming Lin <mlin@minggr.net>
[dpark: added a precise description]
Signed-off-by: Dongsu Park <dongsu.park@profitbricks.com>
df594d2
@dongsupark dongsupark pushed a commit to dongsupark/linux that referenced this pull request Dec 23, 2014
Ming Lin virtio_blk: allow blk-mq to merge scatter gather lists
As it's now possible to have arbitrary number of segments, mq-capable
block drivers should set BLK_MQ_F_SG_MERGE in q->queue_flags.
Especially virtio_blk must do it, __blk_segment_map_sg() may create
too large sg lists. When QUEUE_FLAG_NO_SG_MERGE turned on, such sg lists
could later trigger BUG_ON(total_sg > vq->vring.num) in virtqueue_add().

[   26.763457] ------------[ cut here ]------------
[   26.764147] kernel BUG at /home/mlin/linux/drivers/virtio/virtio_ring.c:160!
[   26.765010] invalid opcode: 0000 [#1] PREEMPT SMP
[   26.765273] Modules linked in:
[   26.765273] CPU: 3 PID: 25 Comm: kworker/u8:1 Not tainted 3.18.0-00030-g141405f #73
[   26.765273] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org 04/01/2014
[   26.765273] Workqueue: writeback bdi_writeback_workfn (flush-254:0)
[   26.765273] task: ffff88001ebf0950 ti: ffff88001ebfc000 task.ti: ffff88001ebfc000
[   26.765273] RIP: 0010:[<ffffffff81314359>]  [<ffffffff81314359>] virtqueue_add_sgs+0x70/0x2fe
[   26.765273] RSP: 0000:ffff88001ebff6a8  EFLAGS: 00010002
[   26.765273] RAX: 0000000000000000 RBX: ffff88001e1ad000 RCX: ffffea0000698540
[   26.765273] RDX: ffffea0000698500 RSI: ffff88001ebff7c8 RDI: ffff88001ebff748
[   26.765273] RBP: ffff88001ebff708 R08: ffff88001d911330 R09: 0000000000000020
[   26.765273] R10: 0000160000000000 R11: ffff88001d7f0000 R12: ffff88001ebff7c8
[   26.765273] R13: 0000000000000002 R14: 0000000000000082 R15: 0000000000000003
[   26.777232] FS:  0000000000000000(0000) GS:ffff88001fd80000(0000) knlGS:0000000000000000
[   26.777232] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   26.777232] CR2: 00007fd84f9e5000 CR3: 000000001cf6a000 CR4: 00000000000006e0
[   26.777232] Stack:
[   26.777232]  ffff88000000007f ffff880000000020 ffff88001ebff7d8 ffff88001d911330
[   26.777232]  01ffea0000000003 0000007f00000080 0000000000000418 0000000000000000
[   26.777232]  ffff88001ebff748 ffff88001d911360 0000000000000002 ffff88001d911330
[   26.777232] Call Trace:
[   26.777232]  [<ffffffff81346b3b>] __virtblk_add_req+0x137/0x149
[   26.777232]  [<ffffffff812c027e>] ? part_round_stats+0x52/0x59
[   26.777232]  [<ffffffff812c6c2f>] ? __blk_segment_map_sg+0xbd/0x190
[   26.777232]  [<ffffffff812c6e07>] ? blk_rq_map_sg+0xb6/0x1cc
[   26.777232]  [<ffffffff81346c9b>] virtio_queue_rq+0x14e/0x1ee
[   26.777232]  [<ffffffff812ca138>] __blk_mq_run_hw_queue+0x1ac/0x2ad
[   26.777232]  [<ffffffff812ca7f2>] blk_mq_run_hw_queue+0x3d/0x77
[   26.777232]  [<ffffffff812caf81>] blk_mq_insert_requests+0x103/0x156
[   26.777232]  [<ffffffff812cbdd5>] blk_mq_flush_plug_list+0xeb/0xfa
[   26.777232]  [<ffffffff812c365f>] blk_flush_plug_list+0xb8/0x1e1
[   26.777232]  [<ffffffff812c379e>] blk_finish_plug+0x16/0x38
[   26.777232]  [<ffffffff811af1f9>] ext4_writepages+0x973/0xb66
[   26.777232]  [<ffffffff810dd9ff>] do_writepages+0x1e/0x2c
[   26.777232]  [<ffffffff81145118>] __writeback_single_inode+0x84/0x298
[   26.777232]  [<ffffffff8106aa0d>] ? wake_up_bit+0x25/0x2a
[   26.777232]  [<ffffffff8114638f>] writeback_sb_inodes+0x1fc/0x33d
[   26.777232]  [<ffffffff81146544>] __writeback_inodes_wb+0x74/0xb9
[   26.777232]  [<ffffffff811466d5>] wb_writeback+0x14c/0x2eb
[   26.777232]  [<ffffffff810dc7b1>] ? global_dirty_limits+0x1b/0x117
[   26.777232]  [<ffffffff81146b92>] bdi_writeback_workfn+0x1f6/0x40c
[   26.777232]  [<ffffffff8104ded7>] process_one_work+0x1ca/0x376
[   26.777232]  [<ffffffff8104e319>] worker_thread+0x267/0x366
[   26.777232]  [<ffffffff8104e0b2>] ? process_scheduled_works+0x2f/0x2f
[   26.777232]  [<ffffffff81051e7c>] kthread+0xd2/0xda
[   26.777232]  [<ffffffff81490000>] ? ldsem_down_write+0x6/0x19f
[   26.777232]  [<ffffffff81051daa>] ? kthread_freezable_should_stop+0x48/0x48
[   26.777232]  [<ffffffff81490b6c>] ret_from_fork+0x7c/0xb0
[   26.777232]  [<ffffffff81051daa>] ? kthread_freezable_should_stop+0x48/0x48

Signed-off-by: Ming Lin <mlin@minggr.net>
[dpark: added a precise description]
Signed-off-by: Dongsu Park <dongsu.park@profitbricks.com>
37e5240
@dongsupark dongsupark pushed a commit to dongsupark/linux that referenced this pull request Dec 29, 2014
Ming Lin virtio_blk: allow blk-mq to merge scatter gather lists
As it's now possible to have arbitrary number of segments, mq-capable
block drivers should set BLK_MQ_F_SG_MERGE in q->queue_flags.
Especially virtio_blk must do it, __blk_segment_map_sg() may create
too large sg lists. When QUEUE_FLAG_NO_SG_MERGE turned on, such sg lists
could later trigger BUG_ON(total_sg > vq->vring.num) in virtqueue_add().

[   26.763457] ------------[ cut here ]------------
[   26.764147] kernel BUG at /home/mlin/linux/drivers/virtio/virtio_ring.c:160!
[   26.765010] invalid opcode: 0000 [#1] PREEMPT SMP
[   26.765273] Modules linked in:
[   26.765273] CPU: 3 PID: 25 Comm: kworker/u8:1 Not tainted 3.18.0-00030-g141405f #73
[   26.765273] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org 04/01/2014
[   26.765273] Workqueue: writeback bdi_writeback_workfn (flush-254:0)
[   26.765273] task: ffff88001ebf0950 ti: ffff88001ebfc000 task.ti: ffff88001ebfc000
[   26.765273] RIP: 0010:[<ffffffff81314359>]  [<ffffffff81314359>] virtqueue_add_sgs+0x70/0x2fe
[   26.765273] RSP: 0000:ffff88001ebff6a8  EFLAGS: 00010002
[   26.765273] RAX: 0000000000000000 RBX: ffff88001e1ad000 RCX: ffffea0000698540
[   26.765273] RDX: ffffea0000698500 RSI: ffff88001ebff7c8 RDI: ffff88001ebff748
[   26.765273] RBP: ffff88001ebff708 R08: ffff88001d911330 R09: 0000000000000020
[   26.765273] R10: 0000160000000000 R11: ffff88001d7f0000 R12: ffff88001ebff7c8
[   26.765273] R13: 0000000000000002 R14: 0000000000000082 R15: 0000000000000003
[   26.777232] FS:  0000000000000000(0000) GS:ffff88001fd80000(0000) knlGS:0000000000000000
[   26.777232] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   26.777232] CR2: 00007fd84f9e5000 CR3: 000000001cf6a000 CR4: 00000000000006e0
[   26.777232] Stack:
[   26.777232]  ffff88000000007f ffff880000000020 ffff88001ebff7d8 ffff88001d911330
[   26.777232]  01ffea0000000003 0000007f00000080 0000000000000418 0000000000000000
[   26.777232]  ffff88001ebff748 ffff88001d911360 0000000000000002 ffff88001d911330
[   26.777232] Call Trace:
[   26.777232]  [<ffffffff81346b3b>] __virtblk_add_req+0x137/0x149
[   26.777232]  [<ffffffff812c027e>] ? part_round_stats+0x52/0x59
[   26.777232]  [<ffffffff812c6c2f>] ? __blk_segment_map_sg+0xbd/0x190
[   26.777232]  [<ffffffff812c6e07>] ? blk_rq_map_sg+0xb6/0x1cc
[   26.777232]  [<ffffffff81346c9b>] virtio_queue_rq+0x14e/0x1ee
[   26.777232]  [<ffffffff812ca138>] __blk_mq_run_hw_queue+0x1ac/0x2ad
[   26.777232]  [<ffffffff812ca7f2>] blk_mq_run_hw_queue+0x3d/0x77
[   26.777232]  [<ffffffff812caf81>] blk_mq_insert_requests+0x103/0x156
[   26.777232]  [<ffffffff812cbdd5>] blk_mq_flush_plug_list+0xeb/0xfa
[   26.777232]  [<ffffffff812c365f>] blk_flush_plug_list+0xb8/0x1e1
[   26.777232]  [<ffffffff812c379e>] blk_finish_plug+0x16/0x38
[   26.777232]  [<ffffffff811af1f9>] ext4_writepages+0x973/0xb66
[   26.777232]  [<ffffffff810dd9ff>] do_writepages+0x1e/0x2c
[   26.777232]  [<ffffffff81145118>] __writeback_single_inode+0x84/0x298
[   26.777232]  [<ffffffff8106aa0d>] ? wake_up_bit+0x25/0x2a
[   26.777232]  [<ffffffff8114638f>] writeback_sb_inodes+0x1fc/0x33d
[   26.777232]  [<ffffffff81146544>] __writeback_inodes_wb+0x74/0xb9
[   26.777232]  [<ffffffff811466d5>] wb_writeback+0x14c/0x2eb
[   26.777232]  [<ffffffff810dc7b1>] ? global_dirty_limits+0x1b/0x117
[   26.777232]  [<ffffffff81146b92>] bdi_writeback_workfn+0x1f6/0x40c
[   26.777232]  [<ffffffff8104ded7>] process_one_work+0x1ca/0x376
[   26.777232]  [<ffffffff8104e319>] worker_thread+0x267/0x366
[   26.777232]  [<ffffffff8104e0b2>] ? process_scheduled_works+0x2f/0x2f
[   26.777232]  [<ffffffff81051e7c>] kthread+0xd2/0xda
[   26.777232]  [<ffffffff81490000>] ? ldsem_down_write+0x6/0x19f
[   26.777232]  [<ffffffff81051daa>] ? kthread_freezable_should_stop+0x48/0x48
[   26.777232]  [<ffffffff81490b6c>] ret_from_fork+0x7c/0xb0
[   26.777232]  [<ffffffff81051daa>] ? kthread_freezable_should_stop+0x48/0x48

Signed-off-by: Ming Lin <mlin@minggr.net>
[dpark: added a precise description]
Signed-off-by: Dongsu Park <dongsu.park@profitbricks.com>
0e14a26
@dongsupark dongsupark pushed a commit to dongsupark/linux that referenced this pull request Jan 12, 2015
Ming Lin virtio_blk: allow blk-mq to merge scatter gather lists
As it's now possible to have arbitrary number of segments, mq-capable
block drivers should set BLK_MQ_F_SG_MERGE in q->queue_flags.
Especially virtio_blk must do it, __blk_segment_map_sg() may create
too large sg lists. When QUEUE_FLAG_NO_SG_MERGE turned on, such sg lists
could later trigger BUG_ON(total_sg > vq->vring.num) in virtqueue_add().

[   26.763457] ------------[ cut here ]------------
[   26.764147] kernel BUG at /home/mlin/linux/drivers/virtio/virtio_ring.c:160!
[   26.765010] invalid opcode: 0000 [#1] PREEMPT SMP
[   26.765273] Modules linked in:
[   26.765273] CPU: 3 PID: 25 Comm: kworker/u8:1 Not tainted 3.18.0-00030-g141405f #73
[   26.765273] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org 04/01/2014
[   26.765273] Workqueue: writeback bdi_writeback_workfn (flush-254:0)
[   26.765273] task: ffff88001ebf0950 ti: ffff88001ebfc000 task.ti: ffff88001ebfc000
[   26.765273] RIP: 0010:[<ffffffff81314359>]  [<ffffffff81314359>] virtqueue_add_sgs+0x70/0x2fe
[   26.765273] RSP: 0000:ffff88001ebff6a8  EFLAGS: 00010002
[   26.765273] RAX: 0000000000000000 RBX: ffff88001e1ad000 RCX: ffffea0000698540
[   26.765273] RDX: ffffea0000698500 RSI: ffff88001ebff7c8 RDI: ffff88001ebff748
[   26.765273] RBP: ffff88001ebff708 R08: ffff88001d911330 R09: 0000000000000020
[   26.765273] R10: 0000160000000000 R11: ffff88001d7f0000 R12: ffff88001ebff7c8
[   26.765273] R13: 0000000000000002 R14: 0000000000000082 R15: 0000000000000003
[   26.777232] FS:  0000000000000000(0000) GS:ffff88001fd80000(0000) knlGS:0000000000000000
[   26.777232] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   26.777232] CR2: 00007fd84f9e5000 CR3: 000000001cf6a000 CR4: 00000000000006e0
[   26.777232] Stack:
[   26.777232]  ffff88000000007f ffff880000000020 ffff88001ebff7d8 ffff88001d911330
[   26.777232]  01ffea0000000003 0000007f00000080 0000000000000418 0000000000000000
[   26.777232]  ffff88001ebff748 ffff88001d911360 0000000000000002 ffff88001d911330
[   26.777232] Call Trace:
[   26.777232]  [<ffffffff81346b3b>] __virtblk_add_req+0x137/0x149
[   26.777232]  [<ffffffff812c027e>] ? part_round_stats+0x52/0x59
[   26.777232]  [<ffffffff812c6c2f>] ? __blk_segment_map_sg+0xbd/0x190
[   26.777232]  [<ffffffff812c6e07>] ? blk_rq_map_sg+0xb6/0x1cc
[   26.777232]  [<ffffffff81346c9b>] virtio_queue_rq+0x14e/0x1ee
[   26.777232]  [<ffffffff812ca138>] __blk_mq_run_hw_queue+0x1ac/0x2ad
[   26.777232]  [<ffffffff812ca7f2>] blk_mq_run_hw_queue+0x3d/0x77
[   26.777232]  [<ffffffff812caf81>] blk_mq_insert_requests+0x103/0x156
[   26.777232]  [<ffffffff812cbdd5>] blk_mq_flush_plug_list+0xeb/0xfa
[   26.777232]  [<ffffffff812c365f>] blk_flush_plug_list+0xb8/0x1e1
[   26.777232]  [<ffffffff812c379e>] blk_finish_plug+0x16/0x38
[   26.777232]  [<ffffffff811af1f9>] ext4_writepages+0x973/0xb66
[   26.777232]  [<ffffffff810dd9ff>] do_writepages+0x1e/0x2c
[   26.777232]  [<ffffffff81145118>] __writeback_single_inode+0x84/0x298
[   26.777232]  [<ffffffff8106aa0d>] ? wake_up_bit+0x25/0x2a
[   26.777232]  [<ffffffff8114638f>] writeback_sb_inodes+0x1fc/0x33d
[   26.777232]  [<ffffffff81146544>] __writeback_inodes_wb+0x74/0xb9
[   26.777232]  [<ffffffff811466d5>] wb_writeback+0x14c/0x2eb
[   26.777232]  [<ffffffff810dc7b1>] ? global_dirty_limits+0x1b/0x117
[   26.777232]  [<ffffffff81146b92>] bdi_writeback_workfn+0x1f6/0x40c
[   26.777232]  [<ffffffff8104ded7>] process_one_work+0x1ca/0x376
[   26.777232]  [<ffffffff8104e319>] worker_thread+0x267/0x366
[   26.777232]  [<ffffffff8104e0b2>] ? process_scheduled_works+0x2f/0x2f
[   26.777232]  [<ffffffff81051e7c>] kthread+0xd2/0xda
[   26.777232]  [<ffffffff81490000>] ? ldsem_down_write+0x6/0x19f
[   26.777232]  [<ffffffff81051daa>] ? kthread_freezable_should_stop+0x48/0x48
[   26.777232]  [<ffffffff81490b6c>] ret_from_fork+0x7c/0xb0
[   26.777232]  [<ffffffff81051daa>] ? kthread_freezable_should_stop+0x48/0x48

Signed-off-by: Ming Lin <mlin@minggr.net>
[dpark: added a precise description]
Signed-off-by: Dongsu Park <dongsu.park@profitbricks.com>
443b0a4
@krzk krzk pushed a commit to krzk/linux that referenced this pull request May 2, 2015
Andrew Morton mm-uninline-and-cleanup-page-mapping-related-helpers-checkpatch-fixes
ERROR: "foo * bar" should be "foo *bar"
#73: FILE: mm/util.c:328:
+static inline void * __page_rmapping(struct page *page)

total: 1 errors, 0 warnings, 90 lines checked

./patches/mm-uninline-and-cleanup-page-mapping-related-helpers.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
62feaab
@torvalds torvalds pushed a commit that referenced this pull request Jul 22, 2015
@davem330 davem330 Merge branch 'sch_panic'
Daniel Borkmann says:

====================
Couple of classifier fixes

This fixes a couple of panics in the form of (analogous for
cls_flow{,er}):

[  912.759276] BUG: unable to handle kernel NULL pointer dereference at (null)
[  912.759373] IP: [<ffffffffa09d4d6d>] cls_bpf_change+0x23d/0x268 [cls_bpf]
[  912.759441] PGD 8783c067 PUD 5f684067 PMD 0
[  912.759491] Oops: 0002 [#1] SMP DEBUG_PAGEALLOC
[  912.759543] Modules linked in: cls_bpf(E) act_gact [...]
[  912.772734] CPU: 3 PID: 10489 Comm: tc Tainted: G        W   E   4.2.0-rc2+ #73
[  912.775004] Hardware name: Apple Inc. MacBookAir5,1/Mac-66F35F19FE2A0D05, BIOS MBA51.88Z.00EF.B02.1211271028 11/27/2012
[  912.777327] task: ffff88025eaa8000 ti: ffff88005f734000 task.ti: ffff88005f734000
[  912.779662] RIP: 0010:[<ffffffffa09d4d6d>]  [<ffffffffa09d4d6d>] cls_bpf_change+0x23d/0x268 [cls_bpf]
[  912.781991] RSP: 0018:ffff88005f7379c8  EFLAGS: 00010286
[  912.784183] RAX: ffff880201d64e48 RBX: 0000000000000000 RCX: ffff880201d64e40
[  912.786402] RDX: 0000000000000000 RSI: ffffffffa09d51c0 RDI: ffffffffa09d51a6
[  912.788625] RBP: ffff88005f737a68 R08: 0000000000000000 R09: 0000000000000000
[  912.790854] R10: 0000000000000001 R11: 0000000000000001 R12: ffff880078ab5a80
[  912.793082] R13: ffff880232b31570 R14: ffff88005f737ae0 R15: ffff8801e215d1d0
[  912.795181] FS:  00007f3c0c80d740(0000) GS:ffff880265400000(0000) knlGS:0000000000000000
[  912.797281] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  912.799402] CR2: 0000000000000000 CR3: 000000005460f000 CR4: 00000000001407e0
[  912.799403] Stack:
[  912.799407]  ffffffff00000000 ffff88023ea18000 000000005f737a08 0000000000000000
[  912.799415]  ffffffff81f06140 ffff880201d64e40 0000000000000000 ffff88023ea1804c
[  912.799418]  0000000000000000 ffff88023ea18044 ffff88023ea18030 ffff88023ea18038
[  912.799418] Call Trace:
[  912.799437]  [<ffffffff816d5685>] tc_ctl_tfilter+0x335/0x910
[  912.799443]  [<ffffffff813622a8>] ? security_capable+0x48/0x60
[  912.799448]  [<ffffffff816b90e5>] rtnetlink_rcv_msg+0x95/0x240
[  912.799454]  [<ffffffff810f612d>] ? trace_hardirqs_on+0xd/0x10
[  912.799456]  [<ffffffff816b902f>] ? rtnetlink_rcv+0x1f/0x40
[  912.799459]  [<ffffffff816b902f>] ? rtnetlink_rcv+0x1f/0x40
[  912.799461]  [<ffffffff816b9050>] ? rtnetlink_rcv+0x40/0x40
[  912.799464]  [<ffffffff816df38f>] netlink_rcv_skb+0xaf/0xc0
[  912.799467]  [<ffffffff816b903e>] rtnetlink_rcv+0x2e/0x40
[  912.799469]  [<ffffffff816deaef>] netlink_unicast+0xef/0x1b0
[  912.799471]  [<ffffffff816defa0>] netlink_sendmsg+0x3f0/0x620
[  912.799476]  [<ffffffff81687028>] sock_sendmsg+0x38/0x50
[  912.799479]  [<ffffffff81687938>] ___sys_sendmsg+0x288/0x290
[  912.799482]  [<ffffffff810f7852>] ? __lock_acquire+0x572/0x2050
[  912.799488]  [<ffffffff810265db>] ? native_sched_clock+0x2b/0x90
[  912.799493]  [<ffffffff8116135f>] ? __audit_syscall_entry+0xaf/0x100
[  912.799497]  [<ffffffff8116135f>] ? __audit_syscall_entry+0xaf/0x100
[  912.799501]  [<ffffffff8112aa19>] ? current_kernel_time+0x69/0xd0
[  912.799505]  [<ffffffff81266f16>] ? __fget_light+0x66/0x90
[  912.799508]  [<ffffffff81688812>] __sys_sendmsg+0x42/0x80
[  912.799510]  [<ffffffff81688862>] SyS_sendmsg+0x12/0x20
[  912.799515]  [<ffffffff817f9a6e>] entry_SYSCALL_64_fastpath+0x12/0x76
[  912.799540] Code: 4d 88 49 8b 57 08 48 89 51 08 49 8b 57 10 48 89 c8 48 83 c0 08 48
                     89 51 10 48 8b 51 10 48 c7 c6 c0 51 9d a0 48 c7 c7 a6 51 9d a0 <48>
                     89 02 48 8b 51 08 48 89 42 08 48 b8 00 02 20 00 00 00 ad de
[  912.799544] RIP  [<ffffffffa09d4d6d>] cls_bpf_change+0x23d/0x268 [cls_bpf]
[  912.799544]  RSP <ffff88005f7379c8>
[  912.799545] CR2: 0000000000000000
[  912.807380] ---[ end trace a6440067cfdc7c29 ]---

I've split them into 3 patches, so they can be backported easier
when needed.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
053c26f
@0day-ci 0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Oct 18, 2015
Andrew Morton mm-fs-introduce-mapping_gfp_constraint-checkpatch-fixes
WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#46: FILE: drivers/gpu/drm/drm_gem.c:494:
+		BUG_ON(mapping_gfp_constraint(mapping, __GFP_DMA32) &&

WARNING: line over 80 characters
#73: FILE: fs/btrfs/compression.c:485:
+		page = __page_cache_alloc(mapping_gfp_constraint(mapping, ~__GFP_FS));

WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#183: FILE: fs/logfs/segment.c:60:
+	BUG_ON(mapping_gfp_constraint(mapping, __GFP_FS));

WARNING: line over 80 characters
#228: FILE: fs/nilfs2/inode.c:359:
+			     mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS));

WARNING: line over 80 characters
#237: FILE: fs/nilfs2/inode.c:525:
+			     mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS));

WARNING: line over 80 characters
#249: FILE: fs/ntfs/file.c:529:
+					mapping_gfp_constraint(mapping, GFP_KERNEL));

WARNING: line over 80 characters
#261: FILE: fs/splice.c:363:
+					mapping_gfp_constraint(mapping, GFP_KERNEL));

WARNING: line over 80 characters
#290: FILE: mm/filemap.c:1725:
+					mapping_gfp_constraint(mapping, GFP_KERNEL));

total: 0 errors, 8 warnings, 205 lines checked

./patches/mm-fs-introduce-mapping_gfp_constraint.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
17568b8
@0day-ci 0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Oct 21, 2015
Andrew Morton mm-fs-introduce-mapping_gfp_constraint-checkpatch-fixes
WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#46: FILE: drivers/gpu/drm/drm_gem.c:494:
+		BUG_ON(mapping_gfp_constraint(mapping, __GFP_DMA32) &&

WARNING: line over 80 characters
#73: FILE: fs/btrfs/compression.c:485:
+		page = __page_cache_alloc(mapping_gfp_constraint(mapping, ~__GFP_FS));

WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#183: FILE: fs/logfs/segment.c:60:
+	BUG_ON(mapping_gfp_constraint(mapping, __GFP_FS));

WARNING: line over 80 characters
#228: FILE: fs/nilfs2/inode.c:359:
+			     mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS));

WARNING: line over 80 characters
#237: FILE: fs/nilfs2/inode.c:525:
+			     mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS));

WARNING: line over 80 characters
#249: FILE: fs/ntfs/file.c:529:
+					mapping_gfp_constraint(mapping, GFP_KERNEL));

WARNING: line over 80 characters
#261: FILE: fs/splice.c:363:
+					mapping_gfp_constraint(mapping, GFP_KERNEL));

WARNING: line over 80 characters
#290: FILE: mm/filemap.c:1725:
+					mapping_gfp_constraint(mapping, GFP_KERNEL));

total: 0 errors, 8 warnings, 205 lines checked

./patches/mm-fs-introduce-mapping_gfp_constraint.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
480640f
@0day-ci 0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Oct 22, 2015
Andrew Morton mm-fs-introduce-mapping_gfp_constraint-checkpatch-fixes
WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#46: FILE: drivers/gpu/drm/drm_gem.c:494:
+		BUG_ON(mapping_gfp_constraint(mapping, __GFP_DMA32) &&

WARNING: line over 80 characters
#73: FILE: fs/btrfs/compression.c:485:
+		page = __page_cache_alloc(mapping_gfp_constraint(mapping, ~__GFP_FS));

WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#183: FILE: fs/logfs/segment.c:60:
+	BUG_ON(mapping_gfp_constraint(mapping, __GFP_FS));

WARNING: line over 80 characters
#228: FILE: fs/nilfs2/inode.c:359:
+			     mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS));

WARNING: line over 80 characters
#237: FILE: fs/nilfs2/inode.c:525:
+			     mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS));

WARNING: line over 80 characters
#249: FILE: fs/ntfs/file.c:529:
+					mapping_gfp_constraint(mapping, GFP_KERNEL));

WARNING: line over 80 characters
#261: FILE: fs/splice.c:363:
+					mapping_gfp_constraint(mapping, GFP_KERNEL));

WARNING: line over 80 characters
#290: FILE: mm/filemap.c:1725:
+					mapping_gfp_constraint(mapping, GFP_KERNEL));

total: 0 errors, 8 warnings, 205 lines checked

./patches/mm-fs-introduce-mapping_gfp_constraint.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
d3fa27f
@Naoya-Horiguchi Naoya-Horiguchi pushed a commit to Naoya-Horiguchi/linux that referenced this pull request Oct 30, 2015
Andrew Morton mm-fs-introduce-mapping_gfp_constraint-checkpatch-fixes
WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#46: FILE: drivers/gpu/drm/drm_gem.c:494:
+		BUG_ON(mapping_gfp_constraint(mapping, __GFP_DMA32) &&

WARNING: line over 80 characters
#73: FILE: fs/btrfs/compression.c:485:
+		page = __page_cache_alloc(mapping_gfp_constraint(mapping, ~__GFP_FS));

WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#183: FILE: fs/logfs/segment.c:60:
+	BUG_ON(mapping_gfp_constraint(mapping, __GFP_FS));

WARNING: line over 80 characters
#228: FILE: fs/nilfs2/inode.c:359:
+			     mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS));

WARNING: line over 80 characters
#237: FILE: fs/nilfs2/inode.c:525:
+			     mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS));

WARNING: line over 80 characters
#249: FILE: fs/ntfs/file.c:529:
+					mapping_gfp_constraint(mapping, GFP_KERNEL));

WARNING: line over 80 characters
#261: FILE: fs/splice.c:363:
+					mapping_gfp_constraint(mapping, GFP_KERNEL));

WARNING: line over 80 characters
#290: FILE: mm/filemap.c:1725:
+					mapping_gfp_constraint(mapping, GFP_KERNEL));

total: 0 errors, 8 warnings, 205 lines checked

./patches/mm-fs-introduce-mapping_gfp_constraint.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
66502b7
@Reichl Reichl pushed a commit to Reichl/linux-odroid that referenced this pull request Apr 7, 2016
@minchank minchank mm: call swap_slot_free_notify() with page lock held
Kyeongdon reported below error which is BUG_ON(!PageSwapCache(page)) in
page_swap_info.  The reason is that page_endio in rw_page unlocks the page
if read I/O is completed so we need to hold a PG_lock again to check
PageSwapCache.  Otherwise, the page can be removed from swapcache.

[27833.995833] ------------[ cut here ]------------
[27833.995853] Kernel BUG at c00f9040 [verbose debug info unavailable]
[27833.995865] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[27833.995876] Modules linked in:
[27833.995892] CPU: 4 PID: 13446 Comm: RenderThread Tainted: G        W 3.10.84-g9f14aec-dirty #73
[27833.995903] task: c3b73200 ti: dd192000 task.ti: dd192000
[27833.995922] PC is at page_swap_info+0x10/0x2c
[27833.995934] LR is at swap_slot_free_notify+0x18/0x6c
[27833.995946] pc : [<c00f9040>]    lr : [<c00f5560>]    psr: 400f0113
[27833.995946] sp : dd193d78  ip : c2deb1e4  fp : da015180
[27833.995959] r10: 00000000  r9 : 000200da  r8 : c120fe08
[27833.995968] r7 : 00000000  r6 : 00000000  r5 : c249a6c0  r4 : = c249a6c0
[27833.995979] r3 : 00000000  r2 : 40080009  r1 : 200f0113  r0 : = c249a6c0
..<snip>
[27833.996273] [<c00f9040>] (page_swap_info+0x10/0x2c) from [<c00f5560>] (swap_slot_free_notify+0x18/0x6c)
[27833.996288] [<c00f5560>] (swap_slot_free_notify+0x18/0x6c) from [<c00f5c5c>] (swap_readpage+0x90/0x11c)
[27833.996302] [<c00f5c5c>] (swap_readpage+0x90/0x11c) from [<c00f62dc>] (read_swap_cache_async+0x134/0x1ac)
[27833.996317] [<c00f62dc>] (read_swap_cache_async+0x134/0x1ac) from [<c00f63c4>] (swapin_readahead+0x70/0xb0)
[27833.996334] [<c00f63c4>] (swapin_readahead+0x70/0xb0) from = [<c00e87e0>] (handle_pte_fault+0x320/0x6fc)
[27833.996348] [<c00e87e0>] (handle_pte_fault+0x320/0x6fc) from [<c00e8c7c>] (handle_mm_fault+0xc0/0xf0)
[27833.996363] [<c00e8c7c>] (handle_mm_fault+0xc0/0xf0) from = [<c001ac18>] (do_page_fault+0x11c/0x36c)
[27833.996378] [<c001ac18>] (do_page_fault+0x11c/0x36c) from = [<c000838c>] (do_DataAbort+0x34/0x118)
[27833.996392] [<c000838c>] (do_DataAbort+0x34/0x118) from [<c000d8b4>] (__dabt_usr+0x34/0x40)

Fixes: 3f2b1a0 ("zram: revive swap_slot_free_notify")
Signed-off-by: Minchan Kim <minchan@kernel.org>
Tested-by: Kyeongdon Kim <kyeongdon.kim@lge.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
803140c
@0day-ci 0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Apr 26, 2016
@minchank minchank mm: call swap_slot_free_notify() with page lock held
Kyeongdon reported below error which is BUG_ON(!PageSwapCache(page)) in
page_swap_info.  The reason is that page_endio in rw_page unlocks the page
if read I/O is completed so we need to hold a PG_lock again to check
PageSwapCache.  Otherwise, the page can be removed from swapcache.

[27833.995833] ------------[ cut here ]------------
[27833.995853] Kernel BUG at c00f9040 [verbose debug info unavailable]
[27833.995865] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[27833.995876] Modules linked in:
[27833.995892] CPU: 4 PID: 13446 Comm: RenderThread Tainted: G        W 3.10.84-g9f14aec-dirty #73
[27833.995903] task: c3b73200 ti: dd192000 task.ti: dd192000
[27833.995922] PC is at page_swap_info+0x10/0x2c
[27833.995934] LR is at swap_slot_free_notify+0x18/0x6c
[27833.995946] pc : [<c00f9040>]    lr : [<c00f5560>]    psr: 400f0113
[27833.995946] sp : dd193d78  ip : c2deb1e4  fp : da015180
[27833.995959] r10: 00000000  r9 : 000200da  r8 : c120fe08
[27833.995968] r7 : 00000000  r6 : 00000000  r5 : c249a6c0  r4 : = c249a6c0
[27833.995979] r3 : 00000000  r2 : 40080009  r1 : 200f0113  r0 : = c249a6c0
..<snip>
[27833.996273] [<c00f9040>] (page_swap_info+0x10/0x2c) from [<c00f5560>] (swap_slot_free_notify+0x18/0x6c)
[27833.996288] [<c00f5560>] (swap_slot_free_notify+0x18/0x6c) from [<c00f5c5c>] (swap_readpage+0x90/0x11c)
[27833.996302] [<c00f5c5c>] (swap_readpage+0x90/0x11c) from [<c00f62dc>] (read_swap_cache_async+0x134/0x1ac)
[27833.996317] [<c00f62dc>] (read_swap_cache_async+0x134/0x1ac) from [<c00f63c4>] (swapin_readahead+0x70/0xb0)
[27833.996334] [<c00f63c4>] (swapin_readahead+0x70/0xb0) from = [<c00e87e0>] (handle_pte_fault+0x320/0x6fc)
[27833.996348] [<c00e87e0>] (handle_pte_fault+0x320/0x6fc) from [<c00e8c7c>] (handle_mm_fault+0xc0/0xf0)
[27833.996363] [<c00e8c7c>] (handle_mm_fault+0xc0/0xf0) from = [<c001ac18>] (do_page_fault+0x11c/0x36c)
[27833.996378] [<c001ac18>] (do_page_fault+0x11c/0x36c) from = [<c000838c>] (do_DataAbort+0x34/0x118)
[27833.996392] [<c000838c>] (do_DataAbort+0x34/0x118) from [<c000d8b4>] (__dabt_usr+0x34/0x40)

Fixes: 3f2b1a0 ("zram: revive swap_slot_free_notify")
Signed-off-by: Minchan Kim <minchan@kernel.org>
Tested-by: Kyeongdon Kim <kyeongdon.kim@lge.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
78f51fc
@0day-ci 0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Apr 28, 2016
@minchank minchank mm: call swap_slot_free_notify() with page lock held
Kyeongdon reported below error which is BUG_ON(!PageSwapCache(page)) in
page_swap_info.  The reason is that page_endio in rw_page unlocks the page
if read I/O is completed so we need to hold a PG_lock again to check
PageSwapCache.  Otherwise, the page can be removed from swapcache.

[27833.995833] ------------[ cut here ]------------
[27833.995853] Kernel BUG at c00f9040 [verbose debug info unavailable]
[27833.995865] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[27833.995876] Modules linked in:
[27833.995892] CPU: 4 PID: 13446 Comm: RenderThread Tainted: G        W 3.10.84-g9f14aec-dirty #73
[27833.995903] task: c3b73200 ti: dd192000 task.ti: dd192000
[27833.995922] PC is at page_swap_info+0x10/0x2c
[27833.995934] LR is at swap_slot_free_notify+0x18/0x6c
[27833.995946] pc : [<c00f9040>]    lr : [<c00f5560>]    psr: 400f0113
[27833.995946] sp : dd193d78  ip : c2deb1e4  fp : da015180
[27833.995959] r10: 00000000  r9 : 000200da  r8 : c120fe08
[27833.995968] r7 : 00000000  r6 : 00000000  r5 : c249a6c0  r4 : = c249a6c0
[27833.995979] r3 : 00000000  r2 : 40080009  r1 : 200f0113  r0 : = c249a6c0
..<snip>
[27833.996273] [<c00f9040>] (page_swap_info+0x10/0x2c) from [<c00f5560>] (swap_slot_free_notify+0x18/0x6c)
[27833.996288] [<c00f5560>] (swap_slot_free_notify+0x18/0x6c) from [<c00f5c5c>] (swap_readpage+0x90/0x11c)
[27833.996302] [<c00f5c5c>] (swap_readpage+0x90/0x11c) from [<c00f62dc>] (read_swap_cache_async+0x134/0x1ac)
[27833.996317] [<c00f62dc>] (read_swap_cache_async+0x134/0x1ac) from [<c00f63c4>] (swapin_readahead+0x70/0xb0)
[27833.996334] [<c00f63c4>] (swapin_readahead+0x70/0xb0) from = [<c00e87e0>] (handle_pte_fault+0x320/0x6fc)
[27833.996348] [<c00e87e0>] (handle_pte_fault+0x320/0x6fc) from [<c00e8c7c>] (handle_mm_fault+0xc0/0xf0)
[27833.996363] [<c00e8c7c>] (handle_mm_fault+0xc0/0xf0) from = [<c001ac18>] (do_page_fault+0x11c/0x36c)
[27833.996378] [<c001ac18>] (do_page_fault+0x11c/0x36c) from = [<c000838c>] (do_DataAbort+0x34/0x118)
[27833.996392] [<c000838c>] (do_DataAbort+0x34/0x118) from [<c000d8b4>] (__dabt_usr+0x34/0x40)

Fixes: 3f2b1a0 ("zram: revive swap_slot_free_notify")
Signed-off-by: Minchan Kim <minchan@kernel.org>
Tested-by: Kyeongdon Kim <kyeongdon.kim@lge.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
f794fc2
@Reichl Reichl pushed a commit to Reichl/linux-odroid that referenced this pull request Apr 29, 2016
@minchank minchank mm: call swap_slot_free_notify() with page lock held
Kyeongdon reported below error which is BUG_ON(!PageSwapCache(page)) in
page_swap_info.  The reason is that page_endio in rw_page unlocks the page
if read I/O is completed so we need to hold a PG_lock again to check
PageSwapCache.  Otherwise, the page can be removed from swapcache.

[27833.995833] ------------[ cut here ]------------
[27833.995853] Kernel BUG at c00f9040 [verbose debug info unavailable]
[27833.995865] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[27833.995876] Modules linked in:
[27833.995892] CPU: 4 PID: 13446 Comm: RenderThread Tainted: G        W 3.10.84-g9f14aec-dirty #73
[27833.995903] task: c3b73200 ti: dd192000 task.ti: dd192000
[27833.995922] PC is at page_swap_info+0x10/0x2c
[27833.995934] LR is at swap_slot_free_notify+0x18/0x6c
[27833.995946] pc : [<c00f9040>]    lr : [<c00f5560>]    psr: 400f0113
[27833.995946] sp : dd193d78  ip : c2deb1e4  fp : da015180
[27833.995959] r10: 00000000  r9 : 000200da  r8 : c120fe08
[27833.995968] r7 : 00000000  r6 : 00000000  r5 : c249a6c0  r4 : = c249a6c0
[27833.995979] r3 : 00000000  r2 : 40080009  r1 : 200f0113  r0 : = c249a6c0
..<snip>
[27833.996273] [<c00f9040>] (page_swap_info+0x10/0x2c) from [<c00f5560>] (swap_slot_free_notify+0x18/0x6c)
[27833.996288] [<c00f5560>] (swap_slot_free_notify+0x18/0x6c) from [<c00f5c5c>] (swap_readpage+0x90/0x11c)
[27833.996302] [<c00f5c5c>] (swap_readpage+0x90/0x11c) from [<c00f62dc>] (read_swap_cache_async+0x134/0x1ac)
[27833.996317] [<c00f62dc>] (read_swap_cache_async+0x134/0x1ac) from [<c00f63c4>] (swapin_readahead+0x70/0xb0)
[27833.996334] [<c00f63c4>] (swapin_readahead+0x70/0xb0) from = [<c00e87e0>] (handle_pte_fault+0x320/0x6fc)
[27833.996348] [<c00e87e0>] (handle_pte_fault+0x320/0x6fc) from [<c00e8c7c>] (handle_mm_fault+0xc0/0xf0)
[27833.996363] [<c00e8c7c>] (handle_mm_fault+0xc0/0xf0) from = [<c001ac18>] (do_page_fault+0x11c/0x36c)
[27833.996378] [<c001ac18>] (do_page_fault+0x11c/0x36c) from = [<c000838c>] (do_DataAbort+0x34/0x118)
[27833.996392] [<c000838c>] (do_DataAbort+0x34/0x118) from [<c000d8b4>] (__dabt_usr+0x34/0x40)

Fixes: 3f2b1a0 ("zram: revive swap_slot_free_notify")
Signed-off-by: Minchan Kim <minchan@kernel.org>
Tested-by: Kyeongdon Kim <kyeongdon.kim@lge.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
d9d8d9b
@torvalds torvalds added a commit that referenced this pull request Apr 29, 2016
@minchank minchank mm: call swap_slot_free_notify() with page lock held
Kyeongdon reported below error which is BUG_ON(!PageSwapCache(page)) in
page_swap_info.  The reason is that page_endio in rw_page unlocks the
page if read I/O is completed so we need to hold a PG_lock again to
check PageSwapCache.  Otherwise, the page can be removed from swapcache.

  Kernel BUG at c00f9040 [verbose debug info unavailable]
  Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
  Modules linked in:
  CPU: 4 PID: 13446 Comm: RenderThread Tainted: G        W 3.10.84-g9f14aec-dirty #73
  task: c3b73200 ti: dd192000 task.ti: dd192000
  PC is at page_swap_info+0x10/0x2c
  LR is at swap_slot_free_notify+0x18/0x6c
  pc : [<c00f9040>]    lr : [<c00f5560>]    psr: 400f0113
  sp : dd193d78  ip : c2deb1e4  fp : da015180
  r10: 00000000  r9 : 000200da  r8 : c120fe08
  r7 : 00000000  r6 : 00000000  r5 : c249a6c0  r4 : = c249a6c0
  r3 : 00000000  r2 : 40080009  r1 : 200f0113  r0 : = c249a6c0
  ..<snip> ..
  Call Trace:
    page_swap_info+0x10/0x2c
    swap_slot_free_notify+0x18/0x6c
    swap_readpage+0x90/0x11c
    read_swap_cache_async+0x134/0x1ac
    swapin_readahead+0x70/0xb0
    handle_pte_fault+0x320/0x6fc
    handle_mm_fault+0xc0/0xf0
    do_page_fault+0x11c/0x36c
    do_DataAbort+0x34/0x118

Fixes: 3f2b1a0 ("zram: revive swap_slot_free_notify")
Signed-off-by: Minchan Kim <minchan@kernel.org>
Tested-by: Kyeongdon Kim <kyeongdon.kim@lge.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
b06bad1
@ddstreet ddstreet pushed a commit to ddstreet/linux that referenced this pull request May 3, 2016
@minchank minchank mm: call swap_slot_free_notify() with page lock held
Kyeongdon reported below error which is BUG_ON(!PageSwapCache(page)) in
page_swap_info.  The reason is that page_endio in rw_page unlocks the page
if read I/O is completed so we need to hold a PG_lock again to check
PageSwapCache.  Otherwise, the page can be removed from swapcache.

[27833.995833] ------------[ cut here ]------------
[27833.995853] Kernel BUG at c00f9040 [verbose debug info unavailable]
[27833.995865] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[27833.995876] Modules linked in:
[27833.995892] CPU: 4 PID: 13446 Comm: RenderThread Tainted: G        W 3.10.84-g9f14aec-dirty #73
[27833.995903] task: c3b73200 ti: dd192000 task.ti: dd192000
[27833.995922] PC is at page_swap_info+0x10/0x2c
[27833.995934] LR is at swap_slot_free_notify+0x18/0x6c
[27833.995946] pc : [<c00f9040>]    lr : [<c00f5560>]    psr: 400f0113
[27833.995946] sp : dd193d78  ip : c2deb1e4  fp : da015180
[27833.995959] r10: 00000000  r9 : 000200da  r8 : c120fe08
[27833.995968] r7 : 00000000  r6 : 00000000  r5 : c249a6c0  r4 : = c249a6c0
[27833.995979] r3 : 00000000  r2 : 40080009  r1 : 200f0113  r0 : = c249a6c0
..<snip>
[27833.996273] [<c00f9040>] (page_swap_info+0x10/0x2c) from [<c00f5560>] (swap_slot_free_notify+0x18/0x6c)
[27833.996288] [<c00f5560>] (swap_slot_free_notify+0x18/0x6c) from [<c00f5c5c>] (swap_readpage+0x90/0x11c)
[27833.996302] [<c00f5c5c>] (swap_readpage+0x90/0x11c) from [<c00f62dc>] (read_swap_cache_async+0x134/0x1ac)
[27833.996317] [<c00f62dc>] (read_swap_cache_async+0x134/0x1ac) from [<c00f63c4>] (swapin_readahead+0x70/0xb0)
[27833.996334] [<c00f63c4>] (swapin_readahead+0x70/0xb0) from = [<c00e87e0>] (handle_pte_fault+0x320/0x6fc)
[27833.996348] [<c00e87e0>] (handle_pte_fault+0x320/0x6fc) from [<c00e8c7c>] (handle_mm_fault+0xc0/0xf0)
[27833.996363] [<c00e8c7c>] (handle_mm_fault+0xc0/0xf0) from = [<c001ac18>] (do_page_fault+0x11c/0x36c)
[27833.996378] [<c001ac18>] (do_page_fault+0x11c/0x36c) from = [<c000838c>] (do_DataAbort+0x34/0x118)
[27833.996392] [<c000838c>] (do_DataAbort+0x34/0x118) from [<c000d8b4>] (__dabt_usr+0x34/0x40)

Fixes: 3f2b1a0 ("zram: revive swap_slot_free_notify")
Signed-off-by: Minchan Kim <minchan@kernel.org>
Tested-by: Kyeongdon Kim <kyeongdon.kim@lge.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
c27b611
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment