From: yakui_zhao <yakui.zhao@intel.com>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Len Brown <lenb@kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH]: ACPI: Change the array size from 5 to 8 for acpi_bus_id
Date: Fri, 22 May 2009 10:08:58 +0800 [thread overview]
Message-ID: <1242958138.8523.135.camel@localhost.localdomain> (raw)
In-Reply-To: <20090521190715.GA30375@srcf.ucam.org>
On Fri, 2009-05-22 at 03:07 +0800, Matthew Garrett wrote:
> On Thu, May 21, 2009 at 02:26:32PM -0400, Len Brown wrote:
> > what bad things happen if this patch is not applied --
> > do some of those strcpy()'s overflow?
>
> Looks like there'd be issues with the change to the CPU name on systems
> with lots of CPUs in ACPI.
What Matthew said is right.
On some boxes I want to change the ACPI processor bus id. And the new
bus id is generated as the following format:
sprintf(acpi_device_bid(device), "CPU%X", cpu_id)
If the CPU number exceeds 255, the string length will exceed the array
size of acpi_bus_id.
Although it doesn't matter, it still looks not very good. The reason
that it still can work is that the following three bytes are not used.
So I change the array size of acpi_bus_id from 5 to 8.
Thanks.
>
next prev parent reply other threads:[~2009-05-22 2:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-21 8:25 [PATCH]: ACPI: Change the array size from 5 to 8 for acpi_bus_id yakui_zhao
2009-05-21 18:26 ` Len Brown
2009-05-21 19:07 ` Matthew Garrett
2009-05-22 2:08 ` yakui_zhao [this message]
2009-05-27 3:55 ` Len Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1242958138.8523.135.camel@localhost.localdomain \
--to=yakui.zhao@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox