Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1438239 > unrolled thread

[PATCH] xen-blkback: really don't leak mode property

Started by"Jan Beulich" <JBeulich@suse.com>
First post2016-07-07 09:40 +0200
Last post2016-07-07 17:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] xen-blkback: really don't leak mode property "Jan Beulich" <JBeulich@suse.com> - 2016-07-07 09:40 +0200
    Re: [PATCH] xen-blkback: really don't leak mode property Roger Pau Monne <roger.pau@citrix.com> - 2016-07-07 11:20 +0200
      Re: [PATCH] xen-blkback: really don't leak mode property Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2016-07-07 17:40 +0200

#1438239 — [PATCH] xen-blkback: really don't leak mode property

From"Jan Beulich" <JBeulich@suse.com>
Date2016-07-07 09:40 +0200
Subject[PATCH] xen-blkback: really don't leak mode property
Message-ID<rSc4G-3S8-39@gated-at.bofh.it>
Commit 9d092603cc ("xen-blkback: do not leak mode property") left one
path unfixed; correct this.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
 drivers/block/xen-blkback/xenbus.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- 4.7-rc6-xen.orig/drivers/block/xen-blkback/xenbus.c
+++ 4.7-rc6-xen/drivers/block/xen-blkback/xenbus.c
@@ -715,8 +715,11 @@ static void backend_changed(struct xenbu
 
 	/* Front end dir is a number, which is used as the handle. */
 	err = kstrtoul(strrchr(dev->otherend, '/') + 1, 0, &handle);
-	if (err)
+	if (err) {
+		kfree(be->mode);
+		be->mode = NULL;
 		return;
+	}
 
 	be->major = major;
 	be->minor = minor;

[toc] | [next] | [standalone]


#1438432

FromRoger Pau Monne <roger.pau@citrix.com>
Date2016-07-07 11:20 +0200
Message-ID<rSdDr-4Xv-5@gated-at.bofh.it>
In reply to#1438239
On Thu, Jul 07, 2016 at 01:38:13AM -0600, Jan Beulich wrote:
> Commit 9d092603cc ("xen-blkback: do not leak mode property") left one
> path unfixed; correct this.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Roger Pau Monné <roger.pau@citrix.com>

[toc] | [prev] | [next] | [standalone]


#1438684

FromKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date2016-07-07 17:40 +0200
Message-ID<rSjzd-nu-43@gated-at.bofh.it>
In reply to#1438432
On Thu, Jul 07, 2016 at 11:17:14AM +0200, Roger Pau Monne wrote:
> On Thu, Jul 07, 2016 at 01:38:13AM -0600, Jan Beulich wrote:
> > Commit 9d092603cc ("xen-blkback: do not leak mode property") left one
> > path unfixed; correct this.
> > 
> > Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Acked-by: Roger Pau Monné <roger.pau@citrix.com>

Queued.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web