From patchwork Fri Aug 28 19:24:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kyle mcmartin X-Patchwork-Id: 44571 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7SJORrX016597 for ; Fri, 28 Aug 2009 19:24:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752536AbZH1TYX (ORCPT ); Fri, 28 Aug 2009 15:24:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752645AbZH1TYX (ORCPT ); Fri, 28 Aug 2009 15:24:23 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:38845 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752536AbZH1TYX (ORCPT ); Fri, 28 Aug 2009 15:24:23 -0400 Received: from kyle by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1Mh73h-0008Se-CD for linux-parisc@vger.kernel.org; Fri, 28 Aug 2009 19:24:25 +0000 Date: Fri, 28 Aug 2009 15:24:25 -0400 From: Kyle McMartin To: linux-parisc@vger.kernel.org Subject: [PATCH] fix unaligned access in 64-bit apply_relocate_add Message-ID: <20090828192425.GH19494@bombadil.infradead.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Assuming, of course, that loc64 shouldn't be 8-byte masked, and that the relocation address was correct. Signed-off-by: Kyle McMartin --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index 61ee0ee..eea810c 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c @@ -63,6 +63,7 @@ #include #include +#include #if 0 #define DEBUGP printk @@ -799,7 +800,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs, break; case R_PARISC_DIR64: /* 64-bit effective address */ - *loc64 = val + addend; + put_unaligned(val + addend, loc64); break; case R_PARISC_SEGREL32: /* 32-bit segment relative address */