lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190512143056.GA7761@minwooim-desktop>
Date:   Sun, 12 May 2019 23:30:58 +0900
From:   Minwoo Im <minwoo.im.dev@...il.com>
To:     Chaitanya Kulkarni <Chaitanya.Kulkarni@....com>
Cc:     Keith Busch <keith.busch@...el.com>,
        Christoph Hellwig <hch@....de>,
        Sagi Grimberg <sagi@...mberg.me>,
        "linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
        Kai Heng Feng <kai.heng.feng@...onical.com>,
        Mario Limonciello <Mario.Limonciello@...l.com>,
        lkml <linux-kernel@...r.kernel.org>,
        Rafael Wysocki <rafael@...nel.org>,
        linux-pm <linux-pm@...r.kernel.org>,
        "hange-folder>?" <toggle-mailboxes@...wooim-desktop>
Subject: Re: [PATCH] nvme/pci: Use host managed power state for suspend

> > +	union nvme_result res;
> > +	int ret;
> > +
> > +	if (!result)
> > +		return -EINVAL;
> > +
> > +	memset(&c, 0, sizeof(c));
> > +	c.features.opcode = nvme_admin_get_features;
> > +	c.features.fid = cpu_to_le32(NVME_FEAT_POWER_MGMT);
> > +
> > +	ret = __nvme_submit_sync_cmd(ctrl->admin_q, &c, &res,
> > +			NULL, 0, 0, NVME_QID_ANY, 0, 0, false);
> > +	if (ret >= 0)
> > +		*result = le32_to_cpu(res.u32);
> May be add a check for result here in above if before deref pointer :-
> 	if (ret >= 0 && result)
> 

'result' already has been checked in a few lines above.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ