diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2016-09-14 13:53:36 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-23 11:31:31 +0200 |
commit | 40b320e1c757353d65550471132683dfb6c35e0f (patch) | |
tree | 41d660ac1ec8d3192189db2e12c56c57f701593e /fs | |
parent | c1b241f0c1cfdba6ad90afd5036fa60781bbc363 (diff) | |
download | lwn-40b320e1c757353d65550471132683dfb6c35e0f.tar.gz lwn-40b320e1c757353d65550471132683dfb6c35e0f.zip |
devpts: Make devpts_kill_sb safe if fsi is NULL
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/devpts/inode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index a48b40b0bd1e..e058ec677207 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -458,7 +458,8 @@ static void devpts_kill_sb(struct super_block *sb) { struct pts_fs_info *fsi = DEVPTS_SB(sb); - ida_destroy(&fsi->allocated_ptys); + if (fsi) + ida_destroy(&fsi->allocated_ptys); kfree(fsi); kill_litter_super(sb); } |