Print this page
NEX-5016 nlm_unexport() should not call nlm_vhold_clean() with g->lock held
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
NEX-2966 NLM server holds vnodes too long
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: Dan Fields <dan.fields@nexenta.com>
NEX-3758 Support for remote stale lock detection
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
NEX-2984 smhbaapi leaks memory
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: Jean McCormack <jean.mccormack@nexenta.com>
Reviewed by: Marcel Telka <marcel.telka@nexenta.com>
NEX-3014 system crash after nlm_gc hits bogus mutex
4872 system crash after nlm_gc hits bogus mutex
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Reviewed by: Jeremy Jones <jeremy@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
OS-137 assertion failed: hostp->nh_refs == 0, file: ../../common/klm/nlm_impl.c, line: 1135
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/klm/nlm_impl.c
          +++ new/usr/src/uts/common/klm/nlm_impl.c
↓ open down ↓ 2332 lines elided ↑ open up ↑
2333 2333  
2334 2334          error = svc_tli_kcreate(fp, 0, (char *)netid, NULL, &xprt,
2335 2335              &nlm_sct, NULL, NLM_SVCPOOL_ID, FALSE);
2336 2336          if (error != 0)
2337 2337                  return (error);
2338 2338  
2339 2339          (void) nlm_knc_to_netid(knc);
2340 2340          return (0);
2341 2341  }
2342 2342  
     2343 +int
     2344 +nlm_sysid_to_host(zoneid_t zoneid, sysid_t sysid, struct sockaddr *sa,
     2345 +    const char **type)
     2346 +{
     2347 +        struct nlm_globals *g;
     2348 +        struct nlm_host *host;
     2349 +        zone_t *zone;
     2350 +
     2351 +        zone = zone_find_by_id(zoneid);
     2352 +        if (zone == NULL)
     2353 +                return (0);
     2354 +
     2355 +        g = zone_getspecific(nlm_zone_key, zone);
     2356 +
     2357 +        host = nlm_host_find_by_sysid(g, sysid);
     2358 +        if (host == NULL) {
     2359 +                zone_rele(zone);
     2360 +                return (0);
     2361 +        }
     2362 +
     2363 +        if (strcmp(host->nh_knc.knc_protofmly, NC_INET) == 0)
     2364 +                bcopy(host->nh_addr.buf, sa, sizeof (struct sockaddr_in));
     2365 +        else if (strcmp(host->nh_knc.knc_protofmly, NC_INET6) == 0)
     2366 +                bcopy(host->nh_addr.buf, sa, sizeof (struct sockaddr_in6));
     2367 +        else
     2368 +                sa->sa_family = AF_UNSPEC;
     2369 +
     2370 +        nlm_host_release(g, host);
     2371 +        zone_rele(zone);
     2372 +
     2373 +        *type = "NLM";
     2374 +
     2375 +        return (1);
     2376 +}
     2377 +
2343 2378  /*
2344 2379   * Start NLM service.
2345 2380   */
2346 2381  int
2347 2382  nlm_svc_starting(struct nlm_globals *g, struct file *fp,
2348 2383      const char *netid, struct knetconfig *knc)
2349 2384  {
2350 2385          int error;
2351 2386          enum clnt_stat stat;
2352 2387  
↓ open down ↓ 470 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX