From: Ralph Campbell <rcampbell@nvidia.com>
To: "Dan Carpenter" <dan.carpenter@oracle.com>,
"Jérôme Glisse" <jglisse@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Jason Gunthorpe <jgg@ziepe.ca>,
Dan Williams <dan.j.williams@intel.com>,
Andrew Morton <akpm@linux-foundation.org>, <linux-mm@kvack.org>,
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] mm/hmm/test: Fix an error code in dmirror_allocate_chunk()
Date: Sun, 11 Oct 2020 13:58:14 -0700 [thread overview]
Message-ID: <e9a5c5cc-b301-54f0-2200-117a82ae420a@nvidia.com> (raw)
In-Reply-To: <20201010200812.GA1886610@mwanda>
On 10/10/20 1:08 PM, Dan Carpenter wrote:
> This is supposed to return false on failure, not a negative error code.
>
> Fixes: 170e38548b81 ("mm/hmm/test: use after free in dmirror_allocate_chunk()")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> I messed this up earlier... My devel version of Smatch prints too much
> garbage so I missed the warning when I first wrote the patch. :/
> Sorry.
>
> lib/test_hmm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/test_hmm.c b/lib/test_hmm.c
> index e151a7f10519..80a78877bd93 100644
> --- a/lib/test_hmm.c
> +++ b/lib/test_hmm.c
> @@ -461,7 +461,7 @@ static bool dmirror_allocate_chunk(struct dmirror_device *mdevice,
>
> devmem = kzalloc(sizeof(*devmem), GFP_KERNEL);
> if (!devmem)
> - return -ENOMEM;
> + return false;
>
> res = request_free_mem_region(&iomem_resource, DEVMEM_CHUNK_SIZE,
> "hmm_dmirror");
Thanks for fixing this.
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com>
prev parent reply other threads:[~2020-10-11 20:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-10 20:08 Dan Carpenter
2020-10-11 20:58 ` Ralph Campbell [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=e9a5c5cc-b301-54f0-2200-117a82ae420a@nvidia.com \
--to=rcampbell@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=dan.carpenter@oracle.com \
--cc=dan.j.williams@intel.com \
--cc=jgg@ziepe.ca \
--cc=jglisse@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sfr@canb.auug.org.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox