spin_lock_irqsave() in p9_client{,_zc}_rpc() is bogus
PATCH 1/1 spin_lock_irqsave() in p9_client{,_zc}_rpc() is bogus
Both of those are blocking; they can't be (and are not) called
with irqs disabled. So these spin_lock_irqsave() should be spin_lock_irq().
Signed-off-by Al Viro <[email protected]>
---
net/9p/client.c +4 -6
@@ -675,7 +675,6 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...) {va_list ap;int sigpending, err; -unsigned long flags;struct p9_req_t *req;/* Passing zero for tsize/rsize to p9_client_prepare_req() tells it to * auto determine an appropriate (small) request/response size
@@ -746,9 +745,9 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...) } recalc_sigpending:if (sigpending) { -spin_lock_irqsave (¤t->sighand->siglock, flags); +spin_lock_irq (¤t->sighand->siglock);recalc_sigpending (); -spin_unlock_irqrestore (¤t->sighand->siglock, flags); +spin_unlock_irq (¤t->sighand->siglock); }if (err <0 ) goto reterr;
@@ -783,7 +782,6 @@ static struct p9_req_t *p9_client_zc_rpc(struct p9_client *c, int8_t type, {va_list ap;int sigpending, err; -unsigned long flags;struct p9_req_t *req;va_start (ap, fmt);
@@ -831,9 +829,9 @@ static struct p9_req_t *p9_client_zc_rpc(struct p9_client *c, int8_t type, } recalc_sigpending:if (sigpending) { -spin_lock_irqsave (¤t->sighand->siglock, flags); +spin_lock_irq (¤t->sighand->siglock);recalc_sigpending (); -spin_unlock_irqrestore (¤t->sighand->siglock, flags); +spin_unlock_irq (¤t->sighand->siglock); }if (err <0 ) goto reterr;
Al Viro wrote on Sun, Aug 17, 2025 at 05:42:06PM +0100:
Quoted 2 lines
Both of those are blocking; they can't be (and are not) called
with irqs disabled. So thesespin_lock_irqsave()should bespin_lock_irq().
Makes sense.
Quoted 1 line
Signed-off-by Al Viro <[email protected]>
If you want to take it:
Otherwise I'll pick it up for 6.18 tomorrow-ish
Signature · 1 line
Dominique