The patch titled knfsd: nfsd4: fix non-terminated string has been added to the -mm tree. Its filename is knfsd-nfsd4-fix-non-terminated-string.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: knfsd: nfsd4: fix non-terminated string From: J. Bruce Fields <bfields@xxxxxxxxxxxxxx> The server name is expected to be a null-terminated string, so we can't pass in the raw client identifier. What's more, the client identifier is just a binary, not necessarily printable, blob. Let's just use the ip address instead. The server name appears to exist just to help debugging by making some printk's more informative. Note that the string is copies into the rpc client structure, so the pointer to the local variable does not outlive the function call. Signed-off-by: "J. Bruce Fields" <bfields@xxxxxxxxxxxxxx> Signed-off-by: Neil Brown <neilb@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/nfsd/nfs4callback.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) diff -puN fs/nfsd/nfs4callback.c~knfsd-nfsd4-fix-non-terminated-string fs/nfsd/nfs4callback.c --- a/fs/nfsd/nfs4callback.c~knfsd-nfsd4-fix-non-terminated-string +++ a/fs/nfsd/nfs4callback.c @@ -387,7 +387,6 @@ nfsd4_probe_callback(struct nfs4_client .address = (struct sockaddr *)&addr, .addrsize = sizeof(addr), .timeout = &timeparms, - .servername = clp->cl_name.data, .program = program, .version = nfs_cb_version[1]->number, .authflavor = RPC_AUTH_UNIX, /* XXX: need AUTH_GSS... */ @@ -397,6 +396,7 @@ nfsd4_probe_callback(struct nfs4_client .rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_NULL], .rpc_argp = clp, }; + char clientname[16]; int status; if (atomic_read(&cb->cb_set)) @@ -419,6 +419,11 @@ nfsd4_probe_callback(struct nfs4_client memset(program->stats, 0, sizeof(cb->cb_stat)); program->stats->program = program; + /* Just here to make some printk's more useful: */ + snprintf(clientname, sizeof(clientname), + "%u.%u.%u.%u", NIPQUAD(addr.sin_addr)); + args.servername = clientname; + /* Create RPC client */ cb->cb_client = rpc_create(&args); if (IS_ERR(cb->cb_client)) { _ Patches currently in -mm which might be from bfields@xxxxxxxxxxxxxx are auth_gss-unregister-gss_domain-when-unloading-module.patch knfsd-nfsd4-fix-non-terminated-string.patch knfsd-nfsd4-relax-checking-of-acl-inheritance-bits.patch knfsd-nfsd4-simplify-nfsv4-posix-translation.patch knfsd-nfsd4-represent-nfsv4-acl-with-array-instead-of-linked-list.patch knfsd-nfsd4-fix-memory-leak-on-kmalloc-failure-in-savemem.patch knfsd-nfsd4-fix-error-return-on-unsupported-acl.patch knfsd-nfsd4-acls-dont-return-explicit-mask.patch knfsd-nfsd4-acls-avoid-unnecessary-denies.patch knfsd-nfsd4-fix-handling-of-directories-without-default-acls.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html