Project

General

Profile

Bug #9507

calling llistxattr(2) on a symlink crashes the client

Added by Kevin Lamontagne over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):

Description

The code hits a "BUG;" line at https://github.com/ceph/ceph-client/blob/7e8a295295775ec9e05411cefc578ff4bfc94740/fs/ceph/xattr.c#L287

The mount becomes unavailable.

Attached are a strace of a process making the call and the resulting bug output in dmesg.

This happens on Ubuntu Trusty (3.13.0-35-generic), latest stable (3.16.2) and kernel.org mainline (3.17-rc5)

dmesg crash 3.16.2.txt View (2.29 KB) Kevin Lamontagne, 09/17/2014 09:48 AM

strace crash.txt View (885 Bytes) Kevin Lamontagne, 09/17/2014 09:48 AM

History

#1 Updated by Zheng Yan over 9 years ago

  • Status changed from New to 15
commit 3ed0e301a4806e64958a50b28a34abc093b953ab
Author: Yan, Zheng <zyan@redhat.com>
Date:   Thu Sep 18 16:11:12 2014 +0800

    ceph: fix llistxattr on symlink

    only regular file and directory have vxattrs.

    Signed-off-by: Yan, Zheng <zyan@redhat.com>

diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index eb1a5ad..7f5ddf0 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@ -285,8 +285,7 @@ static size_t ceph_vxattrs_name_size(struct ceph_vxattr *vxattrs)
                return ceph_dir_vxattrs_name_size;
        if (vxattrs == ceph_file_vxattrs)
                return ceph_file_vxattrs_name_size;
-       BUG();
-
+       BUG_ON(vxattrs);
        return 0;
 }

#2 Updated by Zheng Yan over 9 years ago

  • Status changed from 15 to Resolved

Also available in: Atom PDF