diff options
author | Brian Behlendorf <[email protected]> | 2010-03-18 13:39:51 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-03-18 13:39:51 -0700 |
commit | aa600d8a3843755be1dd621ecd00401f26f3bb49 (patch) | |
tree | 4b4c08f79ae299f1b1b462a39f3de5e4884d300b | |
parent | c5c3d402f7109e37eeee54cd69d15c8d6cabf5d6 (diff) |
Reduce max kmem based slab size
Allowing MAX_ORDER-1 sized allocations for kmem based slabs have
been observed to result in deadlocks. To help prvent this limit
max kmem based slab size to MAX_ORDER-3. Just for the record
callers should not be creating slabs like this, but if they do
we should still handle it as safely as we can.
-rw-r--r-- | module/spl/spl-kmem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index f87d2b55a..d62a6f61b 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1057,7 +1057,7 @@ spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size) obj_size = spl_obj_size(skc); if (skc->skc_flags & KMC_KMEM) - max_size = ((uint32_t)1 << (MAX_ORDER-1)) * PAGE_SIZE; + max_size = ((uint32_t)1 << (MAX_ORDER-3)) * PAGE_SIZE; else max_size = (32 * 1024 * 1024); |