Module Name: src
Committed By: oster
Date: Sat Sep 16 23:38:57 UTC 2023
Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c
Log Message:
A component that is in state rf_ds_reconstructing has failed, and should
not be consulted for DIOCGCACHE.
Fixes an observed panic when rf_get_component_caches() does an IOCTL to
a failed device while reconstruction is in progress.
XXX pullup netbsd-10
XXX pullup netbsd-9
To generate a diff of this commit:
cvs rdiff -u -r1.412 -r1.413 src/sys/dev/raidframe/rf_netbsdkintf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.412 src/sys/dev/raidframe/rf_netbsdkintf.c:1.413
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.412 Thu Jun 15 09:15:54 2023
+++ src/sys/dev/raidframe/rf_netbsdkintf.c Sat Sep 16 23:38:57 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.412 2023/06/15 09:15:54 hannken Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.413 2023/09/16 23:38:57 oster Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.412 2023/06/15 09:15:54 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.413 2023/09/16 23:38:57 oster Exp $");
#ifdef _KERNEL_OPT
#include "opt_raid_autoconfig.h"
@@ -3771,8 +3771,7 @@ rf_get_component_caches(RF_Raid_t *raidP
* Check any non-dead disk, even when currently being
* reconstructed.
*/
- if (!RF_DEAD_DISK(raidPtr->Disks[c].status)
- || raidPtr->Disks[c].status == rf_ds_reconstructing) {
+ if (!RF_DEAD_DISK(raidPtr->Disks[c].status)) {
error = VOP_IOCTL(raidPtr->raid_cinfo[c].ci_vp,
DIOCGCACHE, &dkpart, FREAD, NOCRED);
if (error) {