| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH] xfs: prevent deadlock in xfs_qm_shake() |
| From: | Felix Blyakher <felixb@xxxxxxx> |
| Date: | Fri, 29 May 2009 13:10:31 -0500 |
| Cc: | Felix Blyakher <felixb@xxxxxxx>, Hedi Berriche <hedi@xxxxxxx> |
| In-reply-to: | <1243620631-10749-1-git-send-email-felixb@xxxxxxx> |
| References: | <1243620631-10749-1-git-send-email-felixb@xxxxxxx> |
It's possible to recurse into filesystem from the memory
allocation, which deadlocks in xfs_qm_shake(). Add check
for __GFP_FS, and bailout if it is not set.
Signed-off-by: Felix Blyakher <felixb@xxxxxxx>
Signed-off-by: Hedi Berriche <hedi@xxxxxxx>
---
fs/xfs/linux-2.6/kmem.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h
index af6843c..d8d2321 100644
--- a/fs/xfs/linux-2.6/kmem.h
+++ b/fs/xfs/linux-2.6/kmem.h
@@ -103,7 +103,7 @@ extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int
__nocast);
static inline int
kmem_shake_allow(gfp_t gfp_mask)
{
- return (gfp_mask & __GFP_WAIT) != 0;
+ return ((gfp_mask & __GFP_WAIT && gfp_mask & __GFP_FS) != 0;
}
#endif /* __XFS_SUPPORT_KMEM_H__ */
--
1.5.4.rc3
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | XFS: prevent deadlock in quota code when recursing into filesystem, Felix Blyakher |
|---|---|
| Next by Date: | Re: [PATCH] xfs: prevent deadlock in xfs_qm_shake(), Christoph Hellwig |
| Previous by Thread: | XFS: prevent deadlock in quota code when recursing into filesystem, Felix Blyakher |
| Next by Thread: | Re: [PATCH] xfs: prevent deadlock in xfs_qm_shake(), Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |