Whamcloud - gitweb
Branch: b1_4
authoradilger <adilger>
Wed, 3 Nov 2004 17:05:41 +0000 (17:05 +0000)
committeradilger <adilger>
Wed, 3 Nov 2004 17:05:41 +0000 (17:05 +0000)
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
lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54-hp.patch
lustre/kernel_patches/patches/linux-2.4.21-xattr-0.8.54-chaos.patch
lustre/kernel_patches/patches/linux-2.4.21-xattr-0.8.54-suse.patch
lustre/kernel_patches/patches/linux-2.4.24-xattr-0.8.54.patch
lustre/kernel_patches/patches/xattr-0.8.54-2.4.22-rh.patch

index 5bdfaff..cbf51ea 100644 (file)
 +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);
index f1365d7..3c156e8 100644 (file)
 +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);
index 8e198f8..196ae17 100644 (file)
@@ -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);
index da8c15c..9208772 100644 (file)
 +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);
index 4cf5c2c..5bd7ac4 100644 (file)
@@ -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);
index b221045..39d40ec 100644 (file)
 +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);