NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/39783: raidframe autoconfig failed to cleanup correctly if out of memory
>Number: 39783
>Category: kern
>Synopsis: raidframe autoconfig failed to cleanup correctly if out of
>memory
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 22 09:05:00 +0000 2008
>Originator: Wolfgang Stukenbrock
>Release: NetBSD 4.0
>Organization:
Dr. Nagler & Company GmbH
>Environment:
System: NetBSD s012 4.0 NetBSD 4.0 (NSW-S012) #1: Thu Sep 11 12:21:03 CEST 2008
root@s012:/usr/src/sys/arch/amd64/compile/NSW-S012 amd64
Architecture: x86_64
Machine: amd64
>Description:
In /usr/src/sys/dev/raidframe/rf_netbsdkintf.c in function
rf_get_component() around line 2760,
if a malloc fails, the routine just frees all priviously allocated
memory for the auto-config list
but it does not close and free the vnode strutures, that are stored in
this list.
There are two possible way to fix this.
1. do the suggested panic instead of freein everything
2. close and free the vnodes from the list.
>How-To-Repeat:
Not relevant - found by a look into the sources.
>Fix:
Due to the fact, that this problem would only be relevant if there are
more raid devices than the memory can hold,
this error should never happen on any system.
The caller of rf_get_component() does not check the result. This will
lead to an incomplete list on alloc-problems
that will be processs as if no error has happend.
Therefore I would suggest to place a call to panic() here.
Otherwise the code fragment at the end of the routine with "vn_lock();
VOP_CLOSE(), vput()" needs to be added
in the while loop that frees all data structures.
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index