Re: git: 1cfd01111eb6 - main - mpi3mr: Only set callout_owned when we create a timeout
Date: Wed, 29 Nov 2023 15:11:24 UTC
On Wed, Nov 29, 2023 at 8:07 AM Gleb Smirnoff <glebius@freebsd.org> wrote: > 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 <imp@FreeBSD.org> > W> AuthorDate: 2023-11-29 01:49:24 +0000 > W> Commit: Warner Losh <imp@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. > I thought I'd removed the bool and always cancelled. It's already kinda associated with the right mutex. Maybe I did that in a later patch... Warner