NetBSD-Bugs archive

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

Re: kern/50602: removing ethernet cable panics the kernel

So I've revisited this change.

I rebased mlelstv's patch:

It works for me. I tested plugging/unplugging a cable repeatedly
under load or no load. I didn't see any panic and inconsistency
of the link state.

I think we can commit this change. Any thoughts?


On Mon, Jan 4, 2016 at 6:37 PM, Ryota Ozaki <> wrote:
> On Mon, Jan 4, 2016 at 4:15 PM, Michael van Elst <> wrote:
>> The following reply was made to PR kern/50602; it has been noted by GNATS.
>> From: (Michael van Elst)
>> To:
>> Cc:
>> Subject: Re: kern/50602: removing ethernet cable panics the kernel
>> Date: Mon, 4 Jan 2016 07:09:51 +0000 (UTC)
>> (Ryota Ozaki) writes:
>>  >I remember that riastradh suggested me that we don't need the
>>  >ifdef for kvm(3). IIUC, the added variables aren't accessed
>>  >by kvm(3) so that we don't need to hide them to userland.
>>  >I'd remove it if nobody objects.
>>  The point is that the structure to userland must not change
>>  without adding appropriate compatibility code.
>>  But since the added variables are only accessed by the kernel
>>  the simple solution is to put them inside #ifdef _KERNEL
>>  as it was already done for the if_slowtimo_ch variable.
> Hm. My understanding is that we can keep compatibility by
> appending new variables to a data structure while inserting
> variables to middle of a data structure or removing variables
> breaks compatibility. Basically struct ifnet is accessed from
> userland via struct ifreq and one exception is kvm(3) that is
> used by netstat(1) and vmstat(1). The former guarantees
> compatibility on changing ifnet and the compatibility for
> the latter is guaranteed by always appending new variables
> to ifnet when we change ifnet.
> Correct me if I'm wrong (probably I am!).
>   ozaki-r
>>  --
>>  --
>>                                  Michael van Elst
>>  Internet:
>>                                  "A potential Snark may lurk in every tree."

Home | Main Index | Thread Index | Old Index