Linux IOMMU Development
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: iommu/amd: Implement dm_region call-backs
Date: Thu, 11 Jun 2015 11:02:51 +0300	[thread overview]
Message-ID: <20150611080251.GF11734@mwanda> (raw)
In-Reply-To: <20150611074327.GD16345-l3A5Bk7waGM@public.gmane.org>

On Thu, Jun 11, 2015 at 09:43:27AM +0200, Joerg Roedel wrote:
> On Wed, Jun 10, 2015 at 06:39:20PM +0300, Dan Carpenter wrote:
> > Hello Joerg Roedel,
> > 
> > The patch b61238c4a5e1: "iommu/amd: Implement dm_region call-backs"
> > from May 28, 2015, leads to the following static checker warning:
> > 
> > 	drivers/iommu/amd_iommu.c:3153 amd_iommu_get_dm_regions()
> > 	error: potential null dereference 'region'.  (kzalloc returns null)
> 
> Thanks for the report, I added a check for the return value and folded
> it back into the original patch.
> 
> What static checker do you use, btw?

I'm using Smatch.

The ERR_PTR stuff requires that you run

	smatch_scripts/build_kernel_data.sh

At the start and that takes a couple hours.

regards,
dan carpenter

  parent reply	other threads:[~2015-06-11  8:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-10 15:39 iommu/amd: Implement dm_region call-backs Dan Carpenter
2015-06-11  7:43 ` Joerg Roedel
     [not found]   ` <20150611074327.GD16345-l3A5Bk7waGM@public.gmane.org>
2015-06-11  8:02     ` Dan Carpenter [this message]
2015-06-11  8:07       ` Joerg Roedel

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=20150611080251.GF11734@mwanda \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jroedel-l3A5Bk7waGM@public.gmane.org \
    /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