Skip to content

Commit

Permalink
sh: unwinder: Restore put_unaligned() for an unaligned destination.
Browse files Browse the repository at this point in the history
The destination address might be unaligned, so set it with
put_unaligned() for safety. This restores the previous behaviour, albeit
through the proper API.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Aug 13, 2009
1 parent 3497447 commit bf43a16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/sh/kernel/dwarf.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ static void dwarf_frame_alloc_regs(struct dwarf_frame *frame,
*/
static inline int dwarf_read_addr(unsigned long *src, unsigned long *dst)
{
*dst = get_unaligned(src);
u32 val = get_unaligned(src);
put_unaligned(val, dst);
return sizeof(unsigned long *);
}

Expand Down

0 comments on commit bf43a16

Please sign in to comment.