Dave Wysochanski
cb248819d2
cifs: use cifsInodeInfo->open_file_lock while iterating to avoid a panic
...
Commit 487317c99477 ("cifs: add spinlock for the openFileList to
cifsInodeInfo") added cifsInodeInfo->open_file_lock spin_lock to protect
the openFileList, but missed a few places where cifs_inode->openFileList
was enumerated. Change these remaining tcon->open_file_lock to
cifsInodeInfo->open_file_lock to avoid panic in is_size_safe_to_change.
[17313.245641] RIP: 0010:is_size_safe_to_change+0x57/0xb0 [cifs]
[17313.245645] Code: 68 40 48 89 ef e8 19 67 b7 f1 48 8b 43 40 48 8d 4b 40 48 8d 50 f0 48 39 c1 75 0f eb 47 48 8b 42 10 48 8d 50 f0 48 39 c1 74 3a <8b> 80 88 00 00 00 83 c0 01 a8 02 74 e6 48 89 ef c6 07 00 0f 1f 40
[17313.245649] RSP: 0018:ffff94ae1baefa30 EFLAGS: 00010202
[17313.245654] RAX: dead000000000100 RBX: ffff88dc72243300 RCX: ffff88dc72243340
[17313.245657] RDX: dead0000000000f0 RSI: 00000000098f7940 RDI: ffff88dd3102f040
[17313.245659] RBP: ffff88dd3102f040 R08: 0000000000000000 R09: ffff94ae1baefc40
[17313.245661] R10: ffffcdc8bb1c4e80 R11: ffffcdc8b50adb08 R12: 00000000098f7940
[17313.245663] R13: ffff88dc72243300 R14: ffff88dbc8f19600 R15: ffff88dc72243428
[17313.245667] FS: 00007fb145485700(0000) GS:ffff88dd3e000000(0000) knlGS:0000000000000000
[17313.245670] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[17313.245672] CR2: 0000026bb46c6000 CR3: 0000004edb110003 CR4: 00000000007606e0
[17313.245753] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[17313.245756] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[17313.245759] PKRU: 55555554
[17313.245761] Call Trace:
[17313.245803] cifs_fattr_to_inode+0x16b/0x580 [cifs]
[17313.245838] cifs_get_inode_info+0x35c/0xa60 [cifs]
[17313.245852] ? kmem_cache_alloc_trace+0x151/0x1d0
[17313.245885] cifs_open+0x38f/0x990 [cifs]
[17313.245921] ? cifs_revalidate_dentry_attr+0x3e/0x350 [cifs]
[17313.245953] ? cifsFileInfo_get+0x30/0x30 [cifs]
[17313.245960] ? do_dentry_open+0x132/0x330
[17313.245963] do_dentry_open+0x132/0x330
[17313.245969] path_openat+0x573/0x14d0
[17313.245974] do_filp_open+0x93/0x100
[17313.245979] ? __check_object_size+0xa3/0x181
[17313.245986] ? audit_alloc_name+0x7e/0xd0
[17313.245992] do_sys_open+0x184/0x220
[17313.245999] do_syscall_64+0x5b/0x1b0
Fixes: 487317c99477 ("cifs: add spinlock for the openFileList to cifsInodeInfo")
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-10-06 22:04:57 -05:00
..
2019-09-27 15:10:34 -07:00
2019-07-19 11:33:22 -07:00
2019-08-30 07:27:18 -07:00
2019-09-29 19:42:07 -07:00
2019-07-27 10:03:14 -04:00
2019-08-30 07:27:17 -07:00
2019-08-30 07:27:17 -07:00
2019-09-30 10:25:24 -07:00
2019-05-24 17:27:11 +02:00
2019-09-25 10:21:13 -07:00
2019-10-06 22:04:57 -05:00
2019-09-19 09:42:37 -07:00
2019-09-19 13:09:28 -07:00
2019-09-19 10:06:57 -07:00
2019-08-12 19:18:50 -07:00
2019-09-28 08:14:15 -07:00
2019-09-03 09:30:56 -04:00
2019-07-12 17:37:53 -07:00
2019-07-14 19:29:04 -07:00
2019-07-19 10:42:02 -07:00
2019-08-30 07:27:17 -07:00
2019-10-01 04:54:45 +08:00
2019-07-31 13:31:05 -06:00
2019-09-21 13:53:34 -07:00
2019-09-29 19:25:39 -07:00
2019-09-21 14:26:33 -07:00
2019-09-25 17:51:40 -07:00
2019-08-30 07:27:17 -07:00
2019-07-10 18:43:43 -07:00
2019-09-27 15:54:24 -07:00
2019-09-24 12:33:34 -07:00
2019-05-21 10:50:46 +02:00
2019-07-16 19:23:23 -07:00
2019-05-12 17:52:13 -04:00
2019-08-30 08:11:25 -07:00
2019-07-19 10:42:02 -07:00
2019-09-19 15:32:45 -07:00
2019-09-19 09:42:37 -07:00
2019-09-24 15:54:07 -07:00
2019-09-26 11:33:30 -07:00
2019-09-19 09:42:37 -07:00
2019-09-19 09:42:37 -07:00
2019-07-03 17:52:09 -04:00
2019-08-30 07:27:17 -07:00
2019-09-26 12:20:14 -07:00
2019-05-21 10:50:46 +02:00
2019-09-27 17:00:27 -07:00
2019-07-01 08:25:34 -07:00
2019-05-21 10:50:46 +02:00
2019-09-27 17:00:27 -07:00
2019-09-26 10:10:44 -07:00
2019-09-24 15:54:07 -07:00
2019-08-30 08:11:25 -07:00
2019-07-19 10:42:02 -07:00
2019-09-19 10:21:35 -07:00
2019-09-11 16:11:45 +02:00
2019-09-28 08:14:15 -07:00
2019-08-30 08:11:25 -07:00
2019-08-30 07:27:17 -07:00
2019-08-30 07:27:17 -07:00
2019-07-31 12:04:42 +02:00
2019-09-12 21:05:34 -04:00
2019-09-25 17:51:40 -07:00
2019-09-19 10:06:57 -07:00
2019-09-19 10:06:57 -07:00
2019-07-19 10:42:02 -07:00
2019-08-30 07:27:18 -07:00
2019-09-28 08:14:15 -07:00
2019-09-21 11:10:16 -07:00
2019-09-04 18:19:43 +02:00
2019-09-19 09:42:37 -07:00
2019-09-17 11:48:24 -04:00
2019-08-12 19:33:50 -07:00
2019-09-26 11:36:20 -07:00
2019-07-19 10:42:02 -07:00
2019-07-19 10:42:02 -07:00
2019-08-30 07:27:17 -07:00
2019-05-21 10:50:45 +02:00
2019-05-30 11:26:32 -07:00
2019-10-06 13:53:27 -07:00
2019-05-21 10:50:45 +02:00
2019-07-16 19:23:22 -07:00
2019-07-19 10:42:02 -07:00
2019-05-21 10:50:45 +02:00
2019-09-18 17:35:20 -07:00
2019-07-15 21:20:52 -07:00
2019-05-24 20:50:36 +02:00
2019-05-30 11:29:21 -07:00
2019-07-30 14:42:13 -07:00
2019-06-19 17:09:55 +02:00
2019-08-03 07:02:01 -07:00
2019-08-30 19:31:09 -04:00
2019-08-05 14:59:05 -07:00
2019-07-20 09:15:51 -07:00
2019-05-21 10:50:45 +02:00
2019-06-29 09:47:31 -06:00
2019-05-21 10:50:45 +02:00
2019-08-21 00:20:40 +02:00
2019-09-25 17:42:30 +02:00
2019-04-08 18:21:02 -05:00
2019-08-07 21:51:47 -04:00
2019-08-19 11:00:39 -04:00
2019-03-08 14:48:40 -08:00
2019-09-06 21:28:49 +02:00
2019-09-12 21:06:14 -04:00
2019-07-16 22:52:37 -04:00
2019-05-21 10:50:45 +02:00
2019-08-30 07:42:49 -06:00
2019-07-19 10:42:02 -07:00
2019-09-24 15:54:11 -07:00
2019-07-20 09:15:51 -07:00
2019-10-04 09:56:51 -07:00
2019-09-18 16:59:14 -07:00
2019-06-24 09:16:47 +10:00
2019-07-19 10:42:02 -07:00
2019-09-27 17:00:27 -07:00
2019-09-18 16:59:14 -07:00
2019-05-21 10:50:45 +02:00
2019-07-16 22:52:37 -04:00
2019-07-10 09:00:57 -06:00
2019-09-03 09:30:45 -04:00
2019-09-26 10:29:42 -07:00
2019-05-30 11:26:32 -07:00
2019-05-25 18:00:06 -04:00
2019-09-26 10:10:30 -07:00
2019-05-25 18:00:07 -04:00
2019-06-17 17:36:09 -04:00
2019-05-30 11:29:53 -07:00
2019-05-21 10:50:45 +02:00
2019-09-06 21:28:49 +02:00
2019-08-16 18:43:24 -07:00
2019-10-05 12:00:36 -07:00
2019-07-16 19:23:25 -07:00
2019-08-13 16:06:52 -07:00
2019-04-08 18:21:02 -05:00
2019-05-31 15:30:03 -06:00
2019-05-21 10:50:45 +02:00
2019-10-03 14:21:35 -07:00
2019-09-25 09:55:59 -07:00
2019-05-14 09:47:50 -07:00
2019-08-01 20:51:23 +02:00
2019-09-25 17:51:41 -07:00
2019-08-30 07:27:17 -07:00
2019-05-21 10:50:45 +02:00