Re: [PATCH v3] net: wan: Add checks for NULL for utdm in undo_uhdlc_init and unmap_si_regs

2023-01-11 Thread Jakub Kicinski
On Wed, 11 Jan 2023 12:05:03 +0300 Esina Ekaterina wrote: > Subject: [PATCH v3] net: wan: Add checks for NULL for utdm in > undo_uhdlc_init and unmap_si_regs net: wan: prevent null-deref on error path for non-tdm case > If uhdlc_priv_tsa != 1 then utdm is not initialized. > And if ret !=

[PATCH v3] net: wan: Add checks for NULL for utdm in undo_uhdlc_init and unmap_si_regs

2023-01-11 Thread Esina Ekaterina
If uhdlc_priv_tsa != 1 then utdm is not initialized. And if ret != NULL then goto undo_uhdlc_init, where utdm is dereferenced. Same if dev == NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Esina Ekaterina --- v3: Remove braces v2: Add check