diff options
author | Thomas Hellstrom <thellstrom-at-vmware-dot-com> | 2009-04-05 11:05:11 +0200 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2009-08-17 17:03:59 +0200 |
commit | a5dc3a32f56f7f42e3286be287921c24fbea7fc7 (patch) | |
tree | 5e5f9aba69670cb393fc7c7092f22bf161de6777 | |
parent | 4f17060a759f1bb0b2ee995e4f46512a33c06bd8 (diff) |
slabpool: Fix an alignment problem.
If a slab was picked up from the cache rather than allocated from DRM,
the test for correct alignment let slabs with 0 alignment through.
-rw-r--r-- | src/wsbm_slabpool.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wsbm_slabpool.c b/src/wsbm_slabpool.c index 84d1e74..99f8d22 100644 --- a/src/wsbm_slabpool.c +++ b/src/wsbm_slabpool.c @@ -341,7 +341,8 @@ wsbmAllocKernelBO(struct _WsbmSlabSizeHeader *header) if ((kboTmp->actualSize == size) && (slabPool->pageAlignment == 0 || - (kboTmp->pageAlignment % slabPool->pageAlignment) == 0)) { + (kboTmp->pageAlignment != 0 && + (kboTmp->pageAlignment % slabPool->pageAlignment) == 0))) { if (!kbo) kbo = kboTmp; |