Date: Wed, 19 Dec 2007 16:18:22 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Javier <rako29@gmail.com> Cc: freebsd-current@freebsd.org Subject: Re: snp panic [Was: Re: panic with tcpdrop] Message-ID: <20071219141821.GB57756@deviant.kiev.zoral.com.ua> In-Reply-To: <47691636.7020907@gmail.com> References: <47473E30.6070608@gmail.com> <20071124003453.O14018@fledge.watson.org> <47477F9F.2080900@gmail.com> <20071124142149.Y14018@fledge.watson.org> <47486C9B.4020407@gmail.com> <20071124211859.S14018@fledge.watson.org> <20071125075620.GA78396@deviant.kiev.zoral.com.ua> <4749B2CC.7020300@gmail.com> <20071125203015.GF78396@deviant.kiev.zoral.com.ua> <47691636.7020907@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Yylu36WmvOXNoKYn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 19, 2007 at 10:01:42AM -0300, Javier wrote: > Hello, sorry, the same panic again, but with the snp.c patched with your > modification. The steps of the new panic are the same. > How can I help? > Thanks > Javier The fix was not complete. Try the patch below, it is against the current. Hopefully, it fix the problem. For RELENG_7, you need to either apply rev. 1.106, and the apply the patch. Or, you may take the snp.c from the HEAD and again, apply the patch. diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index 6c153d2..3768497 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -466,7 +466,8 @@ snpclose(struct cdev *dev, int flags, int fmt, struct t= hread *td) free(snp->snp_buf, M_SNP); snp->snp_flags &=3D ~SNOOP_OPEN; dev->si_drv1 =3D NULL; - destroy_dev_sched_cb(dev, snp_detach, snp); + snp_detach(snp); + destroy_dev_sched(dev); =20 return (0); } @@ -491,7 +492,7 @@ snpioctl(struct cdev *dev, u_long cmd, caddr_t data, in= t flags, struct thread *td) { struct snoop *snp; - struct tty *tp, *tpo; + struct tty *tp; struct cdev *tdev; struct file *fp; int s; @@ -502,8 +503,6 @@ snpioctl(struct cdev *dev, u_long cmd, caddr_t data, in= t flags, s =3D *(int *)data; if (s < 0) return (snp_down(snp)); - if (snp->snp_tty !=3D NULL) - return (EBUSY); =20 if (fget(td, s, &fp) !=3D 0) return (EINVAL); @@ -516,6 +515,9 @@ snpioctl(struct cdev *dev, u_long cmd, caddr_t data, in= t flags, tdev =3D fp->f_vnode->v_rdev; fdrop(fp, td); =20 + if (snp->snp_tty !=3D NULL) + return (EBUSY); + tp =3D snpdevtotty(tdev); if (!tp) return (EINVAL); @@ -523,13 +525,6 @@ snpioctl(struct cdev *dev, u_long cmd, caddr_t data, i= nt flags, return (EBUSY); =20 s =3D spltty(); - - if (snp->snp_target =3D=3D NULL) { - tpo =3D snp->snp_tty; - if (tpo) - tpo->t_state &=3D ~TS_SNOOP; - } - tp->t_state |=3D TS_SNOOP; snp->snp_olddisc =3D tp->t_line; tp->t_line =3D snooplinedisc; --Yylu36WmvOXNoKYn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHaSgtC3+MBN1Mb4gRAtxuAKCL/6E7jbvGR2REZjyPz5WBYiS0dwCgjI2G Ct4jTsoPjcTxwsaVnNbZUVQ= =xsEv -----END PGP SIGNATURE----- --Yylu36WmvOXNoKYn--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071219141821.GB57756>