Re: [PATCH] slimbus: messaging: hold lock until transaction is completed
From: Greg Kroah-Hartman
Date: Fri Sep 11 2026 - 02:02:36 EST
On Fri, Sep 11, 2026 at 12:59:11AM -0400, Changyul Lee wrote:
> slim_msg_response() drops lock after idr_find() and dereferences txn.
> If the requester times out in the meantime, it frees the TID and
> returns, so the handler writes the reply into msg->rbuf and calls
> complete() on txn->comp, both of which have already benn freed.
>
> Keep lock held until complete(txn->comp) finishes, so a requester
> in slim_free_txn_tid() and cannot return while txn is still in use.
> Call idr_remove() because slim_free_txn_tid() takes the same lock.
>
> Fixes: afbdcc7c384b ("slimbus: Add messaging APIs to slimbus framework")
>
> Signed-off-by: Changyul Lee <lcy8047@xxxxxxxxx>
No blank line between these please.
And how was this found and tested?
thanks,
greg k-h