Print this page
10703 smatch unreachable code checking needs reworking
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/vm/seg_dev.c
          +++ new/usr/src/uts/common/vm/seg_dev.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25      - * Copyright 2018 Joyent, Inc.
       25 + * Copyright 2019 Joyent, Inc.
  26   26   */
  27   27  
  28   28  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  29   29  /*        All Rights Reserved   */
  30   30  
  31   31  /*
  32   32   * University Copyright- Copyright (c) 1982, 1986, 1988
  33   33   * The Regents of the University of California
  34   34   * All Rights Reserved
  35   35   *
↓ open down ↓ 3945 lines elided ↑ open up ↑
3981 3981                  /*
3982 3982                   * Check if there are still any pending faults on the cookie
3983 3983                   * while the driver is deleting it,
3984 3984                   * XXX - could change to an ASSERT but wont catch errant drivers
3985 3985                   */
3986 3986                  mutex_enter(&cp->lock);
3987 3987                  if (cp->locked) {
3988 3988                          mutex_exit(&cp->lock);
3989 3989                          panic("ddi_umem_free for cookie with pending faults %p",
3990 3990                              (void *)cp);
3991      -                        return;
3992 3991                  }
3993 3992  
3994 3993                  segkp_release(segkp, cp->cvaddr);
3995 3994  
3996 3995                  /*
3997 3996                   * release mutex associated with this cookie.
3998 3997                   */
3999 3998                  mutex_destroy(&cp->lock);
4000 3999                  break;
4001 4000          case KMEM_NON_PAGEABLE :
↓ open down ↓ 103 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX