net/9p: fid->fid is used uninitialized
PATCH 1/1 net/9p: fid->fid is used uninitialized
I appear to have introduced this myself trying to fix a signed/unsigned issue, sorry.
---fid->fid is used uninitialized
Signed-off-by Roel Kluin <[email protected]>
---
net/9p/client.c +1 -1
@@ -618,7 +618,7 @@ static struct p9_fid *p9_fid_create(struct p9_client *clnt)return ERR_PTR (-ENOMEM ); ret =p9_idpool_get (clnt->fidpool); -if (fid->fid <0 ) { +if (ret <0 ) { ret = -ENOSPC ; goto error; }
David Miller
AppliedFrom: Roel Kluin <[email protected]>
Date: Sun, 18 Jan 2009 20:10:25 +0100
Quoted 3 lines
fid->fidis used uninitializedSigned-off-by Roel Kluin <[email protected]>
Applied, thanks Roel.
Someone should look into how p9_idpool_get() errors are propagated. Another call site uses -ENOBUFS, this location uses -ENOSPC, and it begs the question whether we should just use the error return given by p9_idpool_get() across the board.