rpms/kernel/F-12 block-fix-bugs-in-bio-integrity-mempool-usage.patch, NONE, 1.1 kernel.spec, 1.1997, 1.1998
Chuck Ebbert
cebbert at fedoraproject.org
Sat Jan 30 21:07:32 UTC 2010
- Previous message: rpms/kernel/F-11 via-padlock-60-fix-aes-oops.patch, NONE, 1.1.2.1 kernel.spec, 1.1784.2.9, 1.1784.2.10
- Next message: rpms/socat/F-12 .cvsignore, 1.5, 1.6 socat.spec, 1.19, 1.20 sources, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30636
Modified Files:
kernel.spec
Added Files:
block-fix-bugs-in-bio-integrity-mempool-usage.patch
Log Message:
Fix possible oops in bio-integrity code.
block-fix-bugs-in-bio-integrity-mempool-usage.patch:
bio-integrity.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- NEW FILE block-fix-bugs-in-bio-integrity-mempool-usage.patch ---
From: Chuck Ebbert <cebbert at redhat.com>
Date: Sat, 30 Jan 2010 19:28:19 +0000 (+0100)
Subject: block: fix bugs in bio-integrity mempool usage
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Faxboe%2Flinux-2.6-block.git;a=commitdiff_plain;h=9e9432c267e4047db98b9d4fba95099c6effcef9
block: fix bugs in bio-integrity mempool usage
Fix two bugs in the bio integrity code:
use_bip_pool() always returns 0 because it checks against the wrong limit,
causing the mempool to be used only when regular allocation fails.
When the mempool is used as a fallback we don't free the data properly.
Signed-Off-By: Chuck Ebbert <cebbert at redhat.com>
Acked-by: Martin K. Petersen <martin.petersen at oracle.com>
Signed-off-by: Jens Axboe <jens.axboe at oracle.com>
---
diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c
index 49a34e7..a16f29e 100644
--- a/fs/bio-integrity.c
+++ b/fs/bio-integrity.c
@@ -61,7 +61,7 @@ static inline unsigned int vecs_to_idx(unsigned int nr)
static inline int use_bip_pool(unsigned int idx)
{
- if (idx == BIOVEC_NR_POOLS)
+ if (idx == BIOVEC_MAX_IDX)
return 1;
return 0;
@@ -95,6 +95,7 @@ struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *bio,
/* Use mempool if lower order alloc failed or max vecs were requested */
if (bip == NULL) {
+ idx = BIOVEC_MAX_IDX; /* so we free the payload properly later */
bip = mempool_alloc(bs->bio_integrity_pool, gfp_mask);
if (unlikely(bip == NULL)) {
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.1997
retrieving revision 1.1998
diff -u -p -r1.1997 -r1.1998
--- kernel.spec 29 Jan 2010 02:44:17 -0000 1.1997
+++ kernel.spec 30 Jan 2010 21:07:31 -0000 1.1998
@@ -750,6 +750,9 @@ Patch12102: wmi-check-wmi-get-event-data
Patch12200: add-appleir-usb-driver.patch
+# fix possible oops in bio-integrity
+Patch12300: block-fix-bugs-in-bio-integrity-mempool-usage.patch
+
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1374,6 +1377,9 @@ ApplyPatch add-appleir-usb-driver.patch
ApplyPatch wmi-free-the-allocated-acpi-objects.patch
ApplyPatch wmi-check-wmi-get-event-data-return-value.patch
+# fix possible oops in bio-integrity
+ApplyPatch block-fix-bugs-in-bio-integrity-mempool-usage.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -2029,6 +2035,9 @@ fi
# and build.
%changelog
+* Sat Jan 30 2010 Chuck Ebbert <cebbert at redhat.com> 2.6.32.7-38
+- Fix possible oops in bio-integrity code.
+
* Thu Jan 28 2010 Chuck Ebbert <cebbert at redhat.com> 2.6.32.7-37
- Linux 2.6.32.7
- Previous message: rpms/kernel/F-11 via-padlock-60-fix-aes-oops.patch, NONE, 1.1.2.1 kernel.spec, 1.1784.2.9, 1.1784.2.10
- Next message: rpms/socat/F-12 .cvsignore, 1.5, 1.6 socat.spec, 1.19, 1.20 sources, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list