Date: Sat, 6 Sep 2008 03:00:17 GMT From: Fritz Katz <frtzkatz@yahoo.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/127131: /usr/src/sys/dev/bktr/bktr_os.c, line 469: wrong type in bus_release_resource Message-ID: <200809060300.m8630H0M069661@www.freebsd.org> Resent-Message-ID: <200809060310.m863A2IC051600@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 127131 >Category: kern >Synopsis: /usr/src/sys/dev/bktr/bktr_os.c, line 469: wrong type in bus_release_resource >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Sep 06 03:10:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Fritz Katz >Release: 7.0-RELEASE i386 >Organization: AAArt Corp. >Environment: FreeBSD nvdev.AAArt.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Wed May 21 13:31:32 PDT 2008 root@nvdev.AAArt.com:/usr/obj/usr/src/sys/AAART i386 >Description: In FreeBSD-7.0, /usr/src/sys/dev/bktr/bktr_os.c, line 469: http://fxr.watson.org/fxr/source/dev/bktr/bktr_os.c?v=FREEBSD70#L469 __________ fail: if (bktr->res_irq) bus_release_resource(dev, SYS_RES_IRQ, bktr->irq_rid, bktr->res_irq); if (bktr->res_mem) bus_release_resource(dev, SYS_RES_IRQ, bktr->mem_rid, bktr->res_mem); return error; __________ Shouldn't the type field for the second bus_release_resource be SYS_RES_MEMORY? Would it cause a kernel panic if it were ever hit? If it is a bug, it's probably been there for years. >How-To-Repeat: if the bktr driver fails to load, this code will be hit. >Fix: replace SYS_RES_IRQ with SYS_RES_MEMORY in the second bus_release_resource. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809060300.m8630H0M069661>