From 572d9e116882498c7437ca6dee0b4a4338ea6324 Mon Sep 17 00:00:00 2001 From: Hao Fang Date: Thu, 11 Jul 2019 14:41:44 +0800 Subject: [PATCH] ACC: crypto/hisilicon/qm: add printk_ratelimit for QM get queue busy driver inclusion category: bugfix bugzilla: NA CVE: NA "QM all queues are busy!" will print more if multiple threads request queues and the number of requests more than queues's. Signed-off-by: Hao Fang Reviewed-by: wangzhou Signed-off-by: lingmingqiang Signed-off-by: Yang Yingliang --- drivers/crypto/hisilicon/qm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 6355e3880e6b..5ee02314eea3 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -1067,7 +1067,8 @@ struct hisi_qp *hisi_qm_create_qp(struct hisi_qm *qm, u8 alg_type) qp_id = find_first_zero_bit(qm->qp_bitmap, qm->qp_num); if (qp_id >= qm->qp_num) { write_unlock(&qm->qps_lock); - dev_info(&qm->pdev->dev, "QM all queues are busy!\n"); + dev_info_ratelimited(&qm->pdev->dev, "QM all queues are busy!\n"); + ret = -EBUSY; goto err_free_qp; } -- GitLab