On Wed, May 22, 2019 at 12:29:00PM +0200, Johan Hovold wrote: > Where do you see that the kernel is dereferencing tty->dev without > checking for NULL first? If you can find that, then that would indeed be > a bug that needs fixing. Thanks for your reply, Johan! I examined the code but failed to find this situation. Anyway, checking return value of tty_get_device() is theoritically right. But tty->dev is never dereferenced, so checking is not needed. However, what if in later kernels tty->dev is dereferenced by some codes? Is it better to apply this check for this reason? Thanks Gen
- [PATCH] tty_io: Fix a missing-check bug in drivers/tty/tty_io... Gen Zhang
- Re: [PATCH] tty_io: Fix a missing-check bug in drivers/t... Jiri Slaby
- Re: [PATCH] tty_io: Fix a missing-check bug in drive... Gen Zhang
- Re: [PATCH] tty_io: Fix a missing-check bug in d... Jiri Slaby
- Re: [PATCH] tty_io: Fix a missing-check bug ... Johan Hovold
- Re: [PATCH] tty_io: Fix a missing-check... Jiri Slaby
- Re: [PATCH] tty_io: Fix a missing-check... Gen Zhang
- Re: [PATCH] tty_io: Fix a missing-c... Johan Hovold
- Re: [PATCH] tty_io: Fix a missi... Gen Zhang
- Re: [PATCH] tty_io: Fix a missing-check bug ... Gen Zhang