Re: [linus:master] [kobject] 1b28cb81da: canonical_address#:#[##]

From: Leizhen (ThunderTown)
Date: Sat Feb 17 2024 - 21:01:16 EST




On 2024/2/8 23:48, Greg Kroah-Hartman wrote:
> On Wed, Feb 07, 2024 at 02:42:43PM +0800, kernel test robot wrote:
>>
>>
>> Hello,
>>
>> kernel test robot noticed "canonical_address#:#[##]" on:
>>
>> commit: 1b28cb81dab7c1eedc6034206f4e8d644046ad31 ("kobject: Remove redundant checks for whether ktype is NULL")
>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
>>
>> [test failed on linus/master 54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478 (v6.8-rc3)]
>> [test failed on linux-next/master 076d56d74f17e625b3d63cf4743b3d7d02180379]
>>
>> in testcase: boot
>>
>> compiler: gcc-11
>> test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
>>
>> (please refer to attached dmesg/kmsg for entire log/backtrace)
>>
>>
>>
>> we noticed this issue is very random, as below, observed 4 times out of 68 runs.
>> but we didn't see in on parent.
>
> Ok, this is odd, but a good enough reason to revert this for now. I was
> worried about it, and this confirms my worry that there's some codepath
> we aren't taking into account here that those checks were protecting us
> from doing bad things.

Yes, there may be some non-standard usage. kobj->ktype was detached first?

>
> thanks for the report, and Zhen, if you want to dig into this and see if
> you can figure out what is happening so that you can submit your change
> again, that would be great.

I'm trying to reproduce it. However, for me, it may take a lot of time to
prepare the environment. If kobj->name was printed when the error is
detected, we may be able to solve it directly by reviewing the code.

>
> greg k-h
> .
>

--
Regards,
Zhen Lei