From owner-freebsd-current@FreeBSD.ORG Tue Sep 22 11:51:13 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 302FE106566B for ; Tue, 22 Sep 2009 11:51:13 +0000 (UTC) (envelope-from jh@saunalahti.fi) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by mx1.freebsd.org (Postfix) with ESMTP id DC56C8FC13 for ; Tue, 22 Sep 2009 11:51:12 +0000 (UTC) Received: from a91-153-125-115.elisa-laajakaista.fi (a91-153-125-115.elisa-laajakaista.fi [91.153.125.115]) by gw02.mail.saunalahti.fi (Postfix) with SMTP id D84F11396BB; Tue, 22 Sep 2009 14:51:06 +0300 (EEST) Date: Tue, 22 Sep 2009 14:51:06 +0300 From: Jaakko Heinonen To: Warren Block Message-ID: <20090922115106.GA2856@a91-153-125-115.elisa-laajakaista.fi> References: <19e9a5dc0909202237g1295b6d9hf69012745009eef4@mail.gmail.com> <20090921105458.GA86764@melamine.cuivre.fr.eu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Cc: freebsd-current@freebsd.org, Gonzalo Nemmi , avg@FreeBSD.org, Thomas Quinot Subject: Re: core dump on kldload atapicam X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2009 11:51:13 -0000 On 2009-09-21, Warren Block wrote: > >> I can confirm that .. kldload atapicam still results in a "Fatal trap 12: > >> page fault while in kernel mode" on 8.0-RC1 The problem was introduced in r195534. Does the following patch work for you? %%% Index: sys/dev/ata/atapi-cam.c =================================================================== --- sys/dev/ata/atapi-cam.c (revision 197399) +++ sys/dev/ata/atapi-cam.c (working copy) @@ -418,8 +418,10 @@ atapi_action(struct cam_sim *sim, union break; } } - cpi->maxio = softc->ata_ch->dma.max_iosize ? - softc->ata_ch->dma.max_iosize : DFLTPHYS; + if (softc->ata_ch != NULL && softc->ata_ch->dma.max_iosize != 0) + cpi->maxio = softc->ata_ch->dma.max_iosize; + else + cpi->maxio = DFLTPHYS; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); return; %%% -- Jaakko