Strip __GFP_ZERO from kmalloc it is not available for older kernels.
This is needed to avoid a BUG_ON() on RHEL5.4 kernel 2.6.18-164.6.1, since __GFP_ZERO is not a valid flag for kmalloc().
This commit is contained in:
parent
641bebe35f
commit
ef1c7a0691
|
@ -505,7 +505,8 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line)
|
|||
|
||||
ASSERT(flags & KM_SLEEP);
|
||||
|
||||
dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), flags);
|
||||
dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t),
|
||||
flags & ~__GFP_ZERO);
|
||||
if (dptr == NULL) {
|
||||
CWARN("vmem_alloc(%ld, 0x%x) debug failed\n",
|
||||
sizeof(kmem_debug_t), flags);
|
||||
|
|
Loading…
Reference in New Issue