]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commitdiff
bug fix
authorAlex Markuze <amarkuze@redhat.com>
Sun, 16 Mar 2025 19:08:26 +0000 (19:08 +0000)
committerAlex Markuze <amarkuze@redhat.com>
Sun, 16 Mar 2025 19:08:26 +0000 (19:08 +0000)
net/ceph/ceph_san_logger.c

index 6e9eb8c547ace2a628481d9b79471b0267a49b9a..3bb0f7b06e840013a7ccf80e3921802ceef5e536 100644 (file)
@@ -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);