xen: blkback, blktap: Fix potential resource leak
When picking up the changes for CVE-2010-4247 I missed that there
actually is a follow-up patch (that was not mentioned in the CVE) which prevents resource leak in that special case. Signed-off-by: Keir Fraser <keir.fraser@citrix.com> BugLink: http://bugs.launchpad.net/bugs/800254 (picked from http://xenbits.xen.org/hg/linux-2.6.18-xen.hg/rev/5012c470f875) Signed-off-by: Stefan Bader <stefan.bader@canonical.com> --- drivers/xen/blkback/blkback.c | 8 ++++---- drivers/xen/blktap/blktap.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/xen/blkback/blkback.c b/drivers/xen/blkback/blkback.c index afd68ed..6787d0d 100644 --- a/drivers/xen/blkback/blkback.c +++ b/drivers/xen/blkback/blkback.c @@ -314,14 +314,14 @@ static int do_block_io_op(blkif_t *blkif) if (RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, rc)) break; - pending_req = alloc_req(); - if (NULL == pending_req) { - blkif->st_oo_req++; + if (kthread_should_stop()) { more_to_do = 1; break; } - if (kthread_should_stop()) { + pending_req = alloc_req(); + if (NULL == pending_req) { + blkif->st_oo_req++; more_to_do = 1; break; } diff --git a/drivers/xen/blktap/blktap.c b/drivers/xen/blktap/blktap.c index bde14f5..0da7fe4 100644 --- a/drivers/xen/blktap/blktap.c +++ b/drivers/xen/blktap/blktap.c @@ -1237,14 +1237,14 @@ static int do_block_io_op(blkif_t *blkif) break; } - pending_req = alloc_req(); - if (NULL == pending_req) { - blkif->st_oo_req++; + if (kthread_should_stop()) { more_to_do = 1; break; } - if (kthread_should_stop()) { + pending_req = alloc_req(); + if (NULL == pending_req) { + blkif->st_oo_req++; more_to_do = 1; break; } -- 1.7.4.1 --------------080807090900010907080200 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- kernel-team mailing list kernel-team@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kernel-team --------------080807090900010907080200-- |
xen: blkback, blktap: Fix potential resource leak
When picking up the changes for CVE-2010-4247 I missed that there
actually is a follow-up patch (that was not mentioned in the CVE) which prevents resource leak in that special case. Signed-off-by: Keir Fraser <keir.fraser@citrix.com> BugLink: http://bugs.launchpad.net/bugs/800254 (picked from http://xenbits.xen.org/hg/linux-2.6.18-xen.hg/rev/5012c470f875) Signed-off-by: Stefan Bader <stefan.bader@canonical.com> --- ...lkback-blktap-Fix-potential-resource-leak.patch | 69 ++++++++++++++++++++ 1 files changed, 69 insertions(+), 0 deletions(-) create mode 100644 debian/binary-custom.d/xen/patchset/025-xen-blkback-blktap-Fix-potential-resource-leak.patch diff --git a/debian/binary-custom.d/xen/patchset/025-xen-blkback-blktap-Fix-potential-resource-leak.patch b/debian/binary-custom.d/xen/patchset/025-xen-blkback-blktap-Fix-potential-resource-leak.patch new file mode 100644 index 0000000..14d97cc --- /dev/null +++ b/debian/binary-custom.d/xen/patchset/025-xen-blkback-blktap-Fix-potential-resource-leak.patch @@ -0,0 +1,69 @@ +From dc547726170fff96567d5899a1222400137b753f Mon Sep 17 00:00:00 2001 +From: Stefan Bader <stefan.bader@canonical.com> +Date: Tue, 21 Jun 2011 17:20:27 +0200 +Subject: [PATCH] xen: blkback, blktap: Fix potential resource leak + +When picking up the changes for CVE-2010-4247 I missed that there +actually is a follow-up patch (that was not mentioned in the CVE) +which prevents resource leak in that special case. + +Signed-off-by: Keir Fraser <keir.fraser@citrix.com> + +BugLink: http://bugs.launchpad.net/bugs/800254 + +(picked from http://xenbits.xen.org/hg/linux-2.6.18-xen.hg/rev/5012c470f875) +Signed-off-by: Stefan Bader <stefan.bader@canonical.com> +--- + drivers/xen/blkback/blkback.c | 8 ++++---- + drivers/xen/blktap/blktap.c | 8 ++++---- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/drivers/xen/blkback/blkback.c b/drivers/xen/blkback/blkback.c +index afd68ed..6787d0d 100644 +--- a/drivers/xen/blkback/blkback.c ++++ b/drivers/xen/blkback/blkback.c +@@ -314,14 +314,14 @@ static int do_block_io_op(blkif_t *blkif) + if (RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, rc)) + break; + +- pending_req = alloc_req(); +- if (NULL == pending_req) { +- blkif->st_oo_req++; ++ if (kthread_should_stop()) { + more_to_do = 1; + break; + } + +- if (kthread_should_stop()) { ++ pending_req = alloc_req(); ++ if (NULL == pending_req) { ++ blkif->st_oo_req++; + more_to_do = 1; + break; + } +diff --git a/drivers/xen/blktap/blktap.c b/drivers/xen/blktap/blktap.c +index bde14f5..0da7fe4 100644 +--- a/drivers/xen/blktap/blktap.c ++++ b/drivers/xen/blktap/blktap.c +@@ -1237,14 +1237,14 @@ static int do_block_io_op(blkif_t *blkif) + break; + } + +- pending_req = alloc_req(); +- if (NULL == pending_req) { +- blkif->st_oo_req++; ++ if (kthread_should_stop()) { + more_to_do = 1; + break; + } + +- if (kthread_should_stop()) { ++ pending_req = alloc_req(); ++ if (NULL == pending_req) { ++ blkif->st_oo_req++; + more_to_do = 1; + break; + } +-- +1.7.4.1 + -- 1.7.4.1 --------------020808080507000303060607 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- kernel-team mailing list kernel-team@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kernel-team --------------020808080507000303060607-- |
xen: blkback, blktap: Fix potential resource leak
When picking up the changes for CVE-2010-4247 I missed that there
actually is a follow-up patch (that was not mentioned in the CVE) which prevents resource leak in that special case. Signed-off-by: Keir Fraser <keir.fraser@citrix.com> BugLink: http://bugs.launchpad.net/bugs/800254 (picked from http://xenbits.xen.org/hg/linux-2.6.18-xen.hg/rev/5012c470f875) Signed-off-by: Stefan Bader <stefan.bader@canonical.com> --- ...lkback-blktap-Fix-potential-resource-leak.patch | 69 ++++++++++++++++++++ 1 files changed, 69 insertions(+), 0 deletions(-) create mode 100644 debian/binary-custom.d/xen/patchset/025-xen-blkback-blktap-Fix-potential-resource-leak.patch diff --git a/debian/binary-custom.d/xen/patchset/025-xen-blkback-blktap-Fix-potential-resource-leak.patch b/debian/binary-custom.d/xen/patchset/025-xen-blkback-blktap-Fix-potential-resource-leak.patch new file mode 100644 index 0000000..14d97cc --- /dev/null +++ b/debian/binary-custom.d/xen/patchset/025-xen-blkback-blktap-Fix-potential-resource-leak.patch @@ -0,0 +1,69 @@ +From dc547726170fff96567d5899a1222400137b753f Mon Sep 17 00:00:00 2001 +From: Stefan Bader <stefan.bader@canonical.com> +Date: Tue, 21 Jun 2011 17:20:27 +0200 +Subject: [PATCH] xen: blkback, blktap: Fix potential resource leak + +When picking up the changes for CVE-2010-4247 I missed that there +actually is a follow-up patch (that was not mentioned in the CVE) +which prevents resource leak in that special case. + +Signed-off-by: Keir Fraser <keir.fraser@citrix.com> + +BugLink: http://bugs.launchpad.net/bugs/800254 + +(picked from http://xenbits.xen.org/hg/linux-2.6.18-xen.hg/rev/5012c470f875) +Signed-off-by: Stefan Bader <stefan.bader@canonical.com> +--- + drivers/xen/blkback/blkback.c | 8 ++++---- + drivers/xen/blktap/blktap.c | 8 ++++---- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/drivers/xen/blkback/blkback.c b/drivers/xen/blkback/blkback.c +index afd68ed..6787d0d 100644 +--- a/drivers/xen/blkback/blkback.c ++++ b/drivers/xen/blkback/blkback.c +@@ -314,14 +314,14 @@ static int do_block_io_op(blkif_t *blkif) + if (RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, rc)) + break; + +- pending_req = alloc_req(); +- if (NULL == pending_req) { +- blkif->st_oo_req++; ++ if (kthread_should_stop()) { + more_to_do = 1; + break; + } + +- if (kthread_should_stop()) { ++ pending_req = alloc_req(); ++ if (NULL == pending_req) { ++ blkif->st_oo_req++; + more_to_do = 1; + break; + } +diff --git a/drivers/xen/blktap/blktap.c b/drivers/xen/blktap/blktap.c +index bde14f5..0da7fe4 100644 +--- a/drivers/xen/blktap/blktap.c ++++ b/drivers/xen/blktap/blktap.c +@@ -1237,14 +1237,14 @@ static int do_block_io_op(blkif_t *blkif) + break; + } + +- pending_req = alloc_req(); +- if (NULL == pending_req) { +- blkif->st_oo_req++; ++ if (kthread_should_stop()) { + more_to_do = 1; + break; + } + +- if (kthread_should_stop()) { ++ pending_req = alloc_req(); ++ if (NULL == pending_req) { ++ blkif->st_oo_req++; + more_to_do = 1; + break; + } +-- +1.7.4.1 + -- 1.7.4.1 --------------020808080507000303060607 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- kernel-team mailing list kernel-team@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kernel-team --------------020808080507000303060607-- |
| All times are GMT. The time now is 10:07 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.