"panic: malloc(M_WAITOK) in non-sleepable context" after r364296 -> r364341

Mateusz Guzik mjguzik at gmail.com
Tue Aug 18 13:37:53 UTC 2020


So the previous patch should just print a warning.

Does this take care of the problem in general? I don't have means to
test the patch.

diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c
index b299fbddd84..c6d6a5da403 100644
--- a/sys/cam/scsi/scsi_pass.c
+++ b/sys/cam/scsi/scsi_pass.c
@@ -652,6 +652,7 @@ passregister(struct cam_periph *periph, void *arg)
        args.mda_gid = GID_OPERATOR;
        args.mda_mode = 0600;
        args.mda_si_drv1 = periph;
+       args.mda_flags = MAKEDEV_NOWAIT;
        error = make_dev_s(&args, &softc->dev, "%s%d", periph->periph_name,
            periph->unit_number);
        if (error != 0) {


On 8/18/20, David Wolfskill <david at catwhisker.org> wrote:
> On Tue, Aug 18, 2020 at 03:24:52PM +0200, Mateusz Guzik wrote:
>> Try this:
>> [replacing new KASSERT() with WITNESS_WARN()...]
>> ....
>
> Thanks; on it.  Should take care of it, I think.
>
> Peace,
> david
> --
> David H. Wolfskill				david at catwhisker.org
> Donald Trump is either ignorant of how to govern or is refusing to do so.
>
> See http://www.catwhisker.org/~david/publickey.gpg for my public key.
>


-- 
Mateusz Guzik <mjguzik gmail.com>


More information about the freebsd-current mailing list