public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Starikovskiy <astarikovskiy@suse.de>
To: Len Brown <lenb@kernel.org>
Cc: Linux-acpi@vger.kernel.org
Subject: [PATCH] ACPICA: Do memcpy of only allocated tables.
Date: Thu, 18 Mar 2010 17:20:44 +0300	[thread overview]
Message-ID: <20100318142043.31211.11872.stgit@thinkpad> (raw)

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---

 drivers/acpi/acpica/tbxface.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index 5217a61..3cedfb3 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -194,7 +194,9 @@ acpi_status acpi_reallocate_root_table(void)
 		return_ACPI_STATUS(AE_NO_MEMORY);
 	}
 
-	ACPI_MEMCPY(tables, acpi_gbl_root_table_list.tables, new_size);
+	ACPI_MEMCPY(tables, acpi_gbl_root_table_list.tables,
+			acpi_gbl_root_table_list.count *
+			sizeof(struct acpi_table_desc));
 
 	acpi_gbl_root_table_list.size = acpi_gbl_root_table_list.count;
 	acpi_gbl_root_table_list.tables = tables;


                 reply	other threads:[~2010-03-18 14:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20100318142043.31211.11872.stgit@thinkpad \
    --to=astarikovskiy@suse.de \
    --cc=Linux-acpi@vger.kernel.org \
    --cc=lenb@kernel.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