Shuriyc Chu
1eaab115dc
fs/file.c: initialize init_files.resize_wait
...
[ Upstream commit 5704a06810682683355624923547b41540e2801a ]
(Taken from https://bugzilla.kernel.org/show_bug.cgi?id=200647 )
'get_unused_fd_flags' in kthread cause kernel crash. It works fine on
4.1, but causes crash after get 64 fds. It also cause crash on
ubuntu1404/1604/1804, centos7.5, and the crash messages are almost the
same.
The crash message on centos7.5 shows below:
start fd 61
start fd 62
start fd 63
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: __wake_up_common+0x2e/0x90
PGD 0
Oops: 0000 [#1 ] SMP
Modules linked in: test(OE) xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 tun bridge stp llc ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter devlink sunrpc kvm_intel kvm irqbypass crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd sg ppdev pcspkr virtio_balloon parport_pc parport i2c_piix4 joydev ip_tables xfs libcrc32c sr_mod cdrom sd_mod crc_t10dif crct10dif_generic ata_generic pata_acpi virtio_scsi virtio_console virtio_net cirrus drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm crct10dif_pclmul crct10dif_common crc32c_intel drm ata_piix serio_raw libata virtio_pci virtio_ring i2c_core
virtio floppy dm_mirror dm_region_hash dm_log dm_mod
CPU: 2 PID: 1820 Comm: test_fd Kdump: loaded Tainted: G OE ------------ 3.10.0-862.3.3.el7.x86_64 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.2-0-g5f4c7b1-prebuilt.qemu-project.org 04/01/2014
task: ffff8e92b9431fa0 ti: ffff8e94247a0000 task.ti: ffff8e94247a0000
RIP: 0010:__wake_up_common+0x2e/0x90
RSP: 0018:ffff8e94247a2d18 EFLAGS: 00010086
RAX: 0000000000000000 RBX: ffffffff9d09daa0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000003 RDI: ffffffff9d09daa0
RBP: ffff8e94247a2d50 R08: 0000000000000000 R09: ffff8e92b95dfda8
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff9d09daa8
R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000003
FS: 0000000000000000(0000) GS:ffff8e9434e80000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000017c686000 CR4: 00000000000207e0
Call Trace:
__wake_up+0x39/0x50
expand_files+0x131/0x250
__alloc_fd+0x47/0x170
get_unused_fd_flags+0x30/0x40
test_fd+0x12a/0x1c0 [test]
kthread+0xd1/0xe0
ret_from_fork_nospec_begin+0x21/0x21
Code: 66 90 55 48 89 e5 41 57 41 89 f7 41 56 41 89 ce 41 55 41 54 49 89 fc 49 83 c4 08 53 48 83 ec 10 48 8b 47 08 89 55 cc 4c 89 45 d0 <48> 8b 08 49 39 c4 48 8d 78 e8 4c 8d 69 e8 75 08 eb 3b 4c 89 ef
RIP __wake_up_common+0x2e/0x90
RSP <ffff8e94247a2d18>
CR2: 0000000000000000
This issue exists since CentOS 7.5 3.10.0-862 and CentOS 7.4
(3.10.0-693.21.1 ) is ok. Root cause: the item 'resize_wait' is not
initialized before being used.
Reported-by: Richard Zhang <zhang.zijian@h3c.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-04-27 09:33:49 +02:00
..
2019-03-23 08:44:32 +01:00
2018-05-30 07:48:51 +02:00
2017-12-20 10:04:56 +01:00
2019-03-23 08:44:27 +01:00
2018-12-01 09:46:33 +01:00
2019-04-03 06:23:26 +02:00
2018-12-17 21:55:12 +01:00
2019-03-23 08:44:15 +01:00
2019-04-27 09:33:47 +02:00
2017-11-24 08:32:25 +01:00
2018-11-21 09:27:44 +01:00
2018-11-21 09:27:37 +01:00
2019-02-20 10:13:18 +01:00
2016-08-16 09:30:49 +02:00
2019-02-20 10:13:04 +01:00
2018-05-30 07:48:52 +02:00
2016-03-03 15:07:09 -08:00
2018-11-27 16:08:00 +01:00
2018-12-17 21:55:10 +01:00
2019-03-23 08:44:36 +01:00
2019-04-27 09:33:47 +02:00
2019-04-27 09:33:49 +02:00
2018-11-10 07:41:40 -08:00
2018-12-17 21:55:11 +01:00
2019-02-20 10:13:16 +01:00
2019-02-06 19:43:07 +01:00
2018-12-17 21:55:12 +01:00
2018-12-17 21:55:12 +01:00
2016-09-30 10:18:39 +02:00
2016-06-01 12:15:54 -07:00
2019-03-23 08:44:23 +01:00
2017-11-30 08:37:20 +00:00
2019-03-23 08:44:37 +01:00
2019-01-26 09:42:53 +01:00
2018-08-09 12:19:28 +02:00
2018-12-13 09:21:29 +01:00
2018-11-21 09:27:36 +01:00
2015-11-06 17:50:42 -08:00
2019-03-23 08:44:21 +01:00
2019-03-23 08:44:39 +01:00
2018-02-03 17:04:28 +01:00
2019-03-23 08:44:39 +01:00
2018-05-30 07:48:52 +02:00
2018-04-24 09:32:11 +02:00
2015-11-06 17:50:42 -08:00
2019-04-27 09:33:48 +02:00
2018-09-15 09:40:41 +02:00
2019-04-03 06:23:28 +02:00
2019-01-26 09:42:53 +01:00
2018-09-09 20:04:36 +02:00
2015-10-16 11:42:28 -07:00
2018-11-27 16:08:00 +01:00
2017-06-17 06:39:38 +02:00
2018-08-06 16:24:42 +02:00
2018-09-05 09:18:40 +02:00
2018-12-17 21:55:09 +01:00
2015-11-04 22:13:45 -05:00
2018-10-13 09:11:34 +02:00
2019-04-03 06:23:14 +02:00
2018-05-30 07:48:52 +02:00
2019-01-26 09:42:52 +01:00
2018-12-21 14:09:50 +01:00
2016-10-22 12:26:56 +02:00
2015-11-10 12:07:22 -08:00
2018-11-21 09:27:41 +01:00
2018-07-03 11:21:26 +02:00
2019-02-20 10:13:20 +01:00
2017-05-20 14:27:01 +02:00
2017-06-14 13:16:24 +02:00
2018-02-25 11:03:51 +01:00
2018-04-08 11:51:57 +02:00
2017-07-05 14:37:20 +02:00
2015-11-16 23:54:45 -08:00
2019-04-03 06:23:19 +02:00
2017-10-18 09:20:42 +02:00
2019-03-23 08:44:26 +01:00
2019-02-20 10:13:14 +01:00
2018-12-17 21:55:16 +01:00
2018-01-31 12:06:11 +01:00
2016-04-12 09:08:58 -07:00
2019-04-27 09:33:49 +02:00
2018-05-16 10:06:51 +02:00
2019-04-03 06:23:21 +02:00
2015-11-16 23:54:45 -08:00
2018-01-17 09:35:27 +01:00
2015-10-15 10:33:21 -04:00
2017-07-21 07:44:57 +02:00
2017-06-14 13:16:24 +02:00
2018-12-01 09:46:41 +01:00
2018-11-21 09:27:44 +01:00
2018-02-16 20:09:43 +01:00
2017-07-15 11:57:44 +02:00
2018-05-26 08:48:51 +02:00
2017-07-21 07:44:58 +02:00
2017-04-30 05:49:28 +02:00
2017-01-26 08:23:47 +01:00
2016-04-12 09:08:55 -07:00
2019-02-06 19:43:06 +01:00
2018-01-31 12:06:09 +01:00
2017-08-06 19:19:42 -07:00
2017-02-23 17:43:09 +01:00
2017-06-14 13:16:24 +02:00
2019-02-06 19:43:08 +01:00
2015-11-06 17:50:42 -08:00
2017-05-08 07:46:01 +02:00
2017-12-20 10:04:53 +01:00
2016-10-22 12:26:56 +02:00
2018-09-09 20:04:36 +02:00