[PATCHv2] nvme: always initialize known command effects

Keith Busch kbusch at kernel.org
Mon Jan 23 08:29:35 PST 2023


On Mon, Jan 23, 2023 at 03:54:31PM +0530, Kanchan Joshi wrote:
> On Thu, Jan 19, 2023 at 08:41:28AM -0800, Keith Busch wrote:
> > +	if (!ctrl->effects) {
> > +		ctrl->effects = kzalloc(sizeof(*ctrl->effects), GFP_KERNEL);
> 
> ctrl->effects is not getting freed if controller does not support the
> commands-supported-and-effects log page?

Right. If the controller doesn't support it, the driver will make one up
with some sane defaults. The point of this patch is that we don't want
to re-construct the defaults for each passthrough command so we need to
store the defaults somewhere.



More information about the Linux-nvme mailing list