Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-6299

OSP does not handle zero length xattr values well

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • Lustre 2.8.0
    • Lustre 2.7.0
    • None
    • 3
    • 17639

    Description

      The OSP/OUT code assumes that xattr values always have a non-zero length. For example,

      static int out_xattr_set(struct tgt_session_info *tsi)
      {
               ...
              buf = object_update_param_get(update, 1, &buf_len);
              if (buf == NULL || buf_len == 0) {
                      CERROR("%s: empty buf for xattr set: rc = %d\n",
                             tgt_name(tsi->tsi_tgt), -EPROTO);
                      RETURN(err_serious(-EPROTO));
              }
              ...
      

      Here is what happens on 2.6.94-18-g7c82a9c

      t:lustre-release# cd /mnt/lustre
      t:lustre# lfs mkdir -c4 d0
      t:lustre# setfattr -n user.foo d0
      
      Message from syslogd@t at Feb 26 10:53:15 ...
       kernel:[  409.511761] LustreError: 4876:0:(osp_object.c:1132:__osp_xattr_set()) ASSERTION( buf->lb_len > 0 && buf->lb_buf != ((void *)0) ) failed: 
      
      Message from syslogd@t at Feb 26 10:53:15 ...
       kernel:[  409.515616] LustreError: 4876:0:(osp_object.c:1132:__osp_xattr_set()) LBUG
      

      Attachments

        Issue Links

          Activity

            People

              di.wang Di Wang
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: