[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZXGA5f0/UqC/OHu6@infradead.org>
Date: Thu, 7 Dec 2023 00:23:01 -0800
From: Christoph Hellwig <hch@...radead.org>
To: Sergei Shtepa <sergei.shtepa@...ux.dev>
Cc: axboe@...nel.dk, hch@...radead.org, corbet@....net,
snitzer@...nel.org, mingo@...hat.com, peterz@...radead.org,
juri.lelli@...hat.com, viro@...iv.linux.org.uk, brauner@...nel.org,
linux-block@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Sergei Shtepa <sergei.shtepa@...am.com>
Subject: Re: [PATCH v6 06/11] blksnap: handling and tracking I/O units
> +
> +static int (*const ctl_table[])(struct tracker *tracker,
> + __u8 __user *buf, __u32 *plen) = {
> + ctl_cbtinfo,
> + ctl_cbtmap,
> + ctl_cbtdirty,
> + ctl_snapshotadd,
> + ctl_snapshotinfo,
> +};
Please use a switch statement like the rest of the kernel. Besides
being simple to follow it also avoid having a speculation gadget
on user controlled input.
Powered by blists - more mailing lists