projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
898387e
)
crypto: hisilicon - Fix sscanf format signedness
author
Herbert Xu
<herbert@gondor.apana.org.au>
Fri, 27 Aug 2021 08:43:10 +0000
(16:43 +0800)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Fri, 17 Sep 2021 03:05:11 +0000
(11:05 +0800)
The function qm_qos_value_init expects an unsigned integer but
is incorrectly supplying a signed format to sscanf. This patch
fixes it.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/qm.c
patch
|
blob
|
history
diff --git
a/drivers/crypto/hisilicon/qm.c
b/drivers/crypto/hisilicon/qm.c
index 369562d34d66a7ffb7ecbcd0382cd64475a1a1fa..cf9ec5625a1e6863723b98f3de50473a2a1e6d11 100644
(file)
--- a/
drivers/crypto/hisilicon/qm.c
+++ b/
drivers/crypto/hisilicon/qm.c
@@
-4185,7
+4185,7
@@
static ssize_t qm_qos_value_init(const char *buf, unsigned long *val)
return -EINVAL;
}
- ret = sscanf(buf, "%l
d
", val);
+ ret = sscanf(buf, "%l
u
", val);
if (ret != QM_QOS_VAL_NUM)
return -EINVAL;