Skip to content

MIPS: rtlx: Fix two error paths in rtlx_open()

Suyuan Wang b4-sent linux-mips lkml 1 version New

Get series with b4
b4 am [email protected] change-id 20261121-rtlx-c20afd932646

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2MIPS: rtlx: Drop in_open count when rtlx_init() failsarch/mips/kernel/rtlx.c+1 -20 replies
2/2MIPS: rtlx: Call finish_wait() when rtlx_open() is interruptedarch/mips/kernel/rtlx.c+2 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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(-)