diff options
-rw-r--r-- | mm/slub.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4466,7 +4466,7 @@ SLAB_ATTR_RO(ctor); | |||
4466 | 4466 | ||
4467 | static ssize_t aliases_show(struct kmem_cache *s, char *buf) | 4467 | static ssize_t aliases_show(struct kmem_cache *s, char *buf) |
4468 | { | 4468 | { |
4469 | return sprintf(buf, "%d\n", s->refcount - 1); | 4469 | return sprintf(buf, "%d\n", s->refcount < 0 ? 0 : s->refcount - 1); |
4470 | } | 4470 | } |
4471 | SLAB_ATTR_RO(aliases); | 4471 | SLAB_ATTR_RO(aliases); |
4472 | 4472 | ||