From 0664e74d86db2fd9a476241fdeacce840897d111 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Fri, 2 Jan 2015 12:28:12 +0530 Subject: features/uss: Perform NULL check on @name in svc_getxattr Backport of: http://review.gluster.org/9378 LISTXATTR fop is internally converted into a GETXATTR with the "name" parameter set to NULL. In svc_getxattr(), a listxattr was causing a crash because of a NULL pointer dereference on @name. FIX: Add the necessary NULL check. Change-Id: Ifb4ca2a45ecc78c384e92822403eaf2f1b573798 BUG: 1180070 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/9417 Tested-by: Gluster Build System Reviewed-by: Raghavendra Bhat --- tests/bugs/bug-1178079.t | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/bugs/bug-1178079.t (limited to 'tests') diff --git a/tests/bugs/bug-1178079.t b/tests/bugs/bug-1178079.t new file mode 100644 index 00000000000..3ee4f730f3b --- /dev/null +++ b/tests/bugs/bug-1178079.t @@ -0,0 +1,24 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +cleanup; + +#Create a volume +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume info; + +TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1..2}; +TEST $CLI volume start $V0; + +TEST $CLI volume set $V0 features.uss on; + +TEST glusterfs -s $H0 --volfile-id $V0 $M0; + +TEST touch $M0/file; + +TEST getfattr -d -m . -e hex $M0/file; + +cleanup; -- cgit