From: Eric Van Hensbergen Date: Fri, 13 Jul 2007 21:47:58 +0000 (-0500) Subject: 9p: fix a race condition bug in umount which caused a segfault X-Git-Tag: v2.6.23-rc1~1055^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0af8887ebf4556a76680a61b0bb156d934702c63;p=linux-2.6 9p: fix a race condition bug in umount which caused a segfault umounting partitions after heavy activity would sometimes trigger a segmentation violation. This fix appears to remove that problem. Fix originally provided by Latchesar Ionkov. Signed-off-by: Eric Van Hensbergen --- diff --git a/net/9p/client.c b/net/9p/client.c index bb2b8a3af1..cb17075033 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -127,12 +127,12 @@ void p9_client_destroy(struct p9_client *clnt) clnt->trans = NULL; } - if (clnt->fidpool) - p9_idpool_destroy(clnt->fidpool); - list_for_each_entry_safe(fid, fidptr, &clnt->fidlist, flist) p9_fid_destroy(fid); + if (clnt->fidpool) + p9_idpool_destroy(clnt->fidpool); + kfree(clnt); } EXPORT_SYMBOL(p9_client_destroy);