Re: [PATCH 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-12 Thread Tong Zhang
Hi Andy, Thanks for the suggestion. I have removed excessive lines in the commit log and sent out a v2 patch. Thanks again. - Tong On Fri, Mar 12, 2021 at 3:56 AM Andy Shevchenko wrote: > > On Fri, Mar 12, 2021 at 9:50 AM Tong Zhang wrote: > > > > ADF_STATUS_PF_RUNNING is (only) used and checked

Re: [PATCH 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-12 Thread Andy Shevchenko
On Fri, Mar 12, 2021 at 9:50 AM Tong Zhang wrote: > > ADF_STATUS_PF_RUNNING is (only) used and checked by adf_vf2pf_shutdown() > before calling adf_iov_putmsg()->mutex_lock(vf2pf_lock), however the > vf2pf_lock is initialized in adf_dev_init(), which can fail and when it > fail, the vf2pf_lock is

[PATCH 2/2] crypto: qat: ADF_STATUS_PF_RUNNING should be set after adf_dev_init

2021-03-11 Thread Tong Zhang
ADF_STATUS_PF_RUNNING is (only) used and checked by adf_vf2pf_shutdown() before calling adf_iov_putmsg()->mutex_lock(vf2pf_lock), however the vf2pf_lock is initialized in adf_dev_init(), which can fail and when it fail, the vf2pf_lock is either not initialized or destroyed, a subsequent use of vf2