Re: [PATCH v3 08/10] crypto: hisilicon/qm - fix the process of register algorithms to crypto

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

 





On 2020/7/31 16:20, Herbert Xu wrote:
On Fri, Jul 31, 2020 at 04:15:41PM +0800, shenyang (M) wrote:

Here if the user alloc a tfm of the algorithm the driver registers,
the function 'hisi_qm_wait_task_finish' which be added in patch 10 will
stop to remove the driver until the tfm is freed.

1. You don't introduce a bug in patch 8 only to fix it in patch 10.
   Lay the groundwork first before you rely on it.


Sorry, I'll move the patch 10 before patch 8

2. You need to explain how the wait fixes the problem of unregistering
   an algorithm under a live tfm.  Can you even do a wait at all
   in the face of a PCI unbind? What happens when the device reappears?


The function 'hisi_qm_wait_task_finish' will check the device status. If it is free, the function will freeze all queues in the device and go on. Otherwise, the function will wait until the device is free.

And the function is added in 'pci_driver.remove'. So the operation of
unbind will call it too.

Q:'What happens when the device reappears?'
A:Do you means the scene like bind and unbind? There is a device list
in the driver. The registration or unregistration of algorithms will
only happen when the list is empty. So the function register or
unregister will be called only once.

Cheers,





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux