All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: David Carlier <devnexen@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>,
	 Sergey Senozhatsky <senozhatsky@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	 linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] zram: fix slot lock bit position on big-endian 64-bit
Date: Tue, 11 Aug 2026 11:06:41 +0900	[thread overview]
Message-ID: <anqDmZKiVfyNB5FL@google.com> (raw)
In-Reply-To: <20260810202241.2436603-1-devnexen@gmail.com>

On (26/08/10 21:22), David Carlier wrote:
> The slot lock is a bit operation on the whole __lock word, which
> flags and ac_time alias as two u32s. On little-endian the lock bit
> lands in the position ZRAM_ENTRY_LOCK reserves in flags, so the
> aliasing works out. On 64-bit big-endian it lands in ac_time
> instead: with ZRAM_TRACK_ENTRY_ACTIME enabled, storing the access
> time from mark_slot_accessed() or slot_free() wipes out the held
> lock bit, letting another CPU take the same slot lock; an access
> time value with that bit set makes the slot look locked forever.
> 
> Shift the lock bit into the flags half of the word on big-endian
> 64-bit.
> 
> Fixes: 2e8ff2f51dde ("zram: use u32 for entry ac_time tracking")
> Cc: stable@vger.kernel.org
> Signed-off-by: David Carlier <devnexen@gmail.com>

Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>

      reply	other threads:[~2026-08-11  2:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10 20:22 [PATCH] zram: fix slot lock bit position on big-endian 64-bit David Carlier
2026-08-11  2:06 ` Sergey Senozhatsky [this message]

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=anqDmZKiVfyNB5FL@google.com \
    --to=senozhatsky@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=devnexen@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=stable@vger.kernel.org \
    /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.