git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c17f85
)
zfs: Add a comment to clarify nvlist memory layout
author
mwleeds@mailtundra.com
<mwleeds@mailtundra.com>
Sun, 7 Apr 2024 01:47:26 +0000
(18:47 -0700)
committer
Tom Rini
<trini@konsulko.com>
Wed, 17 Apr 2024 16:08:51 +0000
(10:08 -0600)
Signed-off-by: Phaedrus Leeds <mwleeds@mailtundra.com>
fs/zfs/zfs.c
patch
|
blob
|
history
diff --git
a/fs/zfs/zfs.c
b/fs/zfs/zfs.c
index
14779de
..
61d58fc
100644
(file)
--- a/
fs/zfs/zfs.c
+++ b/
fs/zfs/zfs.c
@@
-1617,6
+1617,11
@@
zfs_nvlist_lookup_nvlist(char *nvlist, char *name)
&size, 0);
if (!found)
return 0;
+
+ /* Allocate 12 bytes in addition to the nvlist size: One uint32 before the
+ * nvlist to hold the encoding method, and two zero uint32's after the
+ * nvlist as the NULL terminator.
+ */
ret = calloc(1, size + 3 * sizeof(uint32_t));
if (!ret)
return 0;