From 9c1458ec2008f54cb7d5c380e5c6e5466e1b1c53 Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 3 Nov 2004 17:05:41 +0000 Subject: [PATCH] Branch: b1_4 Fix trivial bug in ext3_xattr_unregister() bounds checking (could only be hit from within the kernel). r=sct --- lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54-chaos.patch | 2 +- lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54-hp.patch | 2 +- lustre/kernel_patches/patches/linux-2.4.21-xattr-0.8.54-chaos.patch | 2 +- lustre/kernel_patches/patches/linux-2.4.21-xattr-0.8.54-suse.patch | 2 +- lustre/kernel_patches/patches/linux-2.4.24-xattr-0.8.54.patch | 2 +- lustre/kernel_patches/patches/xattr-0.8.54-2.4.22-rh.patch | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54-chaos.patch b/lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54-chaos.patch index 5bdfaff..cbf51ea 100644 --- a/lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54-chaos.patch +++ b/lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54-chaos.patch @@ -1171,7 +1171,7 @@ +void +ext2_xattr_unregister(int name_index, struct ext2_xattr_handler *handler) +{ -+ if (name_index > 0 || name_index <= EXT2_XATTR_INDEX_MAX) { ++ if (name_index > 0 && name_index <= EXT2_XATTR_INDEX_MAX) { + write_lock(&ext2_handler_lock); + ext2_xattr_handlers[name_index-1] = NULL; + write_unlock(&ext2_handler_lock); diff --git a/lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54-hp.patch b/lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54-hp.patch index f1365d7..3c156e8 100644 --- a/lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54-hp.patch +++ b/lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54-hp.patch @@ -679,7 +679,7 @@ +void +ext2_xattr_unregister(int name_index, struct ext2_xattr_handler *handler) +{ -+ if (name_index > 0 || name_index <= EXT2_XATTR_INDEX_MAX) { ++ if (name_index > 0 && name_index <= EXT2_XATTR_INDEX_MAX) { + write_lock(&ext2_handler_lock); + ext2_xattr_handlers[name_index-1] = NULL; + write_unlock(&ext2_handler_lock); diff --git a/lustre/kernel_patches/patches/linux-2.4.21-xattr-0.8.54-chaos.patch b/lustre/kernel_patches/patches/linux-2.4.21-xattr-0.8.54-chaos.patch index 8e198f8..196ae17 100644 --- a/lustre/kernel_patches/patches/linux-2.4.21-xattr-0.8.54-chaos.patch +++ b/lustre/kernel_patches/patches/linux-2.4.21-xattr-0.8.54-chaos.patch @@ -700,7 +700,7 @@ Index: linux-2.4.21-chaos/fs/ext2/xattr.c +void +ext2_xattr_unregister(int name_index, struct ext2_xattr_handler *handler) +{ -+ if (name_index > 0 || name_index <= EXT2_XATTR_INDEX_MAX) { ++ if (name_index > 0 && name_index <= EXT2_XATTR_INDEX_MAX) { + write_lock(&ext2_handler_lock); + ext2_xattr_handlers[name_index-1] = NULL; + write_unlock(&ext2_handler_lock); diff --git a/lustre/kernel_patches/patches/linux-2.4.21-xattr-0.8.54-suse.patch b/lustre/kernel_patches/patches/linux-2.4.21-xattr-0.8.54-suse.patch index da8c15c..9208772 100644 --- a/lustre/kernel_patches/patches/linux-2.4.21-xattr-0.8.54-suse.patch +++ b/lustre/kernel_patches/patches/linux-2.4.21-xattr-0.8.54-suse.patch @@ -1068,7 +1068,7 @@ +void +ext2_xattr_unregister(int name_index, struct ext2_xattr_handler *handler) +{ -+ if (name_index > 0 || name_index <= EXT2_XATTR_INDEX_MAX) { ++ if (name_index > 0 && name_index <= EXT2_XATTR_INDEX_MAX) { + write_lock(&ext2_handler_lock); + ext2_xattr_handlers[name_index-1] = NULL; + write_unlock(&ext2_handler_lock); diff --git a/lustre/kernel_patches/patches/linux-2.4.24-xattr-0.8.54.patch b/lustre/kernel_patches/patches/linux-2.4.24-xattr-0.8.54.patch index 4cf5c2c..5bd7ac4 100644 --- a/lustre/kernel_patches/patches/linux-2.4.24-xattr-0.8.54.patch +++ b/lustre/kernel_patches/patches/linux-2.4.24-xattr-0.8.54.patch @@ -1123,7 +1123,7 @@ Index: linux-2.4.24-vanilla/fs/ext2/xattr.c +void +ext2_xattr_unregister(int name_index, struct ext2_xattr_handler *handler) +{ -+ if (name_index > 0 || name_index <= EXT2_XATTR_INDEX_MAX) { ++ if (name_index > 0 && name_index <= EXT2_XATTR_INDEX_MAX) { + write_lock(&ext2_handler_lock); + ext2_xattr_handlers[name_index-1] = NULL; + write_unlock(&ext2_handler_lock); diff --git a/lustre/kernel_patches/patches/xattr-0.8.54-2.4.22-rh.patch b/lustre/kernel_patches/patches/xattr-0.8.54-2.4.22-rh.patch index b221045..39d40ec 100644 --- a/lustre/kernel_patches/patches/xattr-0.8.54-2.4.22-rh.patch +++ b/lustre/kernel_patches/patches/xattr-0.8.54-2.4.22-rh.patch @@ -1101,7 +1101,7 @@ +void +ext2_xattr_unregister(int name_index, struct ext2_xattr_handler *handler) +{ -+ if (name_index > 0 || name_index <= EXT2_XATTR_INDEX_MAX) { ++ if (name_index > 0 && name_index <= EXT2_XATTR_INDEX_MAX) { + write_lock(&ext2_handler_lock); + ext2_xattr_handlers[name_index-1] = NULL; + write_unlock(&ext2_handler_lock); -- 1.8.3.1