From e043972dfcde1e5a34115b9ac7434853fb4a5664 Mon Sep 17 00:00:00 2001 From: Alex Markuze Date: Sun, 16 Mar 2025 19:08:26 +0000 Subject: [PATCH] bug fix --- net/ceph/ceph_san_logger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ceph/ceph_san_logger.c b/net/ceph/ceph_san_logger.c index 6e9eb8c547ace..3bb0f7b06e840 100644 --- a/net/ceph/ceph_san_logger.c +++ b/net/ceph/ceph_san_logger.c @@ -135,6 +135,7 @@ void ceph_san_log(const char *file, unsigned int line, const char *fmt, ...) while (!alloc) { entry = cephsan_pagefrag_get_ptr_from_tail(&ctx->pf); BUG_ON(entry->debug_poison != CEPH_SAN_LOG_ENTRY_POISON); + BUG_ON(entry->len == 0); cephsan_pagefrag_free(&ctx->pf, entry->len); alloc = cephsan_pagefrag_alloc(&ctx->pf, sizeof(*entry) + len + 1); } @@ -149,7 +150,7 @@ void ceph_san_log(const char *file, unsigned int line, const char *fmt, ...) entry->ts = jiffies; entry->line = line; entry->file = file; - entry->len = len; + entry->len = len + sizeof(*entry) + 1; } EXPORT_SYMBOL(ceph_san_log); -- 2.39.5