From ec572e3f87c02a6dd5be25841dc482a52356947f Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Wed, 12 Jul 2006 09:03:08 -0700 Subject: [PATCH] msi: Only keep one msi_desc in each slab entry. It looks like someone confused kmem_cache_create with a different allocator and was attempting to give it knowledge of how many cache entries there were. With the unfortunate result that each slab entry was big enough to hold every irq. Signed-off-by: Eric W. Biederman Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/pci/msi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 36bc7c4..a83c1f5 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -47,13 +47,13 @@ msi_register(struct msi_ops *ops) static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags) { - memset(p, 0, NR_IRQS * sizeof(struct msi_desc)); + memset(p, 0, sizeof(struct msi_desc)); } static int msi_cache_init(void) { msi_cachep = kmem_cache_create("msi_cache", - NR_IRQS * sizeof(struct msi_desc), + sizeof(struct msi_desc), 0, SLAB_HWCACHE_ALIGN, msi_cache_ctor, NULL); if (!msi_cachep) return -ENOMEM; -- cgit v1.1