Fixes for CIDs 86750 and 396931
cover Fixes for CIDs 86750 and 396931
Hi,
This series provides fixes for CIDs 86750 and 396931.
Kindly share your feedback.
Thank you very much!
--
Jag
Jagannathan Raman (2):
zfs: dnode_get_path(): update dangling dn_new pointer kern/buffer: grub_buffer_free: handle NULL input pointer
grub-core/fs/zfs/zfs.c | 6 ++++++ grub-core/kern/buffer.c | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/2 zfs: dnode_get_path(): update dangling dn_new pointer
dnode_get_path() traverses dnode structures to locate the dnode leaf of a given path. When the leaf is a symlink to another path, it restarts the traversal either from root or from a different path. In such cases, dn_new must be re-initialized
Passes 'make check'
--- grub-core/fs/zfs/zfs.c | 6 ++++++ 1 file changed, 6 insertions(+)
grub-core/fs/zfs/zfs.c +6 -0
@@ -2936,6 +2936,8 @@ dnode_get_path (struct subvolume *subvol, const char *path_in, dnode_end_t *dn, grub_strlen (oldpath) + 1);grub_free (oldpathbuf); + +/* Restart dnode walk using path of symlink */ if (path[0 ] !='/' ) { dn_new = dnode_path;
@@ -2948,6 +2950,7 @@ dnode_get_path (struct subvolume *subvol, const char *path_in, dnode_end_t *dn, dnode_path = dn_new->next;grub_free (dn_new); } + dn_new = dnode_path; }if (dnode_path->dn.dn.dn_bonustype ==DMU_OT_SA ) {
@@ -2999,6 +3002,8 @@ dnode_get_path (struct subvolume *subvol, const char *path_in, dnode_end_t *dn, grub_strlen (oldpath) + 1);grub_free (oldpathbuf); + +/* Restart dnode walk using path of symlink */ if (path[0 ] !='/' ) { dn_new = dnode_path;
@@ -3011,6 +3016,7 @@ dnode_get_path (struct subvolume *subvol, const char *path_in, dnode_end_t *dn, dnode_path = dn_new->next;grub_free (dn_new); } + dn_new = dnode_path; } } }
Signature · 1 line
2.20.1
PATCH 2/2 kern/buffer: grub_buffer_free: handle NULL input pointer
In reply to Jagannathan Ramangrub_buffer_free() can handle NULL input pointer, similar to grub_free(). If the pointer is not referencing any memory location, grub_buffer_free() need not perform any function.
--- grub-core/kern/buffer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
grub-core/kern/buffer.c +5 -2
@@ -49,8 +49,11 @@ grub_buffer_new (grub_size_t sz)void grub_buffer_free (grub_buffer_t buf) { -grub_free (buf->data); -grub_free (buf); +if (buf !=NULL ) + { +grub_free (buf->data); +grub_free (buf); + } } grub_err_t
Signature · 1 line
2.20.1
Quoted 7 lines · Jagannathan Raman
Hi,
This series provides fixes for CIDs 86750 and 396931.
Kindly share your feedback.
Thank you very much!
These LGTM
Quoted 11 lines
--
JagJagannathan Raman (2):
zfs:dnode_get_path(): update danglingdn_newpointer kern/buffer:grub_buffer_free: handle NULL input pointergrub-core/fs/zfs/zfs.c | 6 ++++++ grub-core/kern/buffer.c | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-)
Daniel Kiper
Reviewed-byQuoted 5 lines · Ross Philipson
Quoted 4 lines · Jagannathan Raman
Hi,
This series provides fixes for CIDs 86750 and 396931.
Quoted 7 lines
Quoted 3 lines
Kindly share your feedback.
Thank you very much!
These LGTM
Reviewed-by Ross Philipson <[email protected]>
Daniel