Print this page
935 sv_lyr_open() misses one NULL-pointer check
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Gordon Ross <gwr@nexenta.com>
*** 19,28 ****
--- 19,30 ----
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/
/*
* Storage Volume Character and Block Driver (SV)
*
*** 1234,1243 ****
--- 1236,1246 ----
/*
* Re-acquire svp if the driver changed *devp.
*/
if (*devp != odev) {
+ if (svp != NULL)
rw_exit(&svp->sv_lock);
svp = sv_dev_to_sv(*devp, NULL);
if (svp) {