From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Alexey Klimov <alexey.klimov@arm.com>
Cc: linux-acpi@vger.kernel.org, jassisinghbrar@gmail.com,
sudeep.holla@arm.com, ashwin.chaugule@linaro.org,
pprakash@codeaurora.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] mailbox: pcc: fix channel calculation in get_pcc_channel()
Date: Wed, 03 Feb 2016 02:27:14 +0100 [thread overview]
Message-ID: <1501192.nRtmsTZae5@vostro.rjw.lan> (raw)
In-Reply-To: <1454412562-28543-1-git-send-email-alexey.klimov@arm.com>
On Tuesday, February 02, 2016 11:29:22 AM Alexey Klimov wrote:
> This patch fixes the calculation of pcc_chan for non-zero id.
> After the compiler ignores the (unsigned long) cast the
> pcc_mbox_channels pointer is type-cast and then the type-cast
> offset is added which results in address outside of the range
> leading to the kernel crashing.
>
> We might add braces and make it:
>
> pcc_chan = (struct mbox_chan *)
> ((unsigned long) pcc_mbox_channels +
> (id * sizeof(*pcc_chan)));
>
> but let's go with array approach here and use id as index.
>
> Tested on Juno board.
>
> Acked-by: Sudeep Holla <sudeep.holla@arm.com>
> Acked-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
> Signed-off-by: Alexey Klimov <alexey.klimov@arm.com>
Jassi said this was applied, so I'm not taking it.
Thanks,
Rafael
prev parent reply other threads:[~2016-02-03 1:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 11:29 Alexey Klimov
2016-02-03 1:27 ` Rafael J. Wysocki [this message]
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=1501192.nRtmsTZae5@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=alexey.klimov@arm.com \
--cc=ashwin.chaugule@linaro.org \
--cc=jassisinghbrar@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pprakash@codeaurora.org \
--cc=sudeep.holla@arm.com \
/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
all inboxes | Powered by JetHome®