Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1483555
| From | "Eric W. Biederman" <ebiederm@xmission.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH tty-next 4/6] devpts: Make devpts_kill_sb safe if fsi is NULL |
| Date | 2016-09-14 21:10 +0200 |
| Message-ID | <shnJg-4KO-3@gated-at.bofh.it> (permalink) |
| References | <shnJg-4KO-5@gated-at.bofh.it> <shnJg-4KO-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
fs/devpts/inode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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);
}
--
2.8.3
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH tty-next 4/6] devpts: Make devpts_kill_sb safe if fsi is NULL "Eric W. Biederman" <ebiederm@xmission.com> - 2016-09-14 21:10 +0200
csiph-web