Print this page
5780 Truncated coredumps

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/exec/elf/elf_notes.c
          +++ new/usr/src/uts/common/exec/elf/elf_notes.c
↓ open down ↓ 368 lines elided ↑ open up ↑
 369  369                  mutex_exit(&fip->fi_lock);
 370  370  
 371  371                  /*
 372  372                   * There are some vnodes that have no corresponding
 373  373                   * path.  Its reasonable for this to fail, in which
 374  374                   * case the path will remain an empty string.
 375  375                   */
 376  376                  (void) vnodetopath(vroot, fvp, fdinfo.pr_path,
 377  377                      sizeof (fdinfo.pr_path), credp);
 378  378  
 379      -                error = VOP_GETATTR(fvp, &vattr, 0, credp, NULL);
 380      -                if (error != 0) {
      379 +                if (VOP_GETATTR(fvp, &vattr, 0, credp, NULL) != 0) {
      380 +                        /*
      381 +                         * Try to write at least a subset of information
      382 +                         */
      383 +                        fdinfo.pr_major = 0;
      384 +                        fdinfo.pr_minor = 0;
      385 +                        fdinfo.pr_ino = 0;
      386 +                        fdinfo.pr_mode = 0;
      387 +                        fdinfo.pr_uid = -1;
      388 +                        fdinfo.pr_gid = -1;
      389 +                        fdinfo.pr_rmajor = 0;
      390 +                        fdinfo.pr_rminor = 0;
      391 +                        fdinfo.pr_size = -1;
      392 +
      393 +                        error = elfnote(vp, &offset, NT_FDINFO,
      394 +                                        sizeof (fdinfo), &fdinfo,
      395 +                                        rlimit, credp);
 381  396                          VN_RELE(fvp);
 382  397                          VN_RELE(vroot);
 383      -                        goto done;
      398 +                        if (error)
      399 +                                goto done;
      400 +                        continue;
 384  401                  }
 385  402  
 386  403                  if (fvp->v_type == VSOCK)
 387  404                          fdinfo.pr_fileflags |= sock_getfasync(fvp);
 388  405  
 389  406                  VN_RELE(fvp);
 390  407  
 391  408                  /*
 392  409                   * This logic mirrors fstat(), which we cannot use
 393  410                   * directly, as it calls copyout().
↓ open down ↓ 169 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX