Skip to contentSkip to conversation

libhandle: zap fdhash_head in fshandle_destroy

PATCH In review Darrick J. Wong 1 participant 2 messages Dec 6, 2017 – Dec 7, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libhandle: zap fdhash_head in fshandle_destroy

From: Darrick J. Wong <[email protected]>

Set fdhash_head to zero once we've destroyed the handle list to avoid dangling pointer problems.

---
 libhandle/handle.c |    1 +
 1 file changed, 1 insertion(+)
libhandle/handle.c +1 -0
index e6971dd..878d14d 100644
@@ -73,6 +73,7 @@ fshandle_destroy(void)
 		free(h);
 		h = nexth;
 	}
+	fdhash_head = NULL;
 }
 
 int
#1 lore raw
Quoted 4 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

Set fdhash_head to zero once we've destroyed the handle list to avoid dangling pointer problems.

Ping?

(The xfsprogs update announcement said to resend, but meh.)

--D

Quoted 21 lines
---
 libhandle/handle.c |    1 +
 1 file changed, 1 insertion(+)
libhandle/handle.c +1 -1
index e6971dd..878d14d 100644
@@ -73,6 +73,7 @@ fshandle_destroy(void)
 		free(h);
 		h = nexth;
 	}
+	fdhash_head = NULL;
 }
 
 int
--

To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html