Re: [PATCH net v4 2/2] iavf: Fix out-of-bounds when setting channels on remove

From: Jakub Kicinski
Date: Wed May 03 2023 - 22:59:57 EST


On Wed, 3 May 2023 11:24:58 +0300 Leon Romanovsky wrote:
> > + if (test_bit(__IAVF_IN_REMOVE_TASK, &adapter->crit_section))
> > + return -EOPNOTSUPP;
>
> This makes no sense without locking as change to __IAVF_IN_REMOVE_TASK
> can happen any time.

+1, the changes look questionable to me as well.