All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: weiping zhang <zhangweiping@didichuxing.com>
Cc: virtualization@lists.linux-foundation.org, mst@redhat.com
Subject: Re: [PATCH v2 2/3] virtio: use put_device instead of kfree
Date: Wed, 13 Dec 2017 09:27:27 +0100	[thread overview]
Message-ID: <20171213092727.78c4432f.cohuck@redhat.com> (raw)
In-Reply-To: <11026fc88be1033d7ce5bc8ecb9b355d27d82075.1513083885.git.zhangweiping@didichuxing.com>

On Tue, 12 Dec 2017 21:24:33 +0800
weiping zhang <zhangweiping@didichuxing.com> wrote:

> As mentioned at drivers/base/core.c:
> /*
>  * NOTE: _Never_ directly free @dev after calling this function, even
>  * if it returned an error! Always use put_device() to give up the
>  * reference initialized in this function instead.
>  */
> so we don't free vp_vdev until vp_vdev.dev.release be called.
> 
> Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
> ---
>  drivers/misc/mic/vop/vop_main.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)

Reviewed-by: Cornelia Huck <cohuck@redhat.com>

  reply	other threads:[~2017-12-13  8:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 13:13 [PATCH v2 0/3] fix cleanup for fail to register_virtio_device weiping zhang
2017-12-12 13:24 ` [PATCH v2 1/3] virtio_pci: use put_device instead of kfree weiping zhang
2017-12-14 19:13   ` Michael S. Tsirkin
2017-12-15  1:38     ` weiping zhang
2017-12-15  1:48       ` Michael S. Tsirkin
2017-12-15 12:32         ` Cornelia Huck
2017-12-15 12:21     ` Cornelia Huck
2017-12-16 22:13       ` Michael S. Tsirkin
2017-12-12 13:24 ` [PATCH v2 2/3] virtio: " weiping zhang
2017-12-13  8:27   ` Cornelia Huck [this message]
2017-12-12 13:25 ` [PATCH v2 3/3] virtio: put reference count of virtio_device.dev weiping zhang

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=20171213092727.78c4432f.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=zhangweiping@didichuxing.com \
    /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.