lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 13 Jan 2009 22:41:48 +0100
From:	Ingo Oeser <ioe-lkml@...eria.de>
To:	Chris Mason <chris.mason@...cle.com>
Cc:	linux-kernel@...r.kernel.org
Subject: [RFC][PATCH] btrfs: missing initialization while adding extent

If we race while adding an extent and successful look it
of afterwards, we don't set the em->bdev. Now we do :-)


Signed-off-by: Ingo Oeser <ioe-lkml@...eria.de>
---
 fs/btrfs/disk-io.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 81a3138..25a0d15 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -118,6 +118,7 @@ static struct extent_map *btree_get_extent(struct inode *inode,
 		free_extent_map(em);
 		em = lookup_extent_mapping(em_tree, start, len);
 		if (em) {
+			em->bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev;
 			ret = 0;
 		} else {
 			em = lookup_extent_mapping(em_tree, failed_start,
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ