linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Xiongwei Song <sxwjean@gmail.com>
Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object
Date: Tue, 2 Jan 2018 12:38:19 -0800	[thread overview]
Message-ID: <20180102203819.GF4857@magnolia> (raw)
In-Reply-To: <20171224123447.2998-1-sxwjean@gmail.com>

On Sun, Dec 24, 2017 at 08:34:47PM +0800, Xiongwei Song wrote:
> The mutex qi_tree_lock of xfs_quotainfo_t object was initialized when
> calling xfs_qm_init_quotainfo, but it was not destroyed before free
> xfs_quotainfo_t object when calling xfs_qm_destroy_quotainfo, this was
> incorrect, so destroy it in function xfs_qm_destroy_quotainfo.

Already in for-next, but thank you for catching this.

https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git/commit/?h=for-next&id=2196881566225f3c3428d1a5f847a992944daa5b

--D

> Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
> ---
>  fs/xfs/xfs_qm.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
> index ec952dfad359..deceef5cbbf3 100644
> --- a/fs/xfs/xfs_qm.c
> +++ b/fs/xfs/xfs_qm.c
> @@ -737,6 +737,7 @@ xfs_qm_destroy_quotainfo(
>  		qi->qi_pquotaip = NULL;
>  	}
>  	mutex_destroy(&qi->qi_quotaofflock);
> +	mutex_destroy(&qi->qi_tree_lock);
>  	kmem_free(qi);
>  	mp->m_quotainfo = NULL;
>  }
> -- 
> 2.15.1
> 
> --
> 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

  reply	other threads:[~2018-01-02 20:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-24 12:34 [PATCH] xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object Xiongwei Song
2018-01-02 20:38 ` Darrick J. Wong [this message]
2018-01-02 22:29   ` Xiongwei Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180102203819.GF4857@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sxwjean@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).