Re: [PATCH] kdb: prevent possible null deref in kdb_msg_write

2020-06-29 Thread Sumit Garg
On Mon, 29 Jun 2020 at 21:07, Daniel Thompson wrote: > > On Mon, Jun 29, 2020 at 04:50:20PM +0200, Petr Mladek wrote: > > On Mon 2020-06-29 16:59:24, Cengiz Can wrote: > > > `kdb_msg_write` operates on a global `struct kgdb_io *` called > > > `dbg_io_ops`. > > > > > > Although it is initialized

Re: [PATCH] kdb: prevent possible null deref in kdb_msg_write

2020-06-29 Thread Daniel Thompson
On Mon, Jun 29, 2020 at 04:59:24PM +0300, Cengiz Can wrote: > `kdb_msg_write` operates on a global `struct kgdb_io *` called > `dbg_io_ops`. > > Although it is initialized in `debug_core.c`, there's a null check in > `kdb_msg_write` which implies that it can be null whenever we dereference > it

Re: [PATCH] kdb: prevent possible null deref in kdb_msg_write

2020-06-29 Thread Daniel Thompson
On Mon, Jun 29, 2020 at 04:50:20PM +0200, Petr Mladek wrote: > On Mon 2020-06-29 16:59:24, Cengiz Can wrote: > > `kdb_msg_write` operates on a global `struct kgdb_io *` called > > `dbg_io_ops`. > > > > Although it is initialized in `debug_core.c`, there's a null check in > > `kdb_msg_write` which

[PATCH] kdb: prevent possible null deref in kdb_msg_write

2020-06-29 Thread Cengiz Can
`kdb_msg_write` operates on a global `struct kgdb_io *` called `dbg_io_ops`. Although it is initialized in `debug_core.c`, there's a null check in `kdb_msg_write` which implies that it can be null whenever we dereference it in this function call. Coverity scanner caught this as CID 1465042. I

Re: [PATCH] kdb: prevent possible null deref in kdb_msg_write

2020-06-29 Thread Petr Mladek
On Mon 2020-06-29 16:50:20, Petr Mladek wrote: > On Mon 2020-06-29 16:59:24, Cengiz Can wrote: > > `kdb_msg_write` operates on a global `struct kgdb_io *` called > > `dbg_io_ops`. > > > > Although it is initialized in `debug_core.c`, there's a null check in > > `kdb_msg_write` which implies that

Re: [PATCH] kdb: prevent possible null deref in kdb_msg_write

2020-06-29 Thread Petr Mladek
On Mon 2020-06-29 16:59:24, Cengiz Can wrote: > `kdb_msg_write` operates on a global `struct kgdb_io *` called > `dbg_io_ops`. > > Although it is initialized in `debug_core.c`, there's a null check in > `kdb_msg_write` which implies that it can be null whenever we dereference > it in this