Print this page
12976 system panics with error in IP module
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Paul Winder <p.winder@me.com>

@@ -19,10 +19,11 @@
  * CDDL HEADER END
  */
 /*
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
+ * Copyright 2020 Joyent, Inc.
  */
 
 #ifndef _SYS_SOCKET_PROTO_H_
 #define _SYS_SOCKET_PROTO_H_
 

@@ -200,11 +201,20 @@
                     struct sock_proto_props *);
         void    (*su_txq_full)(sock_upper_handle_t, boolean_t);
         void    (*su_signal_oob)(sock_upper_handle_t, ssize_t);
         void    (*su_zcopy_notify)(sock_upper_handle_t);
         void    (*su_set_error)(sock_upper_handle_t, int);
+        /*
+         * NOTE: This function frees upper handle items. Caller cannot
+         * rely on them after this upcall.
+         */
         void    (*su_closed)(sock_upper_handle_t);
+        /*
+         * NOTE: This function MUST be implemented without using lower-level
+         * downcalls or accesses. This allows callers to ensure su_closed()
+         * upcalls can happen indepdently or concurrently.
+         */
         vnode_t *(*su_get_vnode)(sock_upper_handle_t);
 };
 
 #define SOCK_UC_VERSION         sizeof (sock_upcalls_t)
 #define SOCK_DC_VERSION         sizeof (sock_downcalls_t)