projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5a3499
)
ANDROID: dm: android-verity: fix table_make_digest() error handling
author
Greg Hackmann
<ghackmann@google.com>
Mon, 14 Nov 2016 17:48:02 +0000
(09:48 -0800)
committer
Amit Pundir
<amit.pundir@linaro.org>
Mon, 10 Apr 2017 07:42:16 +0000
(13:12 +0530)
If table_make_digest() fails, verify_verity_signature() would try to
pass the returned ERR_PTR() to kfree().
This fixes the smatch error:
drivers/md/dm-android-verity.c:601 verify_verity_signature() error: 'pks' dereferencing possible ERR_PTR()
Change-Id: I9b9b7764b538cb4a5f94337660e9b0f149b139be
Signed-off-by: Greg Hackmann <ghackmann@google.com>
drivers/md/dm-android-verity.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm-android-verity.c
b/drivers/md/dm-android-verity.c
index bb6c1285e499b466b3d5d2b216eb52e3c50f3965..ec0a4d19ca3e122f9d22471d76105b7ce6a19b14 100644
(file)
--- a/
drivers/md/dm-android-verity.c
+++ b/
drivers/md/dm-android-verity.c
@@
-585,6
+585,8
@@
static int verify_verity_signature(char *key_id,
if (IS_ERR(pks)) {
DMERR("hashing failed");
+ retval = PTR_ERR(pks);
+ pks = NULL;
goto error;
}