3.3.0-7, fix SEGV in glusterfs, BZ 856704

This commit is contained in:
Kaleb S. KEITHLEY 2012-09-12 15:34:53 -04:00
parent d7f904cde8
commit 1f52a5abaa
2 changed files with 155 additions and 27 deletions

View File

@ -0,0 +1,91 @@
--- xlators/mount/fuse/src/fuse-bridge.c.orig
+++ xlators/mount/fuse/src/fuse-bridge.c
@@ -4198,13 +4198,11 @@ fuse_thread_proc (void *data)
finh->uid == priv->uid_map_root)
finh->uid = 0;
-#ifdef GF_DARWIN_HOST_OS
if (finh->opcode >= FUSE_OP_HIGH)
/* turn down MacFUSE specific messages */
fuse_enosys (this, finh, msg);
else
-#endif
- fuse_ops[finh->opcode] (this, finh, msg);
+ fuse_ops[finh->opcode] (this, finh, msg);
iobuf_unref (iobuf);
continue;
@@ -4423,40 +4421,47 @@ mem_acct_init (xlator_t *this)
static fuse_handler_t *fuse_std_ops[FUSE_OP_HIGH] = {
- [FUSE_INIT] = fuse_init,
- [FUSE_DESTROY] = fuse_destroy,
[FUSE_LOOKUP] = fuse_lookup,
[FUSE_FORGET] = fuse_forget,
[FUSE_GETATTR] = fuse_getattr,
[FUSE_SETATTR] = fuse_setattr,
- [FUSE_OPENDIR] = fuse_opendir,
- [FUSE_READDIR] = fuse_readdir,
- [FUSE_RELEASEDIR] = fuse_releasedir,
- [FUSE_ACCESS] = fuse_access,
[FUSE_READLINK] = fuse_readlink,
+ [FUSE_SYMLINK] = fuse_symlink,
[FUSE_MKNOD] = fuse_mknod,
[FUSE_MKDIR] = fuse_mkdir,
[FUSE_UNLINK] = fuse_unlink,
[FUSE_RMDIR] = fuse_rmdir,
- [FUSE_SYMLINK] = fuse_symlink,
[FUSE_RENAME] = fuse_rename,
[FUSE_LINK] = fuse_link,
- [FUSE_CREATE] = fuse_create,
[FUSE_OPEN] = fuse_open,
[FUSE_READ] = fuse_readv,
[FUSE_WRITE] = fuse_write,
- [FUSE_FLUSH] = fuse_flush,
+ [FUSE_STATFS] = fuse_statfs,
[FUSE_RELEASE] = fuse_release,
[FUSE_FSYNC] = fuse_fsync,
- [FUSE_FSYNCDIR] = fuse_fsyncdir,
- [FUSE_STATFS] = fuse_statfs,
[FUSE_SETXATTR] = fuse_setxattr,
[FUSE_GETXATTR] = fuse_getxattr,
[FUSE_LISTXATTR] = fuse_listxattr,
[FUSE_REMOVEXATTR] = fuse_removexattr,
+ [FUSE_FLUSH] = fuse_flush,
+ [FUSE_INIT] = fuse_init,
+ [FUSE_OPENDIR] = fuse_opendir,
+ [FUSE_READDIR] = fuse_readdir,
+ [FUSE_RELEASEDIR] = fuse_releasedir,
+ [FUSE_FSYNCDIR] = fuse_fsyncdir,
[FUSE_GETLK] = fuse_getlk,
[FUSE_SETLK] = fuse_setlk,
[FUSE_SETLKW] = fuse_setlk,
+ [FUSE_ACCESS] = fuse_access,
+ [FUSE_CREATE] = fuse_create,
+ /* [FUSE_INTERRUPT] */
+ /* [FUSE_BMAP] */
+ [FUSE_DESTROY] = fuse_destroy,
+ /* [FUSE_IOCTL] */
+ /* [FUSE_POLL] */
+ /* [FUSE_NOTIFY_REPLY] */
+ /* [FUSE_BATCH_FORGET] */
+ /* [FUSE_FALLOCATE] */
};
--- xlators/mount/fuse/src/fuse-bridge.h.orig
+++ xlators/mount/fuse/src/fuse-bridge.h
@@ -57,7 +57,11 @@
#include "syncop.h"
#if defined(GF_LINUX_HOST_OS) || defined(__NetBSD__)
-#define FUSE_OP_HIGH (FUSE_POLL + 1)
+#if (FUSE_KERNEL_MINOR_VERSION >= 19)
+#define FUSE_OP_HIGH (FUSE_FALLOCATE + 1)
+#else
+#define FUSE_OP_HIGH 44 /* (FUSE_ALLOCATE + 1) */
+#endif
#endif
#ifdef GF_DARWIN_HOST_OS
#define FUSE_OP_HIGH (FUSE_DESTROY + 1)

View File

@ -32,7 +32,7 @@
Summary: Cluster File System
Name: glusterfs
Version: 3.3.0
Release: 6%{?dist}
Release: 7%{?dist}
License: GPLv3+ and (GPLv2 or LGPLv3+)
Group: System Environment/Base
Vendor: Red Hat
@ -47,6 +47,7 @@ Source6: glusterfsd.logrotate
#Patch0: %{name}-3.2.5.configure.ac.patch
Patch1: %{name}-3.3.0.libglusterfs.Makefile.patch
Patch2: %{name}-3.3.0.cli.cli-rpc-ops.c.patch
Patch3: %{name}-3.3.0.xlator.mount.fuse.fuse-bridge.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@ -80,14 +81,14 @@ Requires(postun): /sbin/service
%define _init_file2 %{_sysconfdir}/init.d/glusterfsd
%endif
BuildRequires: bison flex
BuildRequires: gcc make automake libtool
BuildRequires: ncurses-devel readline-devel
BuildRequires: libxml2-devel openssl-devel
BuildRequires: bison flex
BuildRequires: gcc make automake libtool
BuildRequires: ncurses-devel readline-devel
BuildRequires: libxml2-devel openssl-devel
%if 0%{?suse_version}
BuildRequires: python-devel
BuildRequires: python-devel
%else
BuildRequires: python-ctypes
BuildRequires: python-ctypes
%endif
Obsoletes: hekafs <= 0.7
@ -114,11 +115,11 @@ both GlusterFS server and client framework.
%if 0%{!?_without_rdma:1}
%package rdma
Summary: GlusterFS rdma support for ib-verbs
Group: Applications/File
BuildRequires: libibverbs-devel
Summary: GlusterFS rdma support for ib-verbs
Group: Applications/File
BuildRequires: libibverbs-devel
Requires: %{name} = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
%description rdma
GlusterFS is a clustered file-system capable of scaling to several
@ -134,10 +135,10 @@ This package provides support to ib-verbs library.
%if 0%{!?_without_georeplication:1}
%package geo-replication
Summary: GlusterFS Geo-replication
Group: Applications/File
Requires: %{name} = %{version}-%{release}
Requires: %{name}-server = %{version}-%{release}
Summary: GlusterFS Geo-replication
Group: Applications/File
Requires: %{name} = %{version}-%{release}
Requires: %{name}-server = %{version}-%{release}
%description geo-replication
GlusterFS is a clustered file-system capable of scaling to several
@ -152,11 +153,11 @@ This package provides support to geo-replication.
%endif
%package fuse
Summary: Fuse client
Group: Applications/File
BuildRequires: fuse-devel
Summary: Fuse client
Group: Applications/File
BuildRequires: fuse-devel
Requires: %{name} = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
Obsoletes: %{name}-client < %{version}-%{release}
Provides: %{name}-client = %{version}-%{release}
@ -221,10 +222,10 @@ Source12: gluster-swift-account.init
Source13: gluster-swift-container.init
Source14: gluster-swift-object.init
Source15: gluster-swift-proxy.init
Patch3: openstack-swift-newdeps.patch
Patch4: openstack-swift-docmod.patch
Patch5: openstack-swift-nonet.patch
Patch6: glusterfs-3.3.0.swift.patch
Patch10: openstack-swift-newdeps.patch
Patch11: openstack-swift-docmod.patch
Patch12: openstack-swift-nonet.patch
Patch13: glusterfs-3.3.0.swift.patch
#BuildRoot: %(mktemp -ud %{_tmppath}/swift-%{SWIFTVER}-%{release}-XXXXXX)
BuildRequires: python-devel
@ -238,6 +239,7 @@ BuildRequires: python-webob
BuildRequires: python-paste-deploy
%endif
BuildRequires: dos2unix
Requires: %{name} = %{version}-%{release}
Requires: python-configobj
Requires: python-eventlet >= 0.9.8
Requires: python-greenlet >= 0.3.1
@ -369,11 +371,12 @@ storage costs.
#%patch0 -p0
%patch1 -p0
%patch2 -p0
%patch3 -p0
cd swift-%{SWIFTVER}
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
dos2unix LICENSE
%endif
@ -814,54 +817,85 @@ exit 0
%post swift-account
/sbin/chkconfig --add gluster-swift-account
if [ -f /etc/swift/account-server/1.conf ]; then
echo "warning: /etc/swift/account-server/1.conf saved as /etc/swift/account-server/1.conf.rpmsave"
cp /etc/swift/account-server/1.conf /etc/swift/account-server/1.conf.rpmsave
fi
%preun swift-account
if [ $1 = 0 ] ; then
/sbin/service gluster-swift-account stop >/dev/null 2>&1
/sbin/chkconfig --del gluster-swift-account
fi
%postun swift-account
if [ "$1" -ge "1" ] ; then
/sbin/service gluster-swift-account condrestart >/dev/null 2>&1 || :
fi
%post swift-container
/sbin/chkconfig --add gluster-swift-container
if [ -f /etc/swift/container-server/1.conf ]; then
echo "warning: /etc/swift/container-server/1.conf saved as /etc/swift/container-server/1.conf.rpmsave"
cp /etc/swift/container-server/1.conf /etc/swift/container-server/1.conf.rpmsave
fi
%preun swift-container
if [ $1 = 0 ] ; then
/sbin/service gluster-swift-container stop >/dev/null 2>&1
/sbin/chkconfig --del gluster-swift-container
fi
%postun swift-container
if [ "$1" -ge "1" ] ; then
/sbin/service gluster-swift-container condrestart >/dev/null 2>&1 || :
fi
%post swift-object
/sbin/chkconfig --add gluster-swift-object
if [ -f /etc/swift/object-server/1.conf ]; then
echo "warning: /etc/swift/object-server/1.conf saved as /etc/swift/object-server/1.conf.rpmsave"
cp /etc/swift/object-server/1.conf /etc/swift/object-server/1.conf.rpmsave
fi
%preun swift-object
if [ $1 = 0 ] ; then
/sbin/service gluster-swift-object stop >/dev/null 2>&1
/sbin/chkconfig --del gluster-swift-object
fi
%postun swift-object
if [ "$1" -ge "1" ] ; then
/sbin/service gluster-swift-object condrestart >/dev/null 2>&1 || :
fi
%post swift-proxy
/sbin/chkconfig --add gluster-swift-proxy
if [ -f /etc/swift/proxy-server.conf ]; then
echo "warning: /etc/swift/proxy-server.conf saved as /etc/swift/proxy-server.conf.rpmsave"
cp /etc/swift/proxy-server.conf /etc/swift/proxy-server.conf.rpmsave
fi
%preun swift-proxy
if [ $1 = 0 ] ; then
/sbin/service gluster-swift-proxy stop >/dev/null 2>&1
/sbin/chkconfig --del gluster-swift-proxy
fi
%postun swift-proxy
if [ "$1" -ge "1" ] ; then
/sbin/service gluster-swift-proxy condrestart >/dev/null 2>&1 || :
@ -870,6 +904,9 @@ fi
%changelog
* Wed Sep 12 2012 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.3.0-7
- fix for glusterfs SEGV, BZ 856704
* Wed Sep 7 2012 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.3.0-6
- glusterfs.spec cleanup