Skip to contentSkip to conversation

SQUASHME pnfs-submit: pnfs4_proc_layoutcommit was using freed memory

PATCH New Fred Isaman 1 participant 1 message Jun 18, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SQUASHME pnfs-submit: pnfs4_proc_layoutcommit was using freed memory

_pnfs4_proc_layoutcommit frees data when called with issync==true. This resulted in setting server from the freed memory.

---
 fs/nfs/nfs4proc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
fs/nfs/nfs4proc.c +2 -1
index b85239a..5ffdfe1 100644
@@ -5607,10 +5607,11 @@ out:
 int pnfs4_proc_layoutcommit(struct pnfs_layoutcommit_data *data, int issync)
 {
 	struct nfs4_exception exception = { };
+	struct nfs_server *server = NFS_SERVER(data->args.inode);
 	int err;
 
 	do {
-		err = nfs4_handle_exception(NFS_SERVER(data->args.inode),
+		err = nfs4_handle_exception(server,
 					_pnfs4_proc_layoutcommit(data, issync),
 					&exception);
 	} while (exception.retry);
Signature · 1 line
1.6.6.1