From cb74daf06ffc06c1cbc37cdcf0e5d5a6796bb99b Mon Sep 17 00:00:00 2001 From: Alex Markuze Date: Tue, 18 Mar 2025 19:45:07 +0000 Subject: [PATCH] ebug allocation --- net/ceph/ceph_san_logger.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ceph/ceph_san_logger.c b/net/ceph/ceph_san_logger.c index 70c86d2af5ed2..7a5552292af47 100644 --- a/net/ceph/ceph_san_logger.c +++ b/net/ceph/ceph_san_logger.c @@ -141,7 +141,10 @@ void ceph_san_log(const char *file, const char *func, unsigned int line, const c /* Allocate entry from pagefrag - We need a spinlock here to protect access iterators */ spin_lock(&ctx->pf.lock); alloc = cephsan_pagefrag_alloc(&ctx->pf, needed_size); + int loop_count = 0; while (!alloc) { + if (loop_count++ >= 8) + panic("ceph_san_log: failed to allocate entry after 8 retries"); entry = cephsan_pagefrag_get_ptr_from_tail(&ctx->pf); BUG_ON(entry->debug_poison != CEPH_SAN_LOG_ENTRY_POISON); BUG_ON(entry->len == 0); -- 2.39.5