All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Liu Shixin <liushixin2@huawei.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Minchan Kim <minchan@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	linux-kernel@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH] zram: fix NULL pointer in comp_algorithm_show()
Date: Sat, 9 Nov 2024 12:42:46 +0900	[thread overview]
Message-ID: <20241109034246.GB549125@google.com> (raw)
In-Reply-To: <d1f5f56e-536f-5ce0-471e-4d340378170a@huawei.com>

On (24/11/09 11:23), Liu Shixin wrote:
> >> Fixes: 7ac07a26dea7 ("zram: preparation for multi-zcomp support")
> > So I think this fixes something much older, probably around e46b8a030d76d
> > time (2014).
> 
> The NULL pointer is introduced when zram->compressor is changed to zram->comp_algs in
> 7ac07a26dea, where the former is an array of chars and the latter is an array of pointers.
> Before that, if we cat comp_algorithm int the time window, we will get a message with no
> algorithm selected like this:

Good point, you are right.

  reply	other threads:[~2024-11-09  3:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 10:01 [PATCH] zram: fix NULL pointer in comp_algorithm_show() Liu Shixin
2024-11-09  1:12 ` Sergey Senozhatsky
2024-11-09  3:23   ` Liu Shixin
2024-11-09  3:42     ` Sergey Senozhatsky [this message]
2024-11-10  3:07 ` Jens Axboe

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=20241109034246.GB549125@google.com \
    --to=senozhatsky@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liushixin2@huawei.com \
    --cc=minchan@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.