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

Re: postgres and 3.5-current causes kernel panic



> thanks, this was a good hint.  does this patch help?
>
> Index: sysv_shm.c
> ===================================================================
> RCS file: /cvs/src/sys/kern/sysv_shm.c,v
> retrieving revision 1.41
> diff -u -r1.41 sysv_shm.c
> --- sysv_shm.c	2004/02/05 21:13:58	1.41
> +++ sysv_shm.c	2004/04/16 05:30:34
> @@ -615,12 +615,14 @@
>  		    shminfo.shmmni * sizeof(struct shmid_ds *));
>  		bzero(newsegs + shminfo.shmmni,
>  		    (val - shminfo.shmmni) * sizeof(struct shmid_ds *));
> +		free(shmsegs, M_SHM);
> +		shmsegs = newsegs;
>  		newseqs = malloc(val * sizeof(unsigned short), M_SHM, M_WAITOK);
>  		bcopy(shmseqs, newseqs,
>  		    shminfo.shmmni * sizeof(unsigned short));
>  		bzero(newseqs + shminfo.shmmni,
>  		    (val - shminfo.shmmni) * sizeof(unsigned short));
> -		free(shmsegs, M_SHM);
> +		free(shmseqs, M_SHM);
>  		shmseqs = newseqs;
>  		shminfo.shmmni = val;
>  		return (0);

Thanks a million. The patch fixed it. A typo, I guess (shmsegs v shmseqs)?

Jeff



Visit your host, monkey.org