From: Wolfram Sang <wsa@the-dreams.de>
To: Hsin-Yi Wang <hsinyi@chromium.org>
Cc: Ryder Lee <ryder.lee@mediatek.com>,
Jun Gao <jun.gao@mediatek.com>,
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-i2c@vger.kernel.org,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] i2c: mediatek: modify threshold passed to i2c_get_dma_safe_msg_buf()
Date: Sat, 9 Mar 2019 10:42:36 +0100 [thread overview]
Message-ID: <20190309094236.GA1340@kunai> (raw)
In-Reply-To: <20190215090202.157100-1-hsinyi@chromium.org>
[-- Attachment #1.1: Type: text/plain, Size: 629 bytes --]
On Fri, Feb 15, 2019 at 05:02:02PM +0800, Hsin-Yi Wang wrote:
> i2c_get_dma_safe_msg_buf() allocates space based on msg->len. If threshold is
> 0 and msg->len is also 0, function makes zero-length allocation, which returns
> a special ZERO_SIZE_PTR instead of a NULL pointer, and this will cause later
> code to fail. Modify the threshold to > 0 so the function returns NULL pointer.
>
> Fixes: fc66b39fe36a ("i2c: mediatek: Use DMA safe buffers for i2c transactions")
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reworded commit message to "HW doesn't support 0 length" and applied to
for-current, thanks!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@the-dreams.de>
To: Hsin-Yi Wang <hsinyi@chromium.org>
Cc: linux-arm-kernel@lists.infradead.org,
Matthias Brugger <matthias.bgg@gmail.com>,
Jun Gao <jun.gao@mediatek.com>,
Ryder Lee <ryder.lee@mediatek.com>,
linux-i2c@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: mediatek: modify threshold passed to i2c_get_dma_safe_msg_buf()
Date: Sat, 9 Mar 2019 10:42:36 +0100 [thread overview]
Message-ID: <20190309094236.GA1340@kunai> (raw)
In-Reply-To: <20190215090202.157100-1-hsinyi@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 629 bytes --]
On Fri, Feb 15, 2019 at 05:02:02PM +0800, Hsin-Yi Wang wrote:
> i2c_get_dma_safe_msg_buf() allocates space based on msg->len. If threshold is
> 0 and msg->len is also 0, function makes zero-length allocation, which returns
> a special ZERO_SIZE_PTR instead of a NULL pointer, and this will cause later
> code to fail. Modify the threshold to > 0 so the function returns NULL pointer.
>
> Fixes: fc66b39fe36a ("i2c: mediatek: Use DMA safe buffers for i2c transactions")
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reworded commit message to "HW doesn't support 0 length" and applied to
for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-03-09 9:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-15 9:02 [PATCH] i2c: mediatek: modify threshold passed to i2c_get_dma_safe_msg_buf() Hsin-Yi Wang
2019-02-15 9:02 ` Hsin-Yi Wang
2019-02-15 9:09 ` Wolfram Sang
2019-02-15 9:09 ` Wolfram Sang
2019-02-15 9:17 ` Hsin-Yi Wang
2019-02-15 9:17 ` Hsin-Yi Wang
2019-02-15 9:25 ` Wolfram Sang
2019-02-15 9:25 ` Wolfram Sang
2019-02-15 16:36 ` Wolfram Sang
2019-02-15 16:36 ` Wolfram Sang
2019-02-22 6:04 ` Hsin-Yi Wang
2019-02-22 6:04 ` Hsin-Yi Wang
2019-03-08 11:29 ` Wolfram Sang
2019-03-08 11:29 ` Wolfram Sang
2019-03-08 14:39 ` Hsin-Yi Wang
2019-03-08 14:39 ` Hsin-Yi Wang
2019-03-08 14:52 ` Wolfram Sang
2019-03-08 14:52 ` Wolfram Sang
2019-03-08 16:22 ` Hsin-Yi Wang
2019-03-08 16:22 ` Hsin-Yi Wang
2019-03-09 9:42 ` Wolfram Sang [this message]
2019-03-09 9:42 ` Wolfram Sang
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=20190309094236.GA1340@kunai \
--to=wsa@the-dreams.de \
--cc=hsinyi@chromium.org \
--cc=jun.gao@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=ryder.lee@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.