All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Yizhuo Zhai <yzhai003@ucr.edu>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	Chengyu Song <csong@cs.ucr.edu>, Zhiyun Qian <zhiyunq@cs.ucr.edu>
Subject: Re: [patch] drivers/iommu/amd_iommu.c: argument page_size could be uninitialized
Date: Fri, 1 Jun 2018 17:42:38 +0200	[thread overview]
Message-ID: <20180601154238.GA16285@8bytes.org> (raw)
In-Reply-To: <CABvMjLQL4QXiX+8h3qTSUjD3bD4MU5oAp=PijHh94xnZgVWM7A@mail.gmail.com>

Hi Yizhuo Zhai,

your mail is a mime/multipart email with a html version. Please send a
plain text email with the patch in it. You can use git-send-email for
that. This patch doesn't apply through my git workflow.

Also, please change the subject to:

	
	[PATCH] iommu/amd: Argument page_size could be uninitialized

This matches upstream conventions for iommu patches. So make these
changes and re-post this patch after the next merge-window.

On Thu, May 31, 2018 at 11:20:28AM -0700, Yizhuo Zhai wrote:
> Argument "page_size" passing to function "fetch_pte" could be uninitialized if
> the function returns NULL. The caller "iommu_unmap_page" checks the return
> value but the page_size is used outside the if block.
> 
> Signed-off-by: yzhai003@ucr.edu <yzhai003@ucr.edu>
> ---
>  drivers/iommu/amd_iommu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
> index 774e057..3a23e97 100644
> --- a/drivers/iommu/amd_iommu.c
> +++ b/drivers/iommu/amd_iommu.c
> @@ -1397,6 +1397,7 @@ static u64 *fetch_pte(struct protection_domain *domain,
>  {
>   int level;
>   u64 *pte;
> + *page_size = 0;

Please put a newline between variable definitions and code.


Thanks,

	Joerg

      reply	other threads:[~2018-06-01 15:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31 18:20 [patch] drivers/iommu/amd_iommu.c: argument page_size could be uninitialized Yizhuo Zhai
2018-06-01 15:42 ` Joerg Roedel [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=20180601154238.GA16285@8bytes.org \
    --to=joro@8bytes.org \
    --cc=csong@cs.ucr.edu \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yzhai003@ucr.edu \
    --cc=zhiyunq@cs.ucr.edu \
    /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.