Re: [PATCH v2] can: isotp: handle wait_event_interruptible() return values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05.01.2023 13:58:30, Oliver Hartkopp wrote:
> 
> 
> On 05.01.23 10:32, Marc Kleine-Budde wrote:
> > On 04.01.2023 17:46:05, Oliver Hartkopp wrote:
> > > When wait_event_interruptible() has been interrupted by a signal the
> > > tx.state value might not be ISOTP_IDLE. Force the state machines
> > > into idle state to inhibit the timer handlers to continue working.
> > > 
> > > Cc: stable@xxxxxxxxxxxxxxx # >= v5.15
> > > Signed-off-by: Oliver Hartkopp <socketcan@xxxxxxxxxxxx>
> > 
> > Can you add a Fixes: tag?
> 
> Yes. Sent out a V3.
> 
> In fact I was not sure if it makes sense to apply the patch down to Linux
> 5.10 as it might increase the possibility to trigger a WARN(1) in the
> isotp_tx_timer_handler().
> 
> The patch is definitely helpful for the latest code including commit
> 4b7fe92c0690 ("can: isotp: add local echo tx processing for consecutive
> frames") introduced in Linux 5.18 and its fixes.
> 
> I did some testing with very long ISOTP PDUs and killed the waiting
> isotp_release() with a Crtl-C.
> 
> To prevent the WARN(1) we might also stick this patch to
> 
> Fixes: 866337865f37 ("can: isotp: fix tx state handling for echo tx
> processing")
> 
> What do you think about the WARN(1)?

If this short patch avoids potential WARN()s it's stable material.

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux