From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: Trond.Myklebust@netapp.com
Cc: bfields@fieldses.org, linux-nfs@vger.kernel.org,
devel@openvz.org, linux-kernel@vger.kernel.org,
jlayton@redhat.com
Subject: [PATCH v2 2/3] lockd: use rpc client's cl_nodename for id encoding
Date: Tue, 18 Sep 2012 13:37:18 +0400 [thread overview]
Message-ID: <20120918093718.2469.93069.stgit@localhost.localdomain> (raw)
In-Reply-To: <20120918093612.2469.94393.stgit@localhost.localdomain>
Taking hostname from uts namespace if not safe, because this cuold be
performind during umount operation on child reaper death. And in this case
current->nsproxy is NULL already.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: <stable@vger.kernel.org>
---
fs/lockd/mon.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index 38f240e..e0bc36e 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -42,6 +42,7 @@ struct nsm_args {
u32 proc;
char *mon_name;
+ char *nodename;
};
struct nsm_res {
@@ -141,6 +142,7 @@ static int nsm_mon_unmon(struct nsm_handle *nsm, u32 proc, struct nsm_res *res,
.vers = 3,
.proc = NLMPROC_NSM_NOTIFY,
.mon_name = nsm->sm_mon_name,
+ .nodename = utsname()->nodename,
};
struct rpc_message msg = {
.rpc_argp = &args,
@@ -477,7 +479,7 @@ static void encode_my_id(struct xdr_stream *xdr, const struct nsm_args *argp)
{
__be32 *p;
- encode_nsm_string(xdr, utsname()->nodename);
+ encode_nsm_string(xdr, argp->nodename);
p = xdr_reserve_space(xdr, 4 + 4 + 4);
*p++ = cpu_to_be32(argp->prog);
*p++ = cpu_to_be32(argp->vers);
next prev parent reply other threads:[~2012-09-18 9:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-18 9:37 [PATCH v2 0/3] lockd: use per-net refrence-counted NSM clients Stanislav Kinsbursky
2012-09-18 9:37 ` [PATCH v2 1/3] lockd: per-net NSM client creation and destruction helpers introduced Stanislav Kinsbursky
2012-09-18 9:37 ` Stanislav Kinsbursky [this message]
2012-09-18 9:37 ` [PATCH v2 3/3] lockd: create and use per-net NSM RPC clients on MON/UNMON requests Stanislav Kinsbursky
2012-10-30 13:04 ` kernel BUG at fs/lockd/mon.c:150, was Re: [PATCH v2 3/3] lockd: create and Kees Bakker
2012-10-30 13:23 ` Kees Bakker
2012-11-02 7:50 ` Kees Bakker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120918093718.2469.93069.stgit@localhost.localdomain \
--to=skinsbursky@parallels.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bfields@fieldses.org \
--cc=devel@openvz.org \
--cc=jlayton@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.