i386/107943: Forget to unlock mutex-locks

Yuxiang Luo fedora at ercist.iscas.ac.cn
Mon Jan 15 08:30:22 UTC 2007


>Number:         107943
>Category:       i386
>Synopsis:       Forget to unlock mutex-locks
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-i386
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 15 08:30:21 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Yuxiang Luo
>Release:        6.0 stable
>Organization:
Institute of Software, Chinese Academy of Sciences
>Environment:
FreeBSD Earth.Earth 6.0-RELEASE FreeBSD 6.0-RELEASE #2: Tue Feb 28 02:32:45 UTC 2006     root at guhao.fsd.iscas:/usr/obj/usr/src/sys/CAS-EARTH  i386
>Description:
These two bugs, exiting with mutex-lock holded, are detected by a static analyzer we are developing.
One of them are caused by GOTO statement.

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

*** aac_cam.c	Wed Jul 26 07:46:00 2006
--- aac_cam_new.c	Mon Jan 15 15:49:41 2007
***************
*** 571,576 ****
--- 571,577 ----
  		device_printf(sc->aac_dev,"Error %d sending ResetBus command\n",
  		    e);
  		aac_release_sync_fib(sc);
+ 		mtx_unlock(&sc->aac_io_lock);
  		return (CAM_REQ_ABORTED);
  	}
  

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


More information about the freebsd-i386 mailing list