All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	xen-devel <xen-devel@lists.xen.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xenbus: don't free other end details too early
Date: Wed, 14 Mar 2012 12:33:08 -0400	[thread overview]
Message-ID: <20120314163308.GE16960@phenom.dumpdata.com> (raw)
In-Reply-To: <4F5501D30200007800076707@nat28.tlf.novell.com>

On Mon, Mar 05, 2012 at 05:11:31PM +0000, Jan Beulich wrote:
> The individual drivers' remove functions could legitimately attempt to
> access this information (for logging messages if nothing else). Note
> that I did not in fact observe a problem anywhere, but I came across
> this while looking into the reasons for what turned out to need the
> fix at https://lkml.org/lkml/2012/3/5/336 to vsprintf().

applied.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> ---
>  drivers/xen/xenbus/xenbus_probe.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- 3.3-rc6/drivers/xen/xenbus/xenbus_probe.c
> +++ 3.3-rc6-xenbus-remove-details/drivers/xen/xenbus/xenbus_probe.c
> @@ -257,11 +257,12 @@ int xenbus_dev_remove(struct device *_de
>  	DPRINTK("%s", dev->nodename);
>  
>  	free_otherend_watch(dev);
> -	free_otherend_details(dev);
>  
>  	if (drv->remove)
>  		drv->remove(dev);
>  
> +	free_otherend_details(dev);
> +
>  	xenbus_switch_state(dev, XenbusStateClosed);
>  	return 0;
>  }
> 
> 
> 

> The individual drivers' remove functions could legitimately attempt to
> access this information (for logging messages if nothing else). Note
> that I did not in fact observe a problem anywhere, but I came across
> this while looking into the reasons for what turned out to need the
> fix at https://lkml.org/lkml/2012/3/5/336 to vsprintf().
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> ---
>  drivers/xen/xenbus/xenbus_probe.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- 3.3-rc6/drivers/xen/xenbus/xenbus_probe.c
> +++ 3.3-rc6-xenbus-remove-details/drivers/xen/xenbus/xenbus_probe.c
> @@ -257,11 +257,12 @@ int xenbus_dev_remove(struct device *_de
>  	DPRINTK("%s", dev->nodename);
>  
>  	free_otherend_watch(dev);
> -	free_otherend_details(dev);
>  
>  	if (drv->remove)
>  		drv->remove(dev);
>  
> +	free_otherend_details(dev);
> +
>  	xenbus_switch_state(dev, XenbusStateClosed);
>  	return 0;
>  }


  parent reply	other threads:[~2012-03-14 16:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05 17:11 [PATCH] xenbus: don't free other end details too early Jan Beulich
2012-03-14 16:33 ` Konrad Rzeszutek Wilk
2012-03-14 16:33 ` Konrad Rzeszutek Wilk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-05 17:11 Jan Beulich

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=20120314163308.GE16960@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xen.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.