[PATCH 0/2] MIPS: rtlx: Fix two error paths in rtlx_open()

Suyuan Wang via B4 Relay posted 2 patches 2 days, 20 hours ago
arch/mips/kernel/rtlx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[PATCH 0/2] MIPS: rtlx: Fix two error paths in rtlx_open()
Posted by Suyuan Wang via B4 Relay 2 days, 20 hours ago
Two error paths in rtlx_open() leave state behind: a failed
rtlx_init() skips the in_open decrement, so the channel stays busy for
good, and a signal while waiting for the SP program leaves the stack
wait entry on the queue.

Found with a static analysis tool and checked by hand. Compile tested
on mips (maltaaprp_defconfig, W=1); I don't have the hardware.

---
Suyuan Wang (2):
      MIPS: rtlx: Drop in_open count when rtlx_init() fails
      MIPS: rtlx: Call finish_wait() when rtlx_open() is interrupted

 arch/mips/kernel/rtlx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)