[PATCH] um: Add winch to winch_handlers before registering winch IRQ

Roberto Sassu roberto.sassu at huaweicloud.com
Tue Apr 23 00:22:31 PDT 2024


On Thu, 2024-03-28 at 09:25 +0100, Johannes Berg wrote:
> On Thu, 2024-03-07 at 11:49 +0100, Roberto Sassu wrote:
> > From: Roberto Sassu <roberto.sassu at huawei.com>
> > 
> > Registering a winch IRQ is racy, an interrupt may occur before the winch is
> > added to the winch_handlers list.
> > 
> > If that happens, register_winch_irq() adds to that list a winch that is
> > scheduled to be (or has already been) freed, causing a panic later in
> > winch_cleanup().
> > 
> > Avoid the race by adding the winch to the winch_handlers list before
> > registering the IRQ, and rolling back if um_request_irq() fails.
> > 
> 
> Reviewed-by: Johannes Berg <johannes at sipsolutions.net>

Thank you! Richard, are you going to pick this up?

Thanks

Roberto




More information about the linux-um mailing list