fs/nfs/fs_context.c:1321:13-16: ERROR: reference preceded by free on line 1319 (fwd)
PATCH 74/77 fs/nfs/fs_context.c:1321:13-16: ERROR: reference preceded by free on line 1319 (fwd)
Lines 1318 and 1319 need to be inverted.
julia
---------- Forwarded message ----------
Date: Tue, 29 Jan 2019 20:40:00 +0800
From: kbuild test robot <[email protected]>
To: [email protected]
Cc: Julia Lawall <[email protected]>
Subject: [vfs:R46 74/77] fs/nfs/fs_context.c:1321:13-16: ERROR: reference
preceded by free on line 1319
CC: [email protected]
CC: [email protected]
TO: David Howells <[email protected]>
CC: Al Viro <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git R46 head: d49480196030012187093eda4b1a21012ede1b38 commit: 858e1ab929c3e46027ba791293a95559562cdbc3 [74/77] NFS: Add fs_context support.
:::::: branch date: 12 days ago
:::::: commit date: 12 days ago
Quoted 1 line
Quoted 1 line
fs/nfs/fs_context.c:1321:13-16: ERROR: reference preceded by free on line 1319
# https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/commit/?id=858e1ab929c3e46027ba791293a95559562cdbc3
git remote add vfs https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git
git remote update vfs
git checkout 858e1ab929c3e46027ba791293a95559562cdbc3
vim +1321 fs/nfs/fs_context.c
858e1ab9 David Howells 2018-11-15 1301
858e1ab9 David Howells 2018-11-15 1302 /*
858e1ab9 David Howells 2018-11-15 1303 * Handle duplication of a configuration. The caller copied *src into *sc, but
858e1ab9 David Howells 2018-11-15 1304 * it can't deal with resource pointers in the filesystem context, so we have
858e1ab9 David Howells 2018-11-15 1305 * to do that. We need to clear pointers, copy data or get extra refs as
858e1ab9 David Howells 2018-11-15 1306 * appropriate.
858e1ab9 David Howells 2018-11-15 1307 */
858e1ab9 David Howells 2018-11-15 1308 static int nfs_fs_context_dup(struct fs_context *fc, struct fs_context *src_fc)
858e1ab9 David Howells 2018-11-15 1309 {
858e1ab9 David Howells 2018-11-15 1310 struct nfs_fs_context *src = nfs_fc2context(src_fc), *ctx;
858e1ab9 David Howells 2018-11-15 1311
858e1ab9 David Howells 2018-11-15 1312 ctx = kmemdup(src, sizeof(struct nfs_fs_context), GFP_KERNEL);
858e1ab9 David Howells 2018-11-15 1313 if (!ctx)
858e1ab9 David Howells 2018-11-15 1314 return -ENOMEM;
858e1ab9 David Howells 2018-11-15 1315
858e1ab9 David Howells 2018-11-15 1316 ctx->mntfh = nfs_alloc_fhandle();
858e1ab9 David Howells 2018-11-15 1317 if (!ctx->mntfh) {
858e1ab9 David Howells 2018-11-15 1318 return -ENOMEM;
858e1ab9 David Howells 2018-11-15 @1319 kfree(ctx);
858e1ab9 David Howells 2018-11-15 1320 }
858e1ab9 David Howells 2018-11-15 @1321 nfs_copy_fh(ctx->mntfh, src->mntfh);
858e1ab9 David Howells 2018-11-15 1322
858e1ab9 David Howells 2018-11-15 1323 __module_get(ctx->nfs_mod->owner);
858e1ab9 David Howells 2018-11-15 1324 ctx->client_address = NULL;
858e1ab9 David Howells 2018-11-15 1325 ctx->mount_server.hostname = NULL;
858e1ab9 David Howells 2018-11-15 1326 ctx->nfs_server.export_path = NULL;
858e1ab9 David Howells 2018-11-15 1327 ctx->nfs_server.hostname = NULL;
858e1ab9 David Howells 2018-11-15 1328 ctx->fscache_uniq = NULL;
858e1ab9 David Howells 2018-11-15 1329 fc->fs_private = ctx;
858e1ab9 David Howells 2018-11-15 1330 return 0;
5f07893d David Howells 2018-11-15 1331 }
858e1ab9 David Howells 2018-11-15 1332---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Quoted 1 line · Julia Lawall
Lines 1318 and 1319 need to be inverted.
Good catch, thanks! Al, can you roll the fix in?
David