From: Ben Hutchings <ben@decadent.org.uk>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: akpm@linux-foundation.org, Denis Kirjanov <kda@linux-powerpc.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"David Sterba" <dsterba@suse.com>,
"Qu Wenruo" <quwenruo.btrfs@gmx.com>,
"Ben Hutchings" <ben.hutchings@codethink.co.uk>
Subject: [PATCH 3.16 042/245] btrfs: Move leaf and node validation checker to tree-checker.c
Date: Fri, 24 Apr 2020 00:04:29 +0100 [thread overview]
Message-ID: <lsq.1587683028.131416704@decadent.org.uk> (raw)
In-Reply-To: <lsq.1587683027.831233700@decadent.org.uk>
3.16.83-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
commit 557ea5dd003d371536f6b4e8f7c8209a2b6fd4e3 upstream.
It's no doubt the comprehensive tree block checker will become larger,
so moving them into their own files is quite reasonable.
Signed-off-by: Qu Wenruo <quwenruo.btrfs@gmx.com>
[ wording adjustments ]
Signed-off-by: David Sterba <dsterba@suse.com>
[bwh: Backported to 4.4:
- The moved code is slightly different
- Adjust context]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/btrfs/Makefile | 2 +-
fs/btrfs/disk-io.c | 284 +-----------------------------------
fs/btrfs/tree-checker.c | 309 ++++++++++++++++++++++++++++++++++++++++
fs/btrfs/tree-checker.h | 26 ++++
4 files changed, 340 insertions(+), 281 deletions(-)
create mode 100644 fs/btrfs/tree-checker.c
create mode 100644 fs/btrfs/tree-checker.h
--- a/fs/btrfs/Makefile
+++ b/fs/btrfs/Makefile
@@ -9,7 +9,7 @@ btrfs-y += super.o ctree.o extent-tree.o
export.o tree-log.o free-space-cache.o zlib.o lzo.o \
compression.o delayed-ref.o relocation.o delayed-inode.o scrub.o \
reada.o backref.o ulist.o qgroup.o send.o dev-replace.o raid56.o \
- uuid-tree.o props.o hash.o
+ uuid-tree.o props.o hash.o tree-checker.o
btrfs-$(CONFIG_BTRFS_FS_POSIX_ACL) += acl.o
btrfs-$(CONFIG_BTRFS_FS_CHECK_INTEGRITY) += check-integrity.o
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -49,6 +49,7 @@
#include "raid56.h"
#include "sysfs.h"
#include "qgroup.h"
+#include "tree-checker.h"
#ifdef CONFIG_X86
#include <asm/cpufeature.h>
@@ -507,283 +508,6 @@ static int check_tree_block_fsid(struct
return ret;
}
-#define CORRUPT(reason, eb, root, slot) \
- btrfs_crit(root->fs_info, "corrupt %s, %s: block=%llu," \
- " root=%llu, slot=%d", \
- btrfs_header_level(eb) == 0 ? "leaf" : "node",\
- reason, btrfs_header_bytenr(eb), root->objectid, slot)
-
-static int check_extent_data_item(struct btrfs_root *root,
- struct extent_buffer *leaf,
- struct btrfs_key *key, int slot)
-{
- struct btrfs_file_extent_item *fi;
- u32 sectorsize = root->sectorsize;
- u32 item_size = btrfs_item_size_nr(leaf, slot);
-
- if (!IS_ALIGNED(key->offset, sectorsize)) {
- CORRUPT("unaligned key offset for file extent",
- leaf, root, slot);
- return -EUCLEAN;
- }
-
- fi = btrfs_item_ptr(leaf, slot, struct btrfs_file_extent_item);
-
- if (btrfs_file_extent_type(leaf, fi) > BTRFS_FILE_EXTENT_TYPES) {
- CORRUPT("invalid file extent type", leaf, root, slot);
- return -EUCLEAN;
- }
-
- /*
- * Support for new compression/encrption must introduce incompat flag,
- * and must be caught in open_ctree().
- */
- if (btrfs_file_extent_compression(leaf, fi) > BTRFS_COMPRESS_TYPES) {
- CORRUPT("invalid file extent compression", leaf, root, slot);
- return -EUCLEAN;
- }
- if (btrfs_file_extent_encryption(leaf, fi)) {
- CORRUPT("invalid file extent encryption", leaf, root, slot);
- return -EUCLEAN;
- }
- if (btrfs_file_extent_type(leaf, fi) == BTRFS_FILE_EXTENT_INLINE) {
- /* Inline extent must have 0 as key offset */
- if (key->offset) {
- CORRUPT("inline extent has non-zero key offset",
- leaf, root, slot);
- return -EUCLEAN;
- }
-
- /* Compressed inline extent has no on-disk size, skip it */
- if (btrfs_file_extent_compression(leaf, fi) !=
- BTRFS_COMPRESS_NONE)
- return 0;
-
- /* Uncompressed inline extent size must match item size */
- if (item_size != BTRFS_FILE_EXTENT_INLINE_DATA_START +
- btrfs_file_extent_ram_bytes(leaf, fi)) {
- CORRUPT("plaintext inline extent has invalid size",
- leaf, root, slot);
- return -EUCLEAN;
- }
- return 0;
- }
-
- /* Regular or preallocated extent has fixed item size */
- if (item_size != sizeof(*fi)) {
- CORRUPT(
- "regluar or preallocated extent data item size is invalid",
- leaf, root, slot);
- return -EUCLEAN;
- }
- if (!IS_ALIGNED(btrfs_file_extent_ram_bytes(leaf, fi), sectorsize) ||
- !IS_ALIGNED(btrfs_file_extent_disk_bytenr(leaf, fi), sectorsize) ||
- !IS_ALIGNED(btrfs_file_extent_disk_num_bytes(leaf, fi), sectorsize) ||
- !IS_ALIGNED(btrfs_file_extent_offset(leaf, fi), sectorsize) ||
- !IS_ALIGNED(btrfs_file_extent_num_bytes(leaf, fi), sectorsize)) {
- CORRUPT(
- "regular or preallocated extent data item has unaligned value",
- leaf, root, slot);
- return -EUCLEAN;
- }
-
- return 0;
-}
-
-static int check_csum_item(struct btrfs_root *root, struct extent_buffer *leaf,
- struct btrfs_key *key, int slot)
-{
- u32 sectorsize = root->sectorsize;
- u32 csumsize = btrfs_super_csum_size(root->fs_info->super_copy);
-
- if (key->objectid != BTRFS_EXTENT_CSUM_OBJECTID) {
- CORRUPT("invalid objectid for csum item", leaf, root, slot);
- return -EUCLEAN;
- }
- if (!IS_ALIGNED(key->offset, sectorsize)) {
- CORRUPT("unaligned key offset for csum item", leaf, root, slot);
- return -EUCLEAN;
- }
- if (!IS_ALIGNED(btrfs_item_size_nr(leaf, slot), csumsize)) {
- CORRUPT("unaligned csum item size", leaf, root, slot);
- return -EUCLEAN;
- }
- return 0;
-}
-
-/*
- * Common point to switch the item-specific validation.
- */
-static int check_leaf_item(struct btrfs_root *root,
- struct extent_buffer *leaf,
- struct btrfs_key *key, int slot)
-{
- int ret = 0;
-
- switch (key->type) {
- case BTRFS_EXTENT_DATA_KEY:
- ret = check_extent_data_item(root, leaf, key, slot);
- break;
- case BTRFS_EXTENT_CSUM_KEY:
- ret = check_csum_item(root, leaf, key, slot);
- break;
- }
- return ret;
-}
-
-static noinline int check_leaf(struct btrfs_root *root,
- struct extent_buffer *leaf)
-{
- /* No valid key type is 0, so all key should be larger than this key */
- struct btrfs_key prev_key = {0, 0, 0};
- struct btrfs_key key;
- u32 nritems = btrfs_header_nritems(leaf);
- int slot;
-
- /*
- * Extent buffers from a relocation tree have a owner field that
- * corresponds to the subvolume tree they are based on. So just from an
- * extent buffer alone we can not find out what is the id of the
- * corresponding subvolume tree, so we can not figure out if the extent
- * buffer corresponds to the root of the relocation tree or not. So skip
- * this check for relocation trees.
- */
- if (nritems == 0 && !btrfs_header_flag(leaf, BTRFS_HEADER_FLAG_RELOC)) {
- struct btrfs_root *check_root;
-
- key.objectid = btrfs_header_owner(leaf);
- key.type = BTRFS_ROOT_ITEM_KEY;
- key.offset = (u64)-1;
-
- check_root = btrfs_get_fs_root(root->fs_info, &key, false);
- /*
- * The only reason we also check NULL here is that during
- * open_ctree() some roots has not yet been set up.
- */
- if (!IS_ERR_OR_NULL(check_root)) {
- struct extent_buffer *eb;
-
- eb = btrfs_root_node(check_root);
- /* if leaf is the root, then it's fine */
- if (leaf != eb) {
- CORRUPT("non-root leaf's nritems is 0",
- leaf, check_root, 0);
- free_extent_buffer(eb);
- return -EUCLEAN;
- }
- free_extent_buffer(eb);
- }
- return 0;
- }
-
- if (nritems == 0)
- return 0;
-
- /*
- * Check the following things to make sure this is a good leaf, and
- * leaf users won't need to bother with similar sanity checks:
- *
- * 1) key order
- * 2) item offset and size
- * No overlap, no hole, all inside the leaf.
- * 3) item content
- * If possible, do comprehensive sanity check.
- * NOTE: All checks must only rely on the item data itself.
- */
- for (slot = 0; slot < nritems; slot++) {
- u32 item_end_expected;
- int ret;
-
- btrfs_item_key_to_cpu(leaf, &key, slot);
-
- /* Make sure the keys are in the right order */
- if (btrfs_comp_cpu_keys(&prev_key, &key) >= 0) {
- CORRUPT("bad key order", leaf, root, slot);
- return -EUCLEAN;
- }
-
- /*
- * Make sure the offset and ends are right, remember that the
- * item data starts at the end of the leaf and grows towards the
- * front.
- */
- if (slot == 0)
- item_end_expected = BTRFS_LEAF_DATA_SIZE(root);
- else
- item_end_expected = btrfs_item_offset_nr(leaf,
- slot - 1);
- if (btrfs_item_end_nr(leaf, slot) != item_end_expected) {
- CORRUPT("slot offset bad", leaf, root, slot);
- return -EUCLEAN;
- }
-
- /*
- * Check to make sure that we don't point outside of the leaf,
- * just incase all the items are consistent to eachother, but
- * all point outside of the leaf.
- */
- if (btrfs_item_end_nr(leaf, slot) >
- BTRFS_LEAF_DATA_SIZE(root)) {
- CORRUPT("slot end outside of leaf", leaf, root, slot);
- return -EUCLEAN;
- }
-
- /* Also check if the item pointer overlaps with btrfs item. */
- if (btrfs_item_nr_offset(slot) + sizeof(struct btrfs_item) >
- btrfs_item_ptr_offset(leaf, slot)) {
- CORRUPT("slot overlap with its data", leaf, root, slot);
- return -EUCLEAN;
- }
-
- /* Check if the item size and content meet other criteria */
- ret = check_leaf_item(root, leaf, &key, slot);
- if (ret < 0)
- return ret;
-
- prev_key.objectid = key.objectid;
- prev_key.type = key.type;
- prev_key.offset = key.offset;
- }
-
- return 0;
-}
-
-static int check_node(struct btrfs_root *root, struct extent_buffer *node)
-{
- unsigned long nr = btrfs_header_nritems(node);
- struct btrfs_key key, next_key;
- int slot;
- u64 bytenr;
- int ret = 0;
-
- if (nr == 0 || nr > BTRFS_NODEPTRS_PER_BLOCK(root)) {
- btrfs_crit(root->fs_info,
- "corrupt node: block %llu root %llu nritems %lu",
- node->start, root->objectid, nr);
- return -EIO;
- }
-
- for (slot = 0; slot < nr - 1; slot++) {
- bytenr = btrfs_node_blockptr(node, slot);
- btrfs_node_key_to_cpu(node, &key, slot);
- btrfs_node_key_to_cpu(node, &next_key, slot + 1);
-
- if (!bytenr) {
- CORRUPT("invalid item slot", node, root, slot);
- ret = -EIO;
- goto out;
- }
-
- if (btrfs_comp_cpu_keys(&key, &next_key) >= 0) {
- CORRUPT("bad key order", node, root, slot);
- ret = -EIO;
- goto out;
- }
- }
-out:
- return ret;
-}
-
static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
u64 phy_offset, struct page *page,
u64 start, u64 end, int mirror)
@@ -851,12 +575,12 @@ static int btree_readpage_end_io_hook(st
* that we don't try and read the other copies of this block, just
* return -EIO.
*/
- if (found_level == 0 && check_leaf(root, eb)) {
+ if (found_level == 0 && btrfs_check_leaf(root, eb)) {
set_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags);
ret = -EIO;
}
- if (found_level > 0 && check_node(root, eb))
+ if (found_level > 0 && btrfs_check_node(root, eb))
ret = -EIO;
if (!ret)
@@ -3978,7 +3702,7 @@ void btrfs_mark_buffer_dirty(struct exte
buf->len,
root->fs_info->dirty_metadata_batch);
#ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY
- if (btrfs_header_level(buf) == 0 && check_leaf(root, buf)) {
+ if (btrfs_header_level(buf) == 0 && btrfs_check_leaf(root, buf)) {
btrfs_print_leaf(root, buf);
ASSERT(0);
}
--- /dev/null
+++ b/fs/btrfs/tree-checker.c
@@ -0,0 +1,309 @@
+/*
+ * Copyright (C) Qu Wenruo 2017. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License v2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program.
+ */
+
+/*
+ * The module is used to catch unexpected/corrupted tree block data.
+ * Such behavior can be caused either by a fuzzed image or bugs.
+ *
+ * The objective is to do leaf/node validation checks when tree block is read
+ * from disk, and check *every* possible member, so other code won't
+ * need to checking them again.
+ *
+ * Due to the potential and unwanted damage, every checker needs to be
+ * carefully reviewed otherwise so it does not prevent mount of valid images.
+ */
+
+#include "ctree.h"
+#include "tree-checker.h"
+#include "disk-io.h"
+#include "compression.h"
+
+#define CORRUPT(reason, eb, root, slot) \
+ btrfs_crit(root->fs_info, \
+ "corrupt %s, %s: block=%llu, root=%llu, slot=%d", \
+ btrfs_header_level(eb) == 0 ? "leaf" : "node", \
+ reason, btrfs_header_bytenr(eb), root->objectid, slot)
+
+static int check_extent_data_item(struct btrfs_root *root,
+ struct extent_buffer *leaf,
+ struct btrfs_key *key, int slot)
+{
+ struct btrfs_file_extent_item *fi;
+ u32 sectorsize = root->sectorsize;
+ u32 item_size = btrfs_item_size_nr(leaf, slot);
+
+ if (!IS_ALIGNED(key->offset, sectorsize)) {
+ CORRUPT("unaligned key offset for file extent",
+ leaf, root, slot);
+ return -EUCLEAN;
+ }
+
+ fi = btrfs_item_ptr(leaf, slot, struct btrfs_file_extent_item);
+
+ if (btrfs_file_extent_type(leaf, fi) > BTRFS_FILE_EXTENT_TYPES) {
+ CORRUPT("invalid file extent type", leaf, root, slot);
+ return -EUCLEAN;
+ }
+
+ /*
+ * Support for new compression/encrption must introduce incompat flag,
+ * and must be caught in open_ctree().
+ */
+ if (btrfs_file_extent_compression(leaf, fi) > BTRFS_COMPRESS_TYPES) {
+ CORRUPT("invalid file extent compression", leaf, root, slot);
+ return -EUCLEAN;
+ }
+ if (btrfs_file_extent_encryption(leaf, fi)) {
+ CORRUPT("invalid file extent encryption", leaf, root, slot);
+ return -EUCLEAN;
+ }
+ if (btrfs_file_extent_type(leaf, fi) == BTRFS_FILE_EXTENT_INLINE) {
+ /* Inline extent must have 0 as key offset */
+ if (key->offset) {
+ CORRUPT("inline extent has non-zero key offset",
+ leaf, root, slot);
+ return -EUCLEAN;
+ }
+
+ /* Compressed inline extent has no on-disk size, skip it */
+ if (btrfs_file_extent_compression(leaf, fi) !=
+ BTRFS_COMPRESS_NONE)
+ return 0;
+
+ /* Uncompressed inline extent size must match item size */
+ if (item_size != BTRFS_FILE_EXTENT_INLINE_DATA_START +
+ btrfs_file_extent_ram_bytes(leaf, fi)) {
+ CORRUPT("plaintext inline extent has invalid size",
+ leaf, root, slot);
+ return -EUCLEAN;
+ }
+ return 0;
+ }
+
+ /* Regular or preallocated extent has fixed item size */
+ if (item_size != sizeof(*fi)) {
+ CORRUPT(
+ "regluar or preallocated extent data item size is invalid",
+ leaf, root, slot);
+ return -EUCLEAN;
+ }
+ if (!IS_ALIGNED(btrfs_file_extent_ram_bytes(leaf, fi), sectorsize) ||
+ !IS_ALIGNED(btrfs_file_extent_disk_bytenr(leaf, fi), sectorsize) ||
+ !IS_ALIGNED(btrfs_file_extent_disk_num_bytes(leaf, fi), sectorsize) ||
+ !IS_ALIGNED(btrfs_file_extent_offset(leaf, fi), sectorsize) ||
+ !IS_ALIGNED(btrfs_file_extent_num_bytes(leaf, fi), sectorsize)) {
+ CORRUPT(
+ "regular or preallocated extent data item has unaligned value",
+ leaf, root, slot);
+ return -EUCLEAN;
+ }
+
+ return 0;
+}
+
+static int check_csum_item(struct btrfs_root *root, struct extent_buffer *leaf,
+ struct btrfs_key *key, int slot)
+{
+ u32 sectorsize = root->sectorsize;
+ u32 csumsize = btrfs_super_csum_size(root->fs_info->super_copy);
+
+ if (key->objectid != BTRFS_EXTENT_CSUM_OBJECTID) {
+ CORRUPT("invalid objectid for csum item", leaf, root, slot);
+ return -EUCLEAN;
+ }
+ if (!IS_ALIGNED(key->offset, sectorsize)) {
+ CORRUPT("unaligned key offset for csum item", leaf, root, slot);
+ return -EUCLEAN;
+ }
+ if (!IS_ALIGNED(btrfs_item_size_nr(leaf, slot), csumsize)) {
+ CORRUPT("unaligned csum item size", leaf, root, slot);
+ return -EUCLEAN;
+ }
+ return 0;
+}
+
+/*
+ * Common point to switch the item-specific validation.
+ */
+static int check_leaf_item(struct btrfs_root *root,
+ struct extent_buffer *leaf,
+ struct btrfs_key *key, int slot)
+{
+ int ret = 0;
+
+ switch (key->type) {
+ case BTRFS_EXTENT_DATA_KEY:
+ ret = check_extent_data_item(root, leaf, key, slot);
+ break;
+ case BTRFS_EXTENT_CSUM_KEY:
+ ret = check_csum_item(root, leaf, key, slot);
+ break;
+ }
+ return ret;
+}
+
+int btrfs_check_leaf(struct btrfs_root *root, struct extent_buffer *leaf)
+{
+ struct btrfs_fs_info *fs_info = root->fs_info;
+ /* No valid key type is 0, so all key should be larger than this key */
+ struct btrfs_key prev_key = {0, 0, 0};
+ struct btrfs_key key;
+ u32 nritems = btrfs_header_nritems(leaf);
+ int slot;
+
+ /*
+ * Extent buffers from a relocation tree have a owner field that
+ * corresponds to the subvolume tree they are based on. So just from an
+ * extent buffer alone we can not find out what is the id of the
+ * corresponding subvolume tree, so we can not figure out if the extent
+ * buffer corresponds to the root of the relocation tree or not. So
+ * skip this check for relocation trees.
+ */
+ if (nritems == 0 && !btrfs_header_flag(leaf, BTRFS_HEADER_FLAG_RELOC)) {
+ struct btrfs_root *check_root;
+
+ key.objectid = btrfs_header_owner(leaf);
+ key.type = BTRFS_ROOT_ITEM_KEY;
+ key.offset = (u64)-1;
+
+ check_root = btrfs_get_fs_root(fs_info, &key, false);
+ /*
+ * The only reason we also check NULL here is that during
+ * open_ctree() some roots has not yet been set up.
+ */
+ if (!IS_ERR_OR_NULL(check_root)) {
+ struct extent_buffer *eb;
+
+ eb = btrfs_root_node(check_root);
+ /* if leaf is the root, then it's fine */
+ if (leaf != eb) {
+ CORRUPT("non-root leaf's nritems is 0",
+ leaf, check_root, 0);
+ free_extent_buffer(eb);
+ return -EUCLEAN;
+ }
+ free_extent_buffer(eb);
+ }
+ return 0;
+ }
+
+ if (nritems == 0)
+ return 0;
+
+ /*
+ * Check the following things to make sure this is a good leaf, and
+ * leaf users won't need to bother with similar sanity checks:
+ *
+ * 1) key ordering
+ * 2) item offset and size
+ * No overlap, no hole, all inside the leaf.
+ * 3) item content
+ * If possible, do comprehensive sanity check.
+ * NOTE: All checks must only rely on the item data itself.
+ */
+ for (slot = 0; slot < nritems; slot++) {
+ u32 item_end_expected;
+ int ret;
+
+ btrfs_item_key_to_cpu(leaf, &key, slot);
+
+ /* Make sure the keys are in the right order */
+ if (btrfs_comp_cpu_keys(&prev_key, &key) >= 0) {
+ CORRUPT("bad key order", leaf, root, slot);
+ return -EUCLEAN;
+ }
+
+ /*
+ * Make sure the offset and ends are right, remember that the
+ * item data starts at the end of the leaf and grows towards the
+ * front.
+ */
+ if (slot == 0)
+ item_end_expected = BTRFS_LEAF_DATA_SIZE(root);
+ else
+ item_end_expected = btrfs_item_offset_nr(leaf,
+ slot - 1);
+ if (btrfs_item_end_nr(leaf, slot) != item_end_expected) {
+ CORRUPT("slot offset bad", leaf, root, slot);
+ return -EUCLEAN;
+ }
+
+ /*
+ * Check to make sure that we don't point outside of the leaf,
+ * just in case all the items are consistent to each other, but
+ * all point outside of the leaf.
+ */
+ if (btrfs_item_end_nr(leaf, slot) >
+ BTRFS_LEAF_DATA_SIZE(root)) {
+ CORRUPT("slot end outside of leaf", leaf, root, slot);
+ return -EUCLEAN;
+ }
+
+ /* Also check if the item pointer overlaps with btrfs item. */
+ if (btrfs_item_nr_offset(slot) + sizeof(struct btrfs_item) >
+ btrfs_item_ptr_offset(leaf, slot)) {
+ CORRUPT("slot overlap with its data", leaf, root, slot);
+ return -EUCLEAN;
+ }
+
+ /* Check if the item size and content meet other criteria */
+ ret = check_leaf_item(root, leaf, &key, slot);
+ if (ret < 0)
+ return ret;
+
+ prev_key.objectid = key.objectid;
+ prev_key.type = key.type;
+ prev_key.offset = key.offset;
+ }
+
+ return 0;
+}
+
+int btrfs_check_node(struct btrfs_root *root, struct extent_buffer *node)
+{
+ unsigned long nr = btrfs_header_nritems(node);
+ struct btrfs_key key, next_key;
+ int slot;
+ u64 bytenr;
+ int ret = 0;
+
+ if (nr == 0 || nr > BTRFS_NODEPTRS_PER_BLOCK(root)) {
+ btrfs_crit(root->fs_info,
+ "corrupt node: block %llu root %llu nritems %lu",
+ node->start, root->objectid, nr);
+ return -EIO;
+ }
+
+ for (slot = 0; slot < nr - 1; slot++) {
+ bytenr = btrfs_node_blockptr(node, slot);
+ btrfs_node_key_to_cpu(node, &key, slot);
+ btrfs_node_key_to_cpu(node, &next_key, slot + 1);
+
+ if (!bytenr) {
+ CORRUPT("invalid item slot", node, root, slot);
+ ret = -EIO;
+ goto out;
+ }
+
+ if (btrfs_comp_cpu_keys(&key, &next_key) >= 0) {
+ CORRUPT("bad key order", node, root, slot);
+ ret = -EIO;
+ goto out;
+ }
+ }
+out:
+ return ret;
+}
--- /dev/null
+++ b/fs/btrfs/tree-checker.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) Qu Wenruo 2017. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License v2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program.
+ */
+
+#ifndef __BTRFS_TREE_CHECKER__
+#define __BTRFS_TREE_CHECKER__
+
+#include "ctree.h"
+#include "extent_io.h"
+
+int btrfs_check_leaf(struct btrfs_root *root, struct extent_buffer *leaf);
+int btrfs_check_node(struct btrfs_root *root, struct extent_buffer *node);
+
+#endif
next prev parent reply other threads:[~2020-04-23 23:23 UTC|newest]
Thread overview: 260+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-23 23:03 [PATCH 3.16 000/245] 3.16.83-rc1 review Ben Hutchings
2020-04-23 23:03 ` [PATCH 3.16 001/245] mwifiex: fix unbalanced locking in mwifiex_process_country_ie() Ben Hutchings
2020-04-23 23:03 ` [PATCH 3.16 002/245] libertas: Fix two buffer overflows at parsing bss descriptor Ben Hutchings
2020-04-23 23:03 ` [PATCH 3.16 003/245] libertas: don't exit from lbs_ibss_join_existing() with RCU read lock held Ben Hutchings
2020-04-23 23:03 ` [PATCH 3.16 004/245] libertas: make lbs_ibss_join_existing() return error code on rates overflow Ben Hutchings
2020-04-23 23:03 ` [PATCH 3.16 005/245] mwifiex: fix probable memory corruption while processing TDLS frame Ben Hutchings
2020-04-23 23:03 ` [PATCH 3.16 006/245] mwifiex: Fix heap overflow in mmwifiex_process_tdls_action_frame() Ben Hutchings
2020-04-23 23:03 ` [PATCH 3.16 007/245] cfg80211/mac80211: make ieee80211_send_layer2_update a public function Ben Hutchings
2020-04-23 23:03 ` [PATCH 3.16 008/245] mac80211: Do not send Layer 2 Update frame before authorization Ben Hutchings
2020-04-23 23:03 ` [PATCH 3.16 009/245] x86/microcode/AMD: Add support for fam17h microcode loading Ben Hutchings
2020-04-23 23:03 ` [PATCH 3.16 010/245] ext4: wait for existing dio workers in ext4_alloc_file_blocks() Ben Hutchings
2020-04-23 23:03 ` [PATCH 3.16 011/245] ext4: only call ext4_truncate when size <= isize Ben Hutchings
2020-04-23 23:03 ` [PATCH 3.16 012/245] ext4: update c/mtime on truncate up Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 013/245] quota: fix wrong condition in is_quota_modification() Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 014/245] ext4: fix races between page faults and hole punching Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 015/245] ext4: move unlocked dio protection from ext4_alloc_file_blocks() Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 016/245] ext4: fix races between buffered IO and collapse / insert range Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 017/245] ext4: fix races of writeback with punch hole and zero range Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 018/245] Btrfs: fix wrong max inline data size limit Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 019/245] btrfs: new define for the inline extent data start Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 020/245] btrfs: kill extent_buffer_page helper Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 021/245] btrfs: cleanup, rename a few variables in btrfs_read_sys_array Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 022/245] btrfs: add more checks to btrfs_read_sys_array Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 023/245] btrfs: cleanup, stop casting for extent_map->lookup everywhere Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 024/245] btrfs: handle invalid num_stripes in sys_array Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 025/245] btrfs: Enhance chunk validation check Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 026/245] Btrfs: add validadtion checks for chunk loading Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 027/245] Btrfs: check inconsistence between chunk and block group Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 028/245] Btrfs: fix em leak in find_first_block_group Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 029/245] Btrfs: detect corruption when non-root leaf has zero item Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 030/245] Btrfs: check btree node's nritems Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 031/245] Btrfs: fix BUG_ON in btrfs_mark_buffer_dirty Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 032/245] Btrfs: memset to avoid stale content in btree node block Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 033/245] Btrfs: improve check_node to avoid reading corrupted nodes Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 034/245] Btrfs: kill BUG_ON in run_delayed_tree_ref Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 035/245] Btrfs: memset to avoid stale content in btree leaf Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 036/245] Btrfs: fix emptiness check for dirtied extent buffers at check_leaf() Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 037/245] btrfs: struct-funcs, constify readers Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 038/245] btrfs: Refactor check_leaf function for later expansion Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 039/245] btrfs: Check if item pointer overlaps with the item itself Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 040/245] btrfs: Add sanity check for EXTENT_DATA when reading out leaf Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 041/245] btrfs: Add checker for EXTENT_CSUM Ben Hutchings
2020-04-23 23:04 ` Ben Hutchings [this message]
2020-04-23 23:04 ` [PATCH 3.16 043/245] btrfs: tree-checker: Enhance btrfs_check_node output Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 044/245] btrfs: tree-checker: Fix false panic for sanity test Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 045/245] btrfs: tree-checker: Add checker for dir item Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 046/245] btrfs: tree-checker: use %zu format string for size_t Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 047/245] btrfs: tree-check: reduce stack consumption in check_dir_item Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 048/245] btrfs: tree-checker: Verify block_group_item Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 049/245] btrfs: tree-checker: Detect invalid and empty essential trees Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 050/245] btrfs: validate type when reading a chunk Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 051/245] btrfs: Check that each block group has corresponding chunk at mount time Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 052/245] btrfs: Verify that every chunk has corresponding block group " Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 053/245] btrfs: tree-checker: Check level for leaves and nodes Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 054/245] btrfs: tree-checker: Fix misleading group system information Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 055/245] btrfs: ensure that a DUP or RAID1 block group has exactly two stripes Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 056/245] dm: do not override error code returned from dm_get_device() Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 057/245] dm flakey: return -EINVAL on interval bounds error in flakey_ctr() Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 058/245] dm flakey: fix reads to be issued if drop_writes configured Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 059/245] dm flakey: check for null arg_name in parse_features() Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 060/245] x86/pti/efi: broken conversion from efi to kernel page table Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 061/245] batman-adv: Fix DAT candidate selection on little endian systems Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 062/245] netfilter: ctnetlink: netns exit must wait for callbacks Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 063/245] taskstats: fix data-race Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 064/245] dm btree: increase rebalance threshold in __rebalance2() Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 065/245] dm thin metadata: Add support for a pre-commit callback Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 066/245] pinctrl: baytrail: Relax GPIO request rules Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 067/245] pinctrl: baytrail: Clear interrupt triggering from pins that are in GPIO mode Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 068/245] pinctrl: baytrail: Rework interrupt handling Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 069/245] pinctrl: baytrail: Serialize all register access Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 070/245] pinctrl: baytrail: Really serialize all register accesses Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 071/245] netfilter: nf_tables: missing sanitization in data from userspace Ben Hutchings
2020-04-23 23:04 ` [PATCH 3.16 072/245] netfilter: nf_tables: validate NFT_DATA_VALUE after nft_data_init() Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 073/245] netfilter: bridge: make sure to pull arp header in br_nf_forward_arp() Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 074/245] HID: uhid: Fix returning EPOLLOUT from uhid_char_poll Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 075/245] gpio: Fix error message on out-of-range GPIO in lookup table Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 076/245] neighbour: remove neigh_cleanup() method Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 077/245] bonding: fix bond_neigh_init() Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 078/245] af_packet: set defaule value for tmo Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 079/245] ACPI: PM: Avoid attaching ACPI PM domain to certain devices Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 080/245] scsi: iscsi: qla4xxx: fix double free in probe Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 081/245] staging: gigaset: fix general protection fault on probe Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 082/245] staging: gigaset: fix illegal free on probe errors Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 083/245] staging: gigaset: add endpoint-type sanity check Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 084/245] usb: core: urb: fix URB structure initialization function Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 085/245] usb: mon: Fix a deadlock in usbmon between mmap and read Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 086/245] USB: serial: io_edgeport: fix epic endpoint lookup Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 087/245] USB: idmouse: fix interface sanity checks Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 088/245] USB: adutux: fix interface sanity check Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 089/245] USB: atm: ueagle-atm: add missing endpoint check Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 090/245] staging: rtl8188eu: fix interface sanity check Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 091/245] staging: rtl8712: " Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 092/245] gpiolib: fix up emulated open drain outputs Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 093/245] virtio-balloon: fix managed page counts when migrating pages between zones Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 094/245] HID: Fix slab-out-of-bounds read in hid_field_extract Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 095/245] xhci: handle some XHCI_TRUST_TX_LENGTH quirks cases as default behaviour Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 096/245] xhci: make sure interrupts are restored to correct state Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 097/245] usb: dwc3: pci: Add PCI ID for Intel Braswell Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 098/245] usb: dwc3: pci: add support for Intel Sunrise Point PCH Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 099/245] usb: dwc3: pci: add support for Intel Broxton SOC Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 100/245] usb: dwc3: pci: add ID for one more Intel Broxton platform Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 101/245] usb: dwc3: pci: add Intel Kabylake PCI ID Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 102/245] usb: dwc3: pci: add Intel Gemini Lake " Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 103/245] usb: dwc3: pci: add Intel Cannonlake PCI IDs Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 104/245] usb: dwc3: pci: add support for Intel IceLake Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 105/245] usb: dwc3: pci: add support for Comet Lake PCH ID Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 106/245] usb: dwc3: pci: Add Support for Intel Elkhart Lake Devices Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 107/245] usb: dwc3: pci: add support for TigerLake Devices Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 108/245] usb: dwc3: pci: add ID for the Intel Comet Lake -H variant Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 109/245] tty: serial: msm_serial: Fix lockup for sysrq and oops Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 110/245] IB/mlx4: Avoid executing gid task when device is being removed Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 111/245] IB/mlx4: Follow mirror sequence of device add during device removal Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 112/245] HID: hid-input: clear unmapped usages Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 113/245] btrfs: do not call synchronize_srcu() in inode_tree_del Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 114/245] Btrfs: fix removal logic of the tree mod log that leads to use-after-free issues Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 115/245] btrfs: abort transaction after failed inode updates in create_subvol Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 116/245] btrfs: handle ENOENT in btrfs_uuid_tree_iterate Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 117/245] btrfs: skip log replay on orphaned roots Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 118/245] btrfs: do not leak reloc root if we fail to read the fs root Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 119/245] Btrfs: fix infinite loop during nocow writeback due to race Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 120/245] btrfs: Remove redundant btrfs_release_path from btrfs_unlink_subvol Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 121/245] btrfs: do not delete mismatched root refs Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 122/245] btrfs: check rw_devices, not num_devices for balance Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 123/245] ext4: check for directory entries too close to block end Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 124/245] powerpc/irq: fix stack overflow verification Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 125/245] 6pack,mkiss: fix possible deadlock Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 126/245] tcp: do not send empty skb from tcp_write_xmit() Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 127/245] ALSA: pcm: Avoid possible info leaks from PCM stream buffers Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 128/245] ALSA: hda/ca0132 - Avoid endless loop Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 129/245] ASoC: wm8962: fix lambda value Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 130/245] tty: link tty and port before configuring it as console Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 131/245] USB: EHCI: Do not return -EPIPE when hub is disconnected Ben Hutchings
2020-04-23 23:05 ` [PATCH 3.16 132/245] usbip: Fix error path of vhci_recv_ret_submit() Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 133/245] kvm: x86: Host feature SSBD doesn't imply guest feature SPEC_CTRL_SSBD Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 134/245] net: stmmac: 16KB buffer must be 16 byte aligned Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 135/245] net: stmmac: Enable 16KB buffer size Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 136/245] netfilter: ebtables: convert BUG_ONs to WARN_ONs Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 137/245] netfilter: ebtables: compat: reject all padding in matches/watchers Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 138/245] platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 139/245] mod_devicetable: fix PHY module format Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 140/245] x86/efistub: Disable paging at mixed mode entry Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 141/245] ALSA: ice1724: Fix sleep-in-atomic in Infrasonic Quartet support code Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 142/245] locks: print unsigned ino in /proc/locks Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 143/245] netfilter: arp_tables: init netns pointer in xt_tgchk_param struct Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 144/245] tty: always relink the port Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 145/245] USB: core: fix check for duplicate endpoints Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 146/245] USB: core: add endpoint-blacklist quirk Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 147/245] USB: quirks: blacklist duplicate ep on Sound Devices USBPre2 Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 148/245] usb: musb: dma: Correct parameter passed to IRQ handler Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 149/245] can: gs_usb: gs_usb_probe(): use descriptors of current altsetting Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 150/245] can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 151/245] tcp: fix "old stuff" D-SACK causing SACK to be treated as D-SACK Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 152/245] vxlan: fix tos value before xmit Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 153/245] tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 154/245] ftrace: Avoid potential division by zero in function profiler Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 155/245] staging: rtl8188eu: Add device code for TP-Link TL-WN727N v5.21 Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 156/245] kernel/trace: Fix do not unregister tracepoints when register sched_migrate_task fail Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 157/245] kobject: Export kobject_get_unless_zero() Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 158/245] chardev: Avoid potential use-after-free in 'chrdev_open()' Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 159/245] sctp: free cmd->obj.chunk for the unprocessed SCTP_CMD_REPLY Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 160/245] vlan: vlan_changelink() should propagate errors Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 161/245] net: stmmac: dwmac-sunxi: Allow all RGMII modes Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 162/245] pkt_sched: fq: avoid hang when quantum 0 Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 163/245] pkt_sched: fq: do not accept silly TCA_FQ_QUANTUM Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 164/245] macvlan: do not assume mac_header is set in macvlan_broadcast() Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 165/245] netfilter: ipset: avoid null deref when IPSET_ATTR_LINENO is present Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 166/245] ixgbevf: Remove limit of 10 entries for unicast filter list Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 167/245] scsi: sd: Clear sdkp->protection_type if disk is reformatted without PI Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 168/245] scsi: enclosure: Fix stale device oops with hot replug Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 169/245] hidraw: Return EPOLLOUT from hidraw_poll Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 170/245] HID: hidraw: Fix returning " Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 171/245] HID: hidraw, uhid: Always report EPOLLOUT Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 172/245] Input: aiptek - fix endpoint sanity check Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 173/245] Input: gtco " Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 174/245] Input: sur40 - fix interface sanity checks Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 175/245] platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0 Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 176/245] iio: buffer: align the size of scan bytes to size of the largest element Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 177/245] USB: serial: simple: Add Motorola Solutions TETRA MTP3xxx and MTP85xx Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 178/245] netfilter: fix a use-after-free in mtype_destroy() Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 179/245] netfilter: arp_tables: init netns pointer in xt_tgdtor_param struct Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 180/245] ALSA: usb-audio: add implicit fb quirk for Axe-Fx II Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 181/245] ALSA: usb-audio: simplify set_sync_ep_implicit_fb_quirk Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 182/245] ALSA: usb-audio: fix sync-ep altsetting sanity check Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 183/245] USB: serial: opticon: fix control-message timeouts Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 184/245] r8152: add missing endpoint sanity check Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 185/245] usb: core: hub: Improved device recognition on remote wakeup Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 186/245] Fix built-in early-load Intel microcode alignment Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 187/245] ALSA: seq: Fix racy access for queue timer in proc read Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 188/245] scsi: fnic: fix invalid stack access Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 189/245] block: fix an integer overflow in logical block size Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 190/245] macvlan: use skb_reset_mac_header() in macvlan_queue_xmit() Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 191/245] Input: keyspan-remote - fix control-message timeouts Ben Hutchings
2020-04-23 23:06 ` [PATCH 3.16 192/245] USB: serial: suppress driver bind attributes Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 193/245] USB: serial: ch341: handle unbound port at reset_resume Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 194/245] USB: serial: io_edgeport: handle unbound ports on URB completion Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 195/245] USB: serial: io_edgeport: add missing active-port sanity check Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 196/245] USB: serial: keyspan: handle unbound ports Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 197/245] USB: serial: quatech2: " Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 198/245] hwmon: (adt7475) Make volt2reg return same reg as reg2volt input Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 199/245] ARM: 8950/1: ftrace/recordmcount: filter relocation types Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 200/245] mmc: sdhci: fix minimum clock rate for v3 controller Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 201/245] can, slip: Protect tty->disc_data in write_wakeup and close with RCU Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 202/245] net: sonic: return NETDEV_TX_OK if failed to map buffer Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 203/245] net/sonic: Add mutual exclusion for accessing shared state Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 204/245] net/sonic: Use MMIO accessors Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 205/245] net/sonic: Fix receive buffer handling Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 206/245] net/sonic: Quiesce SONIC before re-initializing descriptor memory Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 207/245] net_sched: fix datalen for ematch Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 208/245] namei: allow restricted O_CREAT of FIFOs and regular files Ben Hutchings
2020-04-24 13:52 ` Solar Designer
2020-04-24 15:13 ` Ben Hutchings
2020-04-24 17:38 ` Solar Designer
2020-04-23 23:07 ` [PATCH 3.16 209/245] do_last(): fetch directory ->i_mode and ->i_uid before it's too late Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 210/245] vfs: fix do_last() regression Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 211/245] blktrace: re-write setting q->blk_trace Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 212/245] blktrace: Protect q->blk_trace with RCU Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 213/245] blktrace: fix dereference after null check Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 214/245] Input: add safety guards to input_set_keycode() Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 215/245] staging: android: ashmem: Disallow ashmem memory from being remapped Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 216/245] net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 217/245] KVM: nVMX: Don't emulate instructions in guest mode Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 218/245] vgacon: Fix a UAF in vgacon_invert_region Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 219/245] tty: vt: Fix !TASK_RUNNING diagnostic warning from paste_selection() Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 220/245] vt: selection, handle pending signals in paste_selection Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 221/245] vt: selection, close sel_buffer race Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 222/245] vt: selection, push console lock down Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 223/245] vt: selection, push sel_lock up Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 224/245] floppy: check FDC index for errors before assigning it Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 225/245] vhost: Check docket sk_family instead of call getname Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 226/245] mm: mempolicy: require at least one nodeid for MPOL_PREFERRED Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 227/245] media: ov519: add missing endpoint sanity checks Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 228/245] media: stv06xx: add missing descriptor " Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 229/245] media: xirlink_cit: " Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 230/245] ptp: do not explicitly set drvdata in ptp_clock_register() Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 231/245] ptp: use is_visible method to hide unused attributes Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 232/245] ptp: create "pins" together with the rest of attributes Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 233/245] chardev: add helper function to register char devs with a struct device Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 234/245] ptp: Fix pass zero to ERR_PTR() in ptp_clock_register Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 235/245] ptp: fix the race between the release of ptp_clock and cdev Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 236/245] ptp: free ptp device pin descriptors properly Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 237/245] [media] media-devnode: just return 0 instead of using a var Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 238/245] [media] media: Fix media_open() to clear filp->private_data in error leg Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 239/245] [media] drivers/media/media-devnode: clear private_data before put_device() Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 240/245] [media] media-devnode: add missing mutex lock in error handler Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 241/245] [media] media-devnode: fix namespace mess Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 242/245] [media] media-device: dynamically allocate struct media_devnode Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 243/245] [media] media: fix use-after-free in cdev_put() when app exits after driver unbind Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 244/245] [media] media: fix media devnode ioctl/syscall and unregister race Ben Hutchings
2020-04-23 23:07 ` [PATCH 3.16 245/245] slcan: Don't transmit uninitialized stack data in padding Ben Hutchings
2020-04-23 23:59 ` [PATCH 3.16 000/245] 3.16.83-rc1 review Jann Horn
2020-04-24 13:43 ` Ben Hutchings
2020-04-24 14:49 ` Guenter Roeck
2020-04-24 15:13 ` Ben Hutchings
2020-04-24 15:47 ` [PATCH 3.16 000/247] 3.16.83-rc2 review Ben Hutchings
2020-04-24 15:51 ` [PATCH 3.16 246/247] futex: Fix inode life-time issue Ben Hutchings
2020-04-24 15:56 ` Peter Zijlstra
2020-04-24 16:31 ` Ben Hutchings
2020-04-24 15:51 ` [PATCH 3.16 247/247] futex: Unbreak futex hashing Ben Hutchings
2020-04-24 17:48 ` [PATCH 3.16 000/247] 3.16.83-rc2 review Guenter Roeck
2020-04-24 17:54 ` Ben Hutchings
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=lsq.1587683028.131416704@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=akpm@linux-foundation.org \
--cc=ben.hutchings@codethink.co.uk \
--cc=dsterba@suse.com \
--cc=gregkh@linuxfoundation.org \
--cc=kda@linux-powerpc.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).