This patchset fix some qm bugs:
patch 1: store the string address before pass to 'strsep'
patch 2: clear 'qp_status->used' when init the 'qp'
patch 3: use 'dev_info_ratelimited' to avoid printk flooding.
patch 4: fix the judgement of queue is full
patch 7: save the vf configuration space to make sure it is available
after the 'PF' 'FLR'
patch 8: move the process of register alg to crypto in driver 'hisi_zip'
patch 9: register callback to 'pci_driver.shutdown'
This patchset depends on:
https://patchwork.kernel.org/cover/1162709/
v2:
- fix the wrong email address on patch 1
Hui Tang (1):
crypto: hisilicon/qm - fix judgement of queue is full
Shukun Tan (3):
crypto: hisilicon/qm - clear used reference count when start qp
crypto: hisilicon/qm - fix event queue depth to 2048
crypto: hisilicon/qm - fix VF not available after PF FLR
Sihang Chen (1):
crypto: hisilicon/qm - fix wrong release after using strsep
Yang Shen (4):
crypto: hisilicon/qm - fix print frequence in hisi_qp_send
crypto: hisilicon/qm - fix no stop reason when use hisi_qm_stop
crypto: hisilicon/qm - fix the process of register algorithms to
crypto
crypto: hisilicon/qm - register callback function to
'pci_driver.shutdown'
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 36 +++-----
drivers/crypto/hisilicon/hpre/hpre_main.c | 26 +++---
drivers/crypto/hisilicon/qm.c | 126 +++++++++++++++++++++++-----
drivers/crypto/hisilicon/qm.h | 23 ++---
drivers/crypto/hisilicon/sec2/sec_crypto.c | 35 +++-----
drivers/crypto/hisilicon/sec2/sec_main.c | 30 +++----
drivers/crypto/hisilicon/zip/zip_crypto.c | 2 +-
drivers/crypto/hisilicon/zip/zip_main.c | 44 +++++-----
8 files changed, 189 insertions(+), 133 deletions(-)
--
2.7.4
From: Sihang Chen <[email protected]>
Save the string address before pass to strsep, release it at end.
Because strsep will update the string address to point after the
token.
Fixes: c31dc9fe165d("crypto: hisilicon/qm - add DebugFS for xQC and...")
Signed-off-by: Sihang Chen <[email protected]>
Signed-off-by: Yang Shen <[email protected]>
Reviewed-by: Zhou Wang <[email protected]>
---
drivers/crypto/hisilicon/qm.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index 9bb263c..ad0adcc 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -1429,16 +1429,17 @@ static int qm_dbg_help(struct hisi_qm *qm, char *s)
static int qm_cmd_write_dump(struct hisi_qm *qm, const char *cmd_buf)
{
struct device *dev = &qm->pdev->dev;
- char *presult, *s;
+ char *presult, *s, *s_tmp;
int ret;
s = kstrdup(cmd_buf, GFP_KERNEL);
if (!s)
return -ENOMEM;
+ s_tmp = s;
presult = strsep(&s, " ");
if (!presult) {
- kfree(s);
+ kfree(s_tmp);
return -EINVAL;
}
@@ -1468,7 +1469,7 @@ static int qm_cmd_write_dump(struct hisi_qm *qm, const char *cmd_buf)
if (ret)
dev_info(dev, "Please echo help\n");
- kfree(s);
+ kfree(s_tmp);
return ret;
}
--
2.7.4