Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes according to kmemleak and kasan #4708

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions module/zfs/vdev_label.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ vdev_config_generate_stats(vdev_t *vd, nvlist_t *nv)
/* Add extended stats nvlist to main nvlist */
fnvlist_add_nvlist(nv, ZPOOL_CONFIG_VDEV_STATS_EX, nvx);

fnvlist_free(nvx);
kmem_free(vsx, sizeof (*vsx));
}

Expand Down
3 changes: 1 addition & 2 deletions module/zfs/zfs_vnops.c
Original file line number Diff line number Diff line change
Expand Up @@ -4271,10 +4271,10 @@ zfs_fillpage(struct inode *ip, struct page *pl[], int nr_pages)
* Iterate over list of pages and read each page individually.
*/
page_idx = 0;
cur_pp = pl[0];
for (total = io_off + io_len; io_off < total; io_off += PAGESIZE) {
caddr_t va;

cur_pp = pl[page_idx++];
va = kmap(cur_pp);
err = dmu_read(os, zp->z_id, io_off, PAGESIZE, va,
DMU_READ_PREFETCH);
Expand All @@ -4285,7 +4285,6 @@ zfs_fillpage(struct inode *ip, struct page *pl[], int nr_pages)
err = SET_ERROR(EIO);
return (err);
}
cur_pp = pl[++page_idx];
}

return (0);
Expand Down
6 changes: 3 additions & 3 deletions module/zfs/zpl_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,12 @@ zpl_parse_options(char *osname, char *mntopts, zfs_mntopts_t *zmo,

if (mntopts) {
substring_t args[MAX_OPT_ARGS];
char *tmp_mntopts, *p;
char *tmp_mntopts, *p, *t;
int token;

tmp_mntopts = strdup(mntopts);
t = tmp_mntopts = strdup(mntopts);

while ((p = strsep(&tmp_mntopts, ",")) != NULL) {
while ((p = strsep(&t, ",")) != NULL) {
if (!*p)
continue;

Expand Down