summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom-at-vmware-dot-com>2009-04-05 11:05:11 +0200
committerThomas Hellstrom <thellstrom@vmware.com>2009-08-17 17:03:59 +0200
commita5dc3a32f56f7f42e3286be287921c24fbea7fc7 (patch)
tree5e5f9aba69670cb393fc7c7092f22bf161de6777
parent4f17060a759f1bb0b2ee995e4f46512a33c06bd8 (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.c3
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;