]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.16.4/orangefs_kill_sb-deal-with-allocation-failures.patch
drop drm patch
[thirdparty/kernel/stable-queue.git] / releases / 4.16.4 / orangefs_kill_sb-deal-with-allocation-failures.patch
1 From 659038428cb43a66e3eff71e2c845c9de3611a98 Mon Sep 17 00:00:00 2001
2 From: Al Viro <viro@zeniv.linux.org.uk>
3 Date: Tue, 3 Apr 2018 00:13:17 -0400
4 Subject: orangefs_kill_sb(): deal with allocation failures
5
6 From: Al Viro <viro@zeniv.linux.org.uk>
7
8 commit 659038428cb43a66e3eff71e2c845c9de3611a98 upstream.
9
10 orangefs_fill_sb() might've failed to allocate ORANGEFS_SB(s); don't
11 oops in that case.
12
13 Cc: stable@kernel.org
14 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16
17 ---
18 fs/orangefs/super.c | 5 +++++
19 1 file changed, 5 insertions(+)
20
21 --- a/fs/orangefs/super.c
22 +++ b/fs/orangefs/super.c
23 @@ -579,6 +579,11 @@ void orangefs_kill_sb(struct super_block
24 /* provided sb cleanup */
25 kill_anon_super(sb);
26
27 + if (!ORANGEFS_SB(sb)) {
28 + mutex_lock(&orangefs_request_mutex);
29 + mutex_unlock(&orangefs_request_mutex);
30 + return;
31 + }
32 /*
33 * issue the unmount to userspace to tell it to remove the
34 * dynamic mount info it has for this superblock