projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6da7c9
)
xfs: prevent deadlock in xfs_qm_shake()
author
Felix Blyakher
<
[email protected]
>
Mon, 1 Jun 2009 18:13:24 +0000
(13:13 -0500)
committer
Felix Blyakher
<
[email protected]
>
Tue, 2 Jun 2009 03:59:45 +0000
(22:59 -0500)
It's possible to recurse into filesystem from the memory
allocation, which deadlocks in xfs_qm_shake(). Add check
for __GFP_FS, and bail out if it is not set.
Signed-off-by: Felix Blyakher <
[email protected]
>
Signed-off-by: Hedi Berriche <
[email protected]
>
Reviewed-by: Christoph Hellwig <
[email protected]
>
Reviewed-by: Andi Kleen <
[email protected]
>
Signed-off-by: Felix Blyakher <
[email protected]
>
fs/xfs/linux-2.6/kmem.h
patch
|
blob
|
history
diff --git
a/fs/xfs/linux-2.6/kmem.h
b/fs/xfs/linux-2.6/kmem.h
index af6843c7ee4bb165f6345d3553ef145af97ae208..179cbd630f692f6c0220112d6ba01cda65ef67d9 100644
(file)
--- 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))
;
}
#endif /* __XFS_SUPPORT_KMEM_H__ */