Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/ic



On 22.10.2019 14:09, Martin Husemann wrote:
> Module Name:	src
> Committed By:	martin
> Date:		Tue Oct 22 12:09:11 UTC 2019
> 
> Modified Files:
> 	src/sys/dev/ic: wdc.c
> 
> Log Message:
> Fix channel locking - patch from Christos.
> 
> 

>  #include <sys/cdefs.h>
> -__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.292 2019/09/14 17:11:39 tsutsui Exp $");
> +__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.293 2019/10/22 12:09:11 martin Exp $");
>  
>  #include "opt_ata.h"
>  #include "opt_wdc.h"
> @@ -295,15 +295,16 @@ wdc_drvprobe(struct ata_channel *chp)
>  	u_int8_t st0 = 0, st1 = 0;
>  	int i, j, error, tfd;
>  
> +	ata_channel_lock(chp);
>  	if (atabus_alloc_drives(chp, wdc->wdc_maxdrives) != 0)

Missing ata_channel_unlock(chp)?

Noted by mjg@freebsd.

>  		return;
>  	if (wdcprobe1(chp, 0) == 0) {
>  		/* No drives, abort the attach here. */
>  		atabus_free_drives(chp);
> +		ata_channel_unlock(chp);
>  		return;
>  	}
>  


Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index