diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2006-07-12 12:03:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-12 15:52:55 -0400 |
commit | ec572e3f87c02a6dd5be25841dc482a52356947f (patch) | |
tree | 831afef04688012c865dd1cabd21f0436f28c627 /drivers/pci/msi.c | |
parent | 0635170b544b01b46a81b4ac5cff5020ab59d1fc (diff) |
[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 <ebiederm@xmission.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r-- | drivers/pci/msi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 36bc7c415af7..a83c1f5735d6 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -47,13 +47,13 @@ msi_register(struct msi_ops *ops) | |||
47 | 47 | ||
48 | static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags) | 48 | static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags) |
49 | { | 49 | { |
50 | memset(p, 0, NR_IRQS * sizeof(struct msi_desc)); | 50 | memset(p, 0, sizeof(struct msi_desc)); |
51 | } | 51 | } |
52 | 52 | ||
53 | static int msi_cache_init(void) | 53 | static int msi_cache_init(void) |
54 | { | 54 | { |
55 | msi_cachep = kmem_cache_create("msi_cache", | 55 | msi_cachep = kmem_cache_create("msi_cache", |
56 | NR_IRQS * sizeof(struct msi_desc), | 56 | sizeof(struct msi_desc), |
57 | 0, SLAB_HWCACHE_ALIGN, msi_cache_ctor, NULL); | 57 | 0, SLAB_HWCACHE_ALIGN, msi_cache_ctor, NULL); |
58 | if (!msi_cachep) | 58 | if (!msi_cachep) |
59 | return -ENOMEM; | 59 | return -ENOMEM; |