Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jun 1999 11:06:02 +0200 (CEST)
From:      Bernd Walter <ticso@cicely.de>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/12399: rman forgets to store flags in some cases
Message-ID:  <199906260906.LAA36567@cicely8.cicely.de>

next in thread | raw e-mail | index | archive | help

>Number:         12399
>Category:       kern
>Synopsis:       rman forgets to store flags in some cases
>Confidential:   yes
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 26 02:10:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Bernd Walter
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Cosmo-Project http://www.cosmo-project.de
>Environment:

current as of 25th June 1999

FreeBSD  4.0-CURRENT FreeBSD 4.0-CURRENT #0: Sat Jun 26 08:22:14 CEST 1999     r
oot@:/var/d0/src-1999-06-25/src/sys/compile/CICELY5  i386

>Description:

rman_reserve_resource() forgets to store the given flags in case
'candidate region is entire chunk'

In my case it forgot to remember the shareable flags for a pci-device
and the next device with the same irq was unable to allocate the needed resource

I already wrote "Justin T. Gibbs" <gibbs@plutotech.com>,
Matthew Jacob <mjacob@feral.com> and Peter Wemm <peter@FreeBSD.ORG>
about the problem

>How-To-Repeat:

In my case I only need to boot with an unpatched kernel.
It is reproduceable if you setup a situation I descibed.

>Fix:

In my fix there will bit 5 set in the flags - I don't know if this is correct.  

root@cicely8# diff -u sys/kern/subr_rman.c.ori sys/kern/subr_rman.c             
--- sys/kern/subr_rman.c.ori    Sun Jun 20 15:40:14 1999                        
+++ sys/kern/subr_rman.c        Sun Jun 20 15:40:42 1999                        
@@ -244,7 +244,7 @@                                                             
				printf("candidate region is entire chunk\n");   
 #endif /* RMAN_DEBUG */                                                        
				rv = s;                                         
-				rv->r_flags |= RF_ALLOCATED;                    
+				rv->r_flags |= RF_ALLOCATED | flags;            
				rv->r_dev = dev;                                
				goto out;                                       
			}                                                       


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906260906.LAA36567>