public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libhandle: zap fdhash_head in fshandle_destroy
@ 2017-12-06 17:54 Darrick J. Wong
  2017-12-07  6:08 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2017-12-06 17:54 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs

From: Darrick J. Wong <darrick.wong@oracle.com>

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

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 libhandle/handle.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libhandle/handle.c b/libhandle/handle.c
index e6971dd..878d14d 100644
--- a/libhandle/handle.c
+++ b/libhandle/handle.c
@@ -73,6 +73,7 @@ fshandle_destroy(void)
 		free(h);
 		h = nexth;
 	}
+	fdhash_head = NULL;
 }
 
 int

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] libhandle: zap fdhash_head in fshandle_destroy
  2017-12-06 17:54 [PATCH] libhandle: zap fdhash_head in fshandle_destroy Darrick J. Wong
@ 2017-12-07  6:08 ` Darrick J. Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2017-12-07  6:08 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs

On Wed, Dec 06, 2017 at 09:54:01AM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> 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

> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  libhandle/handle.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libhandle/handle.c b/libhandle/handle.c
> index e6971dd..878d14d 100644
> --- a/libhandle/handle.c
> +++ b/libhandle/handle.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-07  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-06 17:54 [PATCH] libhandle: zap fdhash_head in fshandle_destroy Darrick J. Wong
2017-12-07  6:08 ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox