All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K. V" <aneesh.kumar@linux.vnet.ibm.com>
To: "Venkateswararao Jujjuri \(JV\)" <jvrao@linux.vnet.ibm.com>,
	v9fs-developer@lists.sourceforge.net
Cc: linux-fsdevel@vger.kernel.org,
	"Venkateswararao Jujjuri \(JV\)" <jvrao@linux.vnet.ibm.com>
Subject: Re: [PATCH] [net/9p] Add a Warning to catch NULL fids passed to p9_client_clunk().
Date: Thu, 26 Aug 2010 11:50:26 +0530	[thread overview]
Message-ID: <m3bp8pyjx1.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1282753626-28268-1-git-send-email-jvrao@linux.vnet.ibm.com>

On Wed, 25 Aug 2010 09:27:06 -0700, "Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com> wrote:
> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
> ---
>  net/9p/client.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/net/9p/client.c b/net/9p/client.c
> index dc6f2f2..aa7be29 100644
> --- a/net/9p/client.c
> +++ b/net/9p/client.c
> @@ -1201,6 +1201,12 @@ int p9_client_clunk(struct p9_fid *fid)
>  	struct p9_client *clnt;
>  	struct p9_req_t *req;
> 
> +	if (!fid) {
> +		P9_EPRINTK(KERN_WARNING, "Trying to clunk with NULL fid\n");
> +		dump_stack();
> +		return 0;
> +	}
> +
>  	P9_DPRINTK(P9_DEBUG_9P, ">>> TCLUNK fid %d\n", fid->fid);
>  	err = 0;
>  	clnt = fid->clnt;

But why ? We should not have called clunk on null fid. Do you see any
area of code that can do this ? Or is it a debug patch that you did when
developing other features. In case of later do we need to merge this
upstream ?

-aneesh

  reply	other threads:[~2010-08-26  6:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-25 16:27 [PATCH] [net/9p] Add a Warning to catch NULL fids passed to p9_client_clunk() Venkateswararao Jujjuri (JV)
2010-08-26  6:20 ` Aneesh Kumar K. V [this message]
2010-08-26 15:16   ` Venkateswararao Jujjuri (JV)

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=m3bp8pyjx1.fsf@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=jvrao@linux.vnet.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=v9fs-developer@lists.sourceforge.net \
    /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.