Re: [PATCH] PCI, X86: busnum/node boot command line for pci dev node setting.

From: Yinghai Lu
Date: Mon Jun 25 2012 - 18:55:07 EST


On Mon, Jun 25, 2012 at 3:38 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
> On Mon, Jun 25, 2012 at 1:59 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote:
>>
>> Can you convince me this is safe?  pci_setup() is an early_param, so
>> it looks to me like we might be saving a pointer to initdata in this
>> call path:
>>
>>    setup_arch
>>      parse_early_param
>>        strlcpy(tmp_cmdline, boot_command_line)
>>        parse_early_options(__initdata tmp_cmdline)
>>          parse_args
>>            do_early_param
>>              ...
>>              pci_setup (early_param)
>>                pcibios_setup
>>                  remember_busnum_node
>>
>> And then we use that saved pointer to parse the string at host bridge
>> add-time, which might be after initdata has been freed.
>
> ok, that will need one separate buffer.

could used saved_command_line directly.

also do we need to include this one to upsteam ?

Thanks

Yinghai

Attachment: busnum_node_v3_x.patch
Description: Binary data