Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Sep 2013 15:00:53 +0400
From:      Sergey Kandaurov <pluknet@gmail.com>
To:        "Sergey V. Dyatko" <sergey.dyatko@gmail.com>
Cc:        =?ISO-8859-2?Q?Edward_Tomasz_Napiera=B3a?= <trasz@freebsd.org>, current <current@freebsd.org>
Subject:   Re: panic: make_dev_credv: bad si_name (error=17, si_name=iscsi)
Message-ID:  <CAE-mSOKpNMV9PWR-Z2geS889aSbaBiTZavdDmvaxwx6U4_7EPw@mail.gmail.com>
In-Reply-To: <CAE-mSO%2BfWdySa%2BO6kuSe-z9AQsi0TNFy7LMrgx-btUJfQhx=jw@mail.gmail.com>
References:  <20130924104658.46313090@laptop.minsk.domain> <CAE-mSO%2BfWdySa%2BO6kuSe-z9AQsi0TNFy7LMrgx-btUJfQhx=jw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 24 September 2013 14:40, Sergey Kandaurov <pluknet@gmail.com> wrote:
> On 24 September 2013 11:46, Sergey V. Dyatko <sergey.dyatko@gmail.com> wrote:
>> Hi,
>>
>> today I tried to play a bit with new iscsi
>>
>> r255812 isn't fully complete fix?
>>
> [...]
>> run  `kldload iscsi_initiator` and got a panic:
>
> Something like this quick'n'dirty should work.
> Compile tested only.
>
> Index: sys/dev/iscsi_initiator/iscsi.c
> ===================================================================
> --- sys/dev/iscsi_initiator/iscsi.c    (revision 255841)
> +++ sys/dev/iscsi_initiator/iscsi.c    (working copy)
> @@ -715,7 +715,8 @@
>       TUNABLE_INT_FETCH("net.iscsi_initiator.max_pdus", &max_pdus);
>
>       isc =  malloc(sizeof(struct isc_softc), M_ISCSI, M_ZERO|M_WAITOK);
> -     isc->dev = make_dev(&iscsi_cdevsw, max_sessions, UID_ROOT,
> GID_WHEEL, 0600, "iscsi");
> +     isc->dev = make_dev_credf(MAKEDEV_CHECKNAME, &iscsi_cdevsw, max_sessions,
> +                               NULL, UID_ROOT, GID_WHEEL, 0600, "iscsi");
>       isc->dev->si_drv1 = isc;
>       mtx_init(&isc->isc_mtx, "iscsi-isc", NULL, MTX_DEF);

Erm, of course it shall be checked against failure.

-- 
wbr,
pluknet



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE-mSOKpNMV9PWR-Z2geS889aSbaBiTZavdDmvaxwx6U4_7EPw>