tech-kern archive

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

Re: patch: debug instrumentation for dev/raidframe/rf_netbsdkintf.c



In article <24279.1548106368%splode.eterna.com.au@localhost>,
matthew green  <mrg%eterna.com.au@localhost> wrote:
>> > @@ -472,6 +472,9 @@
>> >  	const char *bootname = device_xname(bdv);
>> >  	size_t len = strlen(bootname);
>> >  
>> > +	if (bdv == NULL)
>> > +		return 0;
>> > +
>> 
>> This looked suspicious, even before I read the code.
>> 
>> The question is if it is ever legitimate for bdv to be NULL.
>
>infact, bdv has already been dereferenced at this point:
>the assignment to bootname 3 lines up.

Yes, that change should be reverted.

christos



Home | Main Index | Thread Index | Old Index