Description of problem:
VDO has a central allocation function, allocateMemory(). It attempts to use kmalloc or __vmalloc to satisfy allocations. This should probably be kvmalloc, as is the standard kernel practice. Moreover, it passes the same flags to __vmalloc as to kmalloc, including GFP_NOIO when IO is unsafe to do to satisfy the allocation, and __GFP_REPEAT/__GFP_RETRY_MAYFAIL.
As per , using __vmalloc in a situation where IO is unsafe at all is unsafe, even if GFP_NOIO is pased to __vmalloc, because it may do a kmalloc without GFP_NOIO. This could lead to a deadlock in certain lowmem situations. Furthermore, as per , the use of retry modifiers (i.e. __GFP_RETRY_MAYFAIL) as parameters to __vmalloc is not supported.
Version-Release number of selected component (if applicable):
Extremely rare (theoretical) deadlock under low memory conditions.
No deadlock even under low memory conditions.
We will stop using the __GFP_NORETRY flag.
We will stop using GFP_NOIO, and instead use the memalloc_noio_save and memalloc_noio_restore methods, which have been backported to RHEL7.5
Fixed in version 184.108.40.206
As reproducing this is extremely hard (one has to dump traces of all threads and look for deadlocking conditions on the same memory ranges), sanity only testing was performed.
This passed on kmod-kvdo-220.127.116.11-2.el7.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.