Mercurial > illumos > illumos-gate
changeset 12897:dc96b005136b
6939901 dr quiesce is referring to some obsolete and unimplemented device tree operations
6940189 potential null dereference in dr_suspend_devices()
author | Mary Beale <Mary.Beale@Sun.COM> |
---|---|
date | Wed, 21 Jul 2010 16:49:10 -0700 |
parents | 8ed2c2ace7da |
children | 2e278bf762e0 |
files | usr/src/uts/i86pc/io/dr/dr_quiesce.c usr/src/uts/sun4u/ngdr/io/dr_quiesce.c |
diffstat | 2 files changed, 10 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/i86pc/io/dr/dr_quiesce.c Wed Jul 21 12:23:53 2010 -0700 +++ b/usr/src/uts/i86pc/io/dr/dr_quiesce.c Wed Jul 21 16:49:10 2010 -0700 @@ -20,8 +20,7 @@ */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. */ /* @@ -222,6 +221,10 @@ { int i; char **lname; + + if (dname == NULL) + return (0); + /* check the bypass list */ for (i = 0, lname = &dr_bypass_list[i]; **lname != '\0'; lname++) { if (strcmp(dname, dr_bypass_list[i++]) == 0) @@ -707,10 +710,6 @@ void dr_resume(dr_sr_handle_t *srh) { - dr_handle_t *handle; - - handle = srh->sr_dr_handlep; - switch (srh->sr_suspend_state) { case DR_SRSTATE_FULL: @@ -780,8 +779,6 @@ break; } - i_ndi_allow_device_tree_changes(handle->h_ndi); - prom_printf("DR: resume COMPLETED\n"); } @@ -798,8 +795,6 @@ force = dr_cmd_flags(handle) & SBD_FLAG_FORCE; - i_ndi_block_device_tree_changes(&handle->h_ndi); - prom_printf("\nDR: suspending user threads...\n"); srh->sr_suspend_state = DR_SRSTATE_USER; if (((rc = dr_stop_user_threads(srh)) != DDI_SUCCESS) &&
--- a/usr/src/uts/sun4u/ngdr/io/dr_quiesce.c Wed Jul 21 12:23:53 2010 -0700 +++ b/usr/src/uts/sun4u/ngdr/io/dr_quiesce.c Wed Jul 21 16:49:10 2010 -0700 @@ -20,8 +20,7 @@ */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. */ /* @@ -223,6 +222,10 @@ { int i; char **lname; + + if (dname == NULL) + return (0); + /* check the bypass list */ for (i = 0, lname = &dr_bypass_list[i]; **lname != '\0'; lname++) { if (strcmp(dname, dr_bypass_list[i++]) == 0) @@ -708,10 +711,6 @@ void dr_resume(dr_sr_handle_t *srh) { - dr_handle_t *handle; - - handle = srh->sr_dr_handlep; - if (srh->sr_suspend_state < DR_SRSTATE_FULL) { /* * Update the signature block. @@ -812,8 +811,6 @@ break; } - i_ndi_allow_device_tree_changes(handle->h_ndi); - /* * update the signature block */ @@ -841,8 +838,6 @@ CPU_SIGNATURE(OS_SIG, SIGST_QUIESCE_INPROGRESS, SIGSUBST_NULL, CPU->cpu_id); - i_ndi_block_device_tree_changes(&handle->h_ndi); - prom_printf("\nDR: suspending user threads...\n"); srh->sr_suspend_state = DR_SRSTATE_USER; if (((rc = dr_stop_user_threads(srh)) != DDI_SUCCESS) &&