xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object
PATCH 1/1 xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object
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.
--- fs/xfs/xfs_qm.c | 1 + 1 file changed, 1 insertion(+)
fs/xfs/xfs_qm.c +1 -0
@@ -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 ; }
Signature · 1 line
2.15.1
Quoted 4 lines · Xiongwei Song
The mutex
qi_tree_lockofxfs_quotainfo_tobject was initialized when callingxfs_qm_init_quotainfo, but it was not destroyed before freexfs_quotainfo_tobject when callingxfs_qm_destroy_quotainfo, this was incorrect, so destroy it in functionxfs_qm_destroy_quotainfo.
Already in for-next, but thank you for catching this.
--D
Quoted 24 lines
Signed-off-by Xiongwei Song <[email protected]>--- fs/xfs/xfs_qm.c | 1 + 1 file changed, 1 insertion(+)fs/xfs/xfs_qm.c +1
-0@@ -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 ; }Signature · 6 lines
2.15.1 -- 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
2018-01-03 4:38 GMT+08:00 Darrick J. Wong <[email protected]>:
Quoted 9 lines · Xiongwei Song
Quoted 4 lines
The mutex
qi_tree_lockofxfs_quotainfo_tobject was initialized when callingxfs_qm_init_quotainfo, but it was not destroyed before freexfs_quotainfo_tobject when callingxfs_qm_destroy_quotainfo, this was incorrect, so destroy it in functionxfs_qm_destroy_quotainfo.Already in for-next, but thank you for catching this.
Apologies for the noise.
Yours sincerely,
Xiongwei
Quoted 26 lines
--D
Quoted 24 lines
Signed-off-by Xiongwei Song <[email protected]>--- fs/xfs/xfs_qm.c | 1 + 1 file changed, 1 insertion(+)fs/xfs/xfs_qm.c +1
-1@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html