crypto: chelsio - Fix softlockup with heavy I/O
removed un-necessary lock_chcr_dev to protect device state DETACH. lock is not required to protect I/O count Signed-off-by: Atul Gupta <atul.gupta@chelsio.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -200,17 +200,10 @@ void chcr_verify_tag(struct aead_request *req, u8 *input, int *err)
|
||||
|
||||
static int chcr_inc_wrcount(struct chcr_dev *dev)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
spin_lock_bh(&dev->lock_chcr_dev);
|
||||
if (dev->state == CHCR_DETACH)
|
||||
err = 1;
|
||||
else
|
||||
atomic_inc(&dev->inflight);
|
||||
|
||||
spin_unlock_bh(&dev->lock_chcr_dev);
|
||||
|
||||
return err;
|
||||
return 1;
|
||||
atomic_inc(&dev->inflight);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void chcr_dec_wrcount(struct chcr_dev *dev)
|
||||
|
Reference in New Issue
Block a user