Re: kernel panic in free() called from semop()

From: Robert Watson <rwatson_at_FreeBSD.org>
Date: Sat, 13 Nov 2004 08:08:47 +0000 (GMT)
Sorry about that, fixes committed!

On Fri, 12 Nov 2004, Don Lewis wrote:

> _at__at_ -900,7 +901,7 _at__at_ semop(td, uap)
>  	semid = IPCID_TO_IX(semid);	/* Convert back to zero origin */
>  
>  	if (semid < 0 || semid >= seminfo.semmni)
> -		return (EINVAL);
> +		error = EINVAL;

This was part of a second set of changes that I haven't yet merged, which
slipped through while I was breaking out the ABI changes.

> _at__at_ -1152,6 +1153,7 _at__at_ done2:
>  	mtx_unlock(sema_mtxp);
>  	if (sops != small_sops)
>  		free(sops, M_SEM);
> +	free(sops, M_SEM);
>  	return (error);
>  }

And this is from incorrectly merging the small_sops change to the
TrustedBSD branch when it was originally committed.

I thought I'd gone through the patches pretty carefully for this sort of
thing, but I guess after reading through three files of the system v IPC
code, the eyes go numb.

Thanks,

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert_at_fledge.watson.org      Principal Research Scientist, McAfee Research
Received on Sat Nov 13 2004 - 07:10:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:22 UTC