Skip to content

Commit

Permalink
net/9p: Add a Warning to catch NULL fids passed to p9_client_clunk().
Browse files Browse the repository at this point in the history
Signed-off-by: Venkateswararao Jujjuri <[email protected]>
Signed-off-by: Eric Van Hensbergen <[email protected]>
  • Loading branch information
jvrao authored and ericvh committed Oct 28, 2010
1 parent 8d40fa2 commit 8e44a08
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/9p/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,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;
Expand Down

0 comments on commit 8e44a08

Please sign in to comment.