All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: tongzhiwei <tongzhiwei@cmss.chinamobile.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] lib: objagg: Fix stats imbalance on hinted-parent error path
Date: Fri, 6 Nov 2026 13:31:14 +0100	[thread overview]
Message-ID: <au3IjV88SKC1wKsl@FV6GYCPJ69> (raw)
In-Reply-To: <20261106095621.143-1-tongzhiwei@cmss.chinamobile.com>

Fri, Nov 06, 2026 at 10:55:58AM +0100, tongzhiwei@cmss.chinamobile.com wrote:
>NOTE: this commit is worked by llm completely
>
>In objagg_obj_init_with_hints(), the parent is obtained via
>__objagg_obj_get() which increments only the refcount without
>touching stats.  The matching release for internal references is
>__objagg_obj_put() (no stats adjustment), as used in the success
>path in objagg_obj_parent_unassign().
>
>However, the error cleanup at err_parent_assign calls the public
>objagg_obj_put(), which additionally runs objagg_obj_stats_dec(),
>decrementing user_count and delta_user_count with no prior
>increment.  This corrupts the parent stats, leading to
>under-reporting and potential user_count underflow.
>
>Use __objagg_obj_put() to match the internal __objagg_obj_get().
>
>Assisted-by: LLM
>Signed-off-by: tongzhiwei <tongzhiwei@cmss.chinamobile.com>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

  reply	other threads:[~2026-11-06 12:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06  9:55 [PATCH] lib: objagg: Fix stats imbalance on hinted-parent error path tongzhiwei
2026-11-06 12:31 ` Jiri Pirko [this message]
2026-11-27  7:14 ` [PATCH net-next v2] " tongzhiwei
2026-12-04  5:00   ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=au3IjV88SKC1wKsl@FV6GYCPJ69 \
    --to=jiri@resnulli.us \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tongzhiwei@cmss.chinamobile.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.