aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric W. Biederman <[email protected]>2015-12-22 17:39:18 -0600
committerEric W. Biederman <[email protected]>2016-09-22 13:32:16 -0500
commit0d126a7ff77a02e88b6bf37a726abf8990226bf4 (patch)
tree37e55caee8082c07ad4acf94314bd795f4aca485
parentec0a9ba6f201bbb4801344aa11c5d13c1ca27675 (diff)
devpts: Make devpts_kill_sb safe if fsi is NULL
Signed-off-by: "Eric W. Biederman" <[email protected]>
-rw-r--r--fs/devpts/inode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index 5e216749bd96..2b0f24cb7d54 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);
}