Print this page
7307 Fixing 5780 introduced a regression

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 ↓ 385 lines elided ↑ open up ↑
 386  386                          fdinfo.pr_mode = 0;
 387  387                          fdinfo.pr_uid = (uid_t)-1;
 388  388                          fdinfo.pr_gid = (gid_t)-1;
 389  389                          fdinfo.pr_rmajor = 0;
 390  390                          fdinfo.pr_rminor = 0;
 391  391                          fdinfo.pr_size = -1;
 392  392  
 393  393                          error = elfnote(vp, &offset, NT_FDINFO,
 394  394                              sizeof (fdinfo), &fdinfo, rlimit, credp);
 395  395                          VN_RELE(fvp);
 396      -                        VN_RELE(vroot);
 397      -                        if (error)
      396 +                        if (error) {
      397 +                                VN_RELE(vroot);
 398  398                                  goto done;
      399 +                        }
 399  400                          continue;
 400  401                  }
 401  402  
 402  403                  if (fvp->v_type == VSOCK)
 403  404                          fdinfo.pr_fileflags |= sock_getfasync(fvp);
 404  405  
 405  406                  VN_RELE(fvp);
 406  407  
 407  408                  /*
 408  409                   * This logic mirrors fstat(), which we cannot use
↓ open down ↓ 170 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX