mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
Fix bug introduced at r252226, when udata argument passed to bucket_alloc()
was used without making sure first that it was really passed for us. On some of my systems this bug made user argument passed by ZFS code to uma_zalloc_arg() unexpectedly block UMA per-CPU caches for those zones.
This commit is contained in:
parent
2471928bf8
commit
e8a720fe60
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=258690
@ -369,12 +369,13 @@ bucket_alloc(uma_zone_t zone, void *udata, int flags)
|
||||
* buckets via the allocation path or bucket allocations in the
|
||||
* free path.
|
||||
*/
|
||||
if ((uintptr_t)udata & UMA_ZFLAG_BUCKET)
|
||||
return (NULL);
|
||||
if ((zone->uz_flags & UMA_ZFLAG_BUCKET) == 0)
|
||||
udata = (void *)(uintptr_t)zone->uz_flags;
|
||||
else
|
||||
else {
|
||||
if ((uintptr_t)udata & UMA_ZFLAG_BUCKET)
|
||||
return (NULL);
|
||||
udata = (void *)((uintptr_t)udata | UMA_ZFLAG_BUCKET);
|
||||
}
|
||||
if ((uintptr_t)udata & UMA_ZFLAG_CACHEONLY)
|
||||
flags |= M_NOVM;
|
||||
ubz = bucket_zone_lookup(zone->uz_count);
|
||||
|
Loading…
Reference in New Issue
Block a user