Print this page
10096 kstat update routines shouldn't check for NULL kstat

@@ -20,10 +20,11 @@
  */
 /*
  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2013 by Delphix. All rights reserved.
  * Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
+ * Copyright (c) 2018, Joyent, Inc.
  */
 /* Copyright (c) 1990 Mentat Inc. */
 
 #include <sys/types.h>
 #include <sys/stream.h>

@@ -5070,11 +5071,11 @@
         rawip_named_kstat_t *rawipkp;
         netstackid_t    stackid = (netstackid_t)(uintptr_t)ksp->ks_private;
         netstack_t      *ns;
         icmp_stack_t    *is;
 
-        if ((ksp == NULL) || (ksp->ks_data == NULL))
+        if (ksp->ks_data == NULL)
                 return (EIO);
 
         if (rw == KSTAT_WRITE)
                 return (EACCES);