On Wed, Nov 29, 2023 at 01:55:34AM +0000, Warner Losh wrote: W> The branch main has been updated by imp: W> W> URL: https://cgit.FreeBSD.org/src/commit/?id=1cfd01111eb6a28ca5043e928aa8e9099064177a W> W> commit 1cfd01111eb6a28ca5043e928aa8e9099064177a W> Author: Warner Losh <i...@freebsd.org> W> AuthorDate: 2023-11-29 01:49:24 +0000 W> Commit: Warner Losh <i...@freebsd.org> W> CommitDate: 2023-11-29 01:49:24 +0000 W> W> mpi3mr: Only set callout_owned when we create a timeout W> W> Since we assume there's a timeout to cancel when this is true, only set W> it true when we set the timeout. Otherwise we may try to cancel a timeout W> when there's been an error in submission.
IMHO, better use callout_active() instead of external flag. Also, if I remember well doing callout_stop() on a stopped callout is completely safe, so other option is skip the check. What really needs to be done is to associate callout with the driver mutex. -- Gleb Smirnoff