Skip to contentSkip to conversation

alloc_large_system_hash printk overflow on 16TB boot.

PATCH In review Robin Holt 2 participants 2 messages Oct 3, 2010 – Oct 4, 2010 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Robin Holt

author
#1 lore raw

PATCH 1/1 alloc_large_system_hash printk overflow on 16TB boot.

During boot of a 16TB system, the following is printed:
Dentry cache hash table entries: -2147483648 (order: 22, 17179869184 bytes)

To: Andrew Morton <[email protected]>
Cc: lkml <[email protected]>

---

 mm/page_alloc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/page_alloc.c +2 -2
Index: pv1010934/mm/page_alloc.c
===================================================================
@@ -5182,9 +5182,9 @@ void *__init alloc_large_system_hash(con
 	if (!table)
 		panic("Failed to allocate %s hash table\n", tablename);
 
-	printk(KERN_INFO "%s hash table entries: %d (order: %d, %lu bytes)\n",
+	printk(KERN_INFO "%s hash table entries: %ld (order: %d, %lu bytes)\n",
 	       tablename,
-	       (1U << log2qty),
+	       (1UL << log2qty),
 	       ilog2(size) - PAGE_SHIFT,
 	       size);
 
Reviewed-by on v1 1/1
#2 lore raw
Quoted 6 lines · Robin Holt

During boot of a 16TB system, the following is printed:
Dentry cache hash table entries: -2147483648 (order: 22, 17179869184 bytes)

To: Andrew Morton <[email protected]>
Cc: lkml <[email protected]>

Thanks.

Quoted 28 lines

---

mm/page_alloc.c | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)

Index: pv1010934/mm/page_alloc.c
===================================================================

mm/page_alloc.c +2 -3
@@ -5182,9 +5182,9 @@ void *__init alloc_large_system_hash(con
 	if (!table)
 		panic("Failed to allocate %s hash table\n", tablename);
 
-	printk(KERN_INFO "%s hash table entries: %d (order: %d, %lu bytes)\n",
+	printk(KERN_INFO "%s hash table entries: %ld (order: %d, %lu bytes)\n",
 	       tablename,
-	       (1U << log2qty),
+	       (1UL << log2qty),
 	       ilog2(size) - PAGE_SHIFT,
 	       size);
 
 
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/