All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Li, ZhenHua" <zhen-hual@hp.com>
To: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "Li,
	ZhenHua" <zhen-hual-VXdhtT5mjnY@public.gmane.org>,
	David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [patch] iommu/vt-d: unlock on error in intel_iommu_load_translation_tables()
Date: Wed, 03 Jun 2015 05:25:30 +0000	[thread overview]
Message-ID: <556E8FCA.6050800@hp.com> (raw)
In-Reply-To: <20150602140656.GR11734@mwanda>

Dan,

Do not need to call __iommu_free_mapped_mem() for err_unlock. for
no new elements are added into __iommu_remapped_mem when drops to
err_unlock.


Thanks
Zhenhua

On 06/02/2015 10:06 PM, Dan Carpenter wrote:
> On Tue, Jun 02, 2015 at 03:45:18PM +0200, Joerg Roedel wrote:
>> On Tue, Jun 02, 2015 at 01:09:58PM +0300, Dan Carpenter wrote:
>>> Smatch found some error paths that don't unlock.  Also we can return
>>> -ENOMEM instead of -1 if we don't have an old root entry.
>>>
>>> Fixes: 5908f10af4b9 ('iommu/vt-d: datatypes and functions used for kdump')
>>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>
>> Applied, thanks.
>>
>>> Releasing the lock is good, but we might need to do other error handling
>>> as well.  Presumably this function always succeeds anyway?  It seems
>>> like it might be essential for booting.
>>
>> What do you mean by 'other error handling'? In error case a negative
>> value is returned and the caller checks that.
>
> I was just worried we should call __iommu_free_mapped_mem() or
> something.  I don't know this code very well is what I'm saying...
>
> regards,
> dan carpenter
>


WARNING: multiple messages have this Message-ID (diff)
From: "Li, ZhenHua" <zhen-hual-VXdhtT5mjnY@public.gmane.org>
To: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "Li,
	ZhenHua" <zhen-hual-VXdhtT5mjnY@public.gmane.org>,
	David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [patch] iommu/vt-d: unlock on error in intel_iommu_load_translation_tables()
Date: Wed, 03 Jun 2015 13:25:30 +0800	[thread overview]
Message-ID: <556E8FCA.6050800@hp.com> (raw)
In-Reply-To: <20150602140656.GR11734@mwanda>

Dan,

Do not need to call __iommu_free_mapped_mem() for err_unlock. for
no new elements are added into __iommu_remapped_mem when drops to
err_unlock.


Thanks
Zhenhua

On 06/02/2015 10:06 PM, Dan Carpenter wrote:
> On Tue, Jun 02, 2015 at 03:45:18PM +0200, Joerg Roedel wrote:
>> On Tue, Jun 02, 2015 at 01:09:58PM +0300, Dan Carpenter wrote:
>>> Smatch found some error paths that don't unlock.  Also we can return
>>> -ENOMEM instead of -1 if we don't have an old root entry.
>>>
>>> Fixes: 5908f10af4b9 ('iommu/vt-d: datatypes and functions used for kdump')
>>> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
>>
>> Applied, thanks.
>>
>>> Releasing the lock is good, but we might need to do other error handling
>>> as well.  Presumably this function always succeeds anyway?  It seems
>>> like it might be essential for booting.
>>
>> What do you mean by 'other error handling'? In error case a negative
>> value is returned and the caller checks that.
>
> I was just worried we should call __iommu_free_mapped_mem() or
> something.  I don't know this code very well is what I'm saying...
>
> regards,
> dan carpenter
>

  reply	other threads:[~2015-06-03  5:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 10:09 [patch] iommu/vt-d: unlock on error in intel_iommu_load_translation_tables() Dan Carpenter
2015-06-02 10:09 ` Dan Carpenter
2015-06-02 13:45 ` Joerg Roedel
2015-06-02 13:45   ` Joerg Roedel
2015-06-02 14:06   ` Dan Carpenter
2015-06-02 14:06     ` Dan Carpenter
2015-06-03  5:25     ` Li, ZhenHua [this message]
2015-06-03  5:25       ` Li, ZhenHua

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=556E8FCA.6050800@hp.com \
    --to=zhen-hual@hp.com \
    --cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=zhen-hual-VXdhtT5mjnY@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 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.