Paulo Alcantara (SUSE)
f93743a333
cifs: Fix memory allocation in __smb2_handle_cancelled_cmd()
...
commit 0a5a98863c9debc02387b3d23c46d187756f5e2b upstream.
__smb2_handle_cancelled_cmd() is called under a spin lock held in
cifs_mid_q_entry_release(), so make its memory allocation GFP_ATOMIC.
This issue was observed when running xfstests generic/028:
[ 1722.589204] CIFS VFS: \\192.168.30.26 Cancelling wait for mid 72064 cmd: 5
[ 1722.590687] CIFS VFS: \\192.168.30.26 Cancelling wait for mid 72065 cmd: 17
[ 1722.593529] CIFS VFS: \\192.168.30.26 Cancelling wait for mid 72066 cmd: 6
[ 1723.039014] BUG: sleeping function called from invalid context at mm/slab.h:565
[ 1723.040710] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 30877, name: cifsd
[ 1723.045098] CPU: 3 PID: 30877 Comm: cifsd Not tainted 5.5.0-rc4+ #313
[ 1723.046256] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba527-rebuilt.opensuse.org 04/01/2014
[ 1723.048221] Call Trace:
[ 1723.048689] dump_stack+0x97/0xe0
[ 1723.049268] ___might_sleep.cold+0xd1/0xe1
[ 1723.050069] kmem_cache_alloc_trace+0x204/0x2b0
[ 1723.051051] __smb2_handle_cancelled_cmd+0x40/0x140 [cifs]
[ 1723.052137] smb2_handle_cancelled_mid+0xf6/0x120 [cifs]
[ 1723.053247] cifs_mid_q_entry_release+0x44d/0x630 [cifs]
[ 1723.054351] ? cifs_reconnect+0x26a/0x1620 [cifs]
[ 1723.055325] cifs_demultiplex_thread+0xad4/0x14a0 [cifs]
[ 1723.056458] ? cifs_handle_standard+0x2c0/0x2c0 [cifs]
[ 1723.057365] ? kvm_sched_clock_read+0x14/0x30
[ 1723.058197] ? sched_clock+0x5/0x10
[ 1723.058838] ? sched_clock_cpu+0x18/0x110
[ 1723.059629] ? lockdep_hardirqs_on+0x17d/0x250
[ 1723.060456] kthread+0x1ab/0x200
[ 1723.061149] ? cifs_handle_standard+0x2c0/0x2c0 [cifs]
[ 1723.062078] ? kthread_create_on_node+0xd0/0xd0
[ 1723.062897] ret_from_fork+0x3a/0x50
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Fixes: 9150c3adbf24 ("CIFS: Close open handle after interrupted close")
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-01 09:37:04 +00:00
..
2019-10-11 18:21:13 +02:00
2019-08-06 19:06:49 +02:00
2020-01-27 14:51:21 +01:00
2020-01-29 16:43:18 +01:00
2019-12-13 08:51:01 +01:00
2018-12-01 09:37:27 +01:00
2020-01-27 14:51:12 +01:00
2018-12-17 09:24:40 +01:00
2020-01-27 14:51:00 +01:00
2020-02-01 09:37:04 +00:00
2019-08-06 19:06:51 +02:00
2019-11-12 19:20:47 +01:00
2018-11-13 11:08:55 -08:00
2019-07-26 09:14:02 +02:00
2019-05-08 07:21:48 +02:00
2019-03-23 20:09:59 +01:00
2019-12-13 08:52:23 +01:00
2019-11-20 18:45:18 +01:00
2018-07-22 14:13:44 +02:00
2019-12-05 09:20:32 +01:00
2020-01-27 14:50:02 +01:00
2019-12-17 20:35:18 +01:00
2020-01-27 14:51:03 +01:00
2020-01-27 14:51:13 +01:00
2019-10-07 18:57:14 +02:00
2018-12-17 09:24:40 +01:00
2019-12-13 08:52:36 +01:00
2019-12-17 20:35:55 +01:00
2019-12-01 09:17:10 +01:00
2019-12-01 09:17:09 +01:00
2018-08-17 16:20:28 -07:00
2018-08-25 12:42:33 -07:00
2019-05-22 07:37:40 +02:00
2018-08-21 11:37:41 +02:00
2020-01-04 19:12:48 +01:00
2019-05-08 07:21:48 +02:00
2020-01-27 14:50:33 +01:00
2019-12-13 08:52:43 +01:00
2019-12-13 08:51:59 +01:00
2020-01-27 14:50:41 +01:00
2020-01-09 10:19:03 +01:00
2018-09-04 16:45:02 -07:00
2020-01-12 12:17:20 +01:00
2018-08-17 16:20:27 -07:00
2020-01-17 19:47:17 +01:00
2019-11-24 08:20:57 +01:00
2019-12-17 20:34:51 +01:00
2019-12-17 20:35:45 +01:00
2020-01-09 10:19:00 +01:00
2020-01-12 12:17:20 +01:00
2020-01-23 08:21:38 +01:00
2018-08-02 09:34:02 -07:00
2018-08-18 11:44:53 -07:00
2018-12-17 09:24:30 +01:00
2018-07-31 11:32:44 -04:00
2020-01-09 10:19:09 +01:00
2019-11-20 18:46:04 +01:00
2019-05-25 18:23:46 +02:00
2020-01-27 14:49:51 +01:00
2019-05-02 09:58:59 +02:00
2018-07-12 10:04:27 -04:00
2018-07-12 10:04:20 -04:00
2019-10-05 13:10:06 +02:00
2019-07-03 13:14:44 +02:00
2019-11-06 13:05:37 +01:00
2020-01-09 10:19:07 +01:00
2019-04-05 22:33:00 +02:00
2020-01-14 20:06:57 +01:00
2020-01-09 10:19:07 +01:00
2019-08-16 10:12:52 +02:00
2019-05-25 18:23:26 +02:00
2019-03-05 17:58:50 +01:00
2020-01-12 12:17:20 +01:00
2019-02-12 19:47:19 +01:00
2019-08-04 09:30:56 +02:00
2018-08-15 23:03:20 -05:00
2018-08-21 18:19:09 -07:00
2019-04-05 22:32:59 +02:00
2019-11-12 19:21:20 +01:00
2020-01-12 12:17:20 +01:00
2019-05-31 06:46:05 -07:00
2018-11-21 09:19:14 +01:00
2019-12-13 08:52:56 +01:00
2018-08-02 08:06:55 +09:00
2019-10-17 13:45:35 -07:00
2020-01-09 10:19:00 +01:00
2018-08-17 16:20:29 -07:00
2020-01-29 16:43:21 +01:00
2018-11-21 09:19:22 +01:00
2019-05-25 18:23:26 +02:00
2019-07-31 07:27:11 +02:00
2019-05-04 09:20:11 +02:00
2019-12-01 09:17:04 +01:00
2020-01-04 19:13:26 +01:00
2019-08-25 10:47:43 +02:00
2019-12-17 20:35:43 +01:00
2019-10-11 18:21:39 +02:00
2018-08-26 11:48:42 -07:00
2018-08-13 20:56:23 -07:00
2020-01-04 19:13:18 +01:00
2018-09-18 07:30:48 -04:00