Shuriyc Chu
5704a06810
fs/file.c: initialize init_files.resize_wait
(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>
2019-03-05 21:07:14 -08:00
..
2018-11-01 19:58:52 -07:00
2018-08-22 10:52:51 -07:00
2018-05-28 12:36:41 +02:00
2019-02-25 11:59:07 -08:00
2019-02-01 15:46:24 -08:00
2018-06-15 18:10:01 -03:00
2019-01-04 13:13:47 -08:00
2019-02-03 08:48:33 -08:00
2018-11-30 16:00:58 +00:00
2019-02-18 18:08:29 +01:00
2019-01-31 07:05:06 -06:00
2018-06-05 16:57:31 -07:00
2018-07-17 06:14:07 -07:00
2018-10-30 12:46:25 -07:00
2019-01-25 18:41:52 +08:00
2019-01-30 12:39:49 +01:00
2018-08-21 23:54:17 -04:00
2019-02-03 11:17:31 -08:00
2019-01-25 18:41:52 +08:00
2018-07-22 14:13:44 +02:00
2018-12-17 18:36:33 -05:00
2018-11-23 09:08:17 -05:00
2018-12-27 17:00:35 -08:00
2019-01-31 23:41:11 -05:00
2018-12-31 09:41:37 -08:00
2019-01-05 09:16:18 -08:00
2018-05-22 14:27:51 -04:00
2018-11-30 15:57:31 +00:00
2019-01-16 10:27:59 +01:00
2019-02-14 09:52:51 -08:00
2018-11-30 14:56:14 -08:00
2019-01-04 13:13:47 -08:00
2018-08-17 16:20:28 -07:00
2018-08-25 12:42:33 -07:00
2019-03-01 09:02:33 -08:00
2018-09-29 22:47:48 -04:00
2018-12-04 00:20:10 -05:00
2018-12-02 09:20:34 +01:00
2018-09-20 09:28:49 -05:00
2019-01-17 11:52:49 -05:00
2019-01-02 16:35:23 -08:00
2018-05-22 14:27:52 -04:00
2019-02-20 09:09:33 -08:00
2019-02-14 12:33:19 -05:00
2018-11-05 14:57:05 -05:00
2019-01-02 18:28:37 +01:00
2018-12-28 12:11:47 -08:00
2019-03-05 21:07:13 -08:00
2018-05-22 14:27:58 -04:00
2018-11-18 13:35:19 -08:00
2019-02-20 15:12:52 -05:00
2018-12-04 11:31:30 +01:00
2019-02-21 09:01:00 -08:00
2019-01-20 14:44:52 -08:00
2018-05-22 14:27:52 -04:00
2018-05-22 14:27:54 -04:00
2018-12-18 18:29:15 +01:00
2018-10-31 08:54:14 -07:00
2018-05-22 14:27:55 -04:00
2018-08-02 09:34:02 -07:00
2019-01-07 08:53:32 +01:00
2018-11-10 08:02:40 -05:00
2018-07-31 11:32:44 -04:00
2018-12-28 12:11:51 -08:00
2018-12-27 17:00:35 -08:00
2018-08-17 16:20:27 -07:00
2019-02-03 14:03:59 -08:00
2019-03-04 13:24:27 -08:00
2018-07-12 10:04:27 -04:00
2018-07-03 16:44:45 -04:00
2018-07-12 10:04:20 -04:00
2019-03-05 10:00:35 -08:00
2018-06-12 16:19:22 -07:00
2018-10-03 16:47:43 +02:00
2018-07-10 23:29:03 -04:00
2019-02-18 16:49:36 -08:00
2019-01-15 07:30:56 -07:00
2019-02-06 12:58:56 -07:00
2018-08-27 14:48:48 +02:00
2018-10-29 14:29:58 -07:00
2018-06-05 19:23:26 +02:00
2018-10-03 16:47:43 +02:00
2018-12-31 09:46:39 -08:00
2019-01-30 11:02:11 -08:00
2019-01-22 08:26:44 -07:00
2019-02-01 15:46:24 -08:00
2018-06-28 10:40:47 -07:00
2019-01-05 09:16:18 -08:00
2019-02-18 21:26:24 -05:00
2018-10-03 16:47:43 +02:00
2018-12-28 12:11:47 -08:00
2019-03-05 21:07:14 -08:00
2019-01-22 14:39:38 -07:00
2019-03-05 21:07:13 -08:00
2018-08-21 18:19:09 -07:00
2019-01-03 18:57:57 -08:00
2019-01-27 08:47:42 -08:00
2018-06-11 08:22:34 -07:00
2018-08-02 08:06:55 +09:00
2019-01-02 20:14:50 -05:00
2018-06-11 08:22:34 -07:00
2018-06-12 16:19:22 -07:00
2018-08-17 16:20:29 -07:00
2018-12-22 14:18:34 -08:00
2019-03-04 13:24:27 -08:00
2018-08-21 18:19:09 -07:00
2018-08-13 19:58:36 -07:00
2018-12-20 16:32:56 +00:00
2019-03-04 10:50:14 -08:00
2019-01-03 18:57:57 -08:00
2019-01-03 18:57:57 -08:00
2018-08-17 16:20:28 -07:00
2018-10-03 16:47:43 +02:00
2019-03-04 16:10:17 -08:00
2018-08-29 15:42:20 +02:00
2018-07-12 14:49:48 +01:00
2018-12-21 11:51:23 -05:00
2018-08-27 14:48:48 +02:00
2018-12-28 12:11:51 -08:00
2018-08-29 15:42:23 +02:00
2018-09-18 07:30:48 -04:00