Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: DongCV <cv-dong@jinso.co.jp>,
	broonie@kernel.org, geert+renesas@glider.be,
	linux-spi@vger.kernel.org
Cc: kuninori.morimoto.gx@renesas.com,
	yoshihiro.shimoda.uh@renesas.com, ryusuke.sakato.bx@renesas.com,
	linux-renesas-soc@vger.kernel.org, nv-dung@jinso.co.jp,
	h-inayoshi@jinso.co.jp, cm-hiep@jinso.co.jp
Subject: Re: [PATCH 1/2] spi: rspi: Fixes bogus received byte in qspi_transfer_in()
Date: Wed, 15 Feb 2017 15:17:52 +0300	[thread overview]
Message-ID: <f54e33bf-a320-54c9-c4b2-2db3ded0e99e@cogentembedded.com> (raw)
In-Reply-To: <1487155852-12102-2-git-send-email-cv-dong@jinso.co.jp>

On 02/15/2017 01:50 PM, DongCV wrote:

> In qspi_transfer_in(), when receiving the last n (or len) bytes of data,
> one bogus byte was written in the receive buffer.
> This code leads to a buffer overflow.
>
> "jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
> at 0x03b40000: 0x1900 instead
> jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
> at 0x03b40004: 0x000c instead"
>
> The error message above happens when trying to mount, unmount,
> and remount a jffs2-formatted device.
> This patch removed the bogus write to fixes: 3be09bec42a800d4
> "spi: rspi: supports 32bytes buffer for DUAL and QUAD"

    You were just asked to add the following tag to the patch (e.g. before 
your signoff):

Fixes: 3be09bec42a8 ("spi: rspi: supports 32bytes buffer for DUAL and QUAD")

This simplifies the propagation of the patch to the -stable releases...

> And here is Geert's comment:
>
> "spi: rspi: Fix bogus received byte in qspi_transfer_in()
> When there are less than QSPI_BUFFER_SIZE remaining bytes to be received,
> qspi_transfer_in() writes one bogus byte in the receive buffer, possibly
> leading to a buffer overflow.
> This can be reproduced by mounting, unmounting, and remounting a
> jffs2-formatted device, causing lots of warnings like:
>
> "jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
> at 0x03b40000: 0x1900 instead"
>
> Remove the bogus write to fix this. "

    I don't think effectively duplicating your patch description makes sense here.

> Signed-off-by: DongCV <cv-dong@jinso.co.jp>

    Need full name here.

> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
[...]

MBR, Sergei

  reply	other threads:[~2017-02-15 12:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 10:50 [PATCH 0/2 v4] spi: rspi: Fixes bogus received byte and replaces "n" by "len" DongCV
2017-02-15 10:50 ` [PATCH 1/2] spi: rspi: Fixes bogus received byte in qspi_transfer_in() DongCV
2017-02-15 12:17   ` Sergei Shtylyov [this message]
2017-02-15 10:50 ` [PATCH 2/2] spi: rspi: Replaces "n" by "len" in qspi_transfer_*() DongCV
2017-02-15 12:17   ` Geert Uytterhoeven
2017-02-16 19:05   ` Applied "spi: rspi: Replaces "n" by "len" in qspi_transfer_*()" to the spi tree Mark Brown

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=f54e33bf-a320-54c9-c4b2-2db3ded0e99e@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=broonie@kernel.org \
    --cc=cm-hiep@jinso.co.jp \
    --cc=cv-dong@jinso.co.jp \
    --cc=geert+renesas@glider.be \
    --cc=h-inayoshi@jinso.co.jp \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=nv-dung@jinso.co.jp \
    --cc=ryusuke.sakato.bx@renesas.com \
    --cc=yoshihiro.shimoda.uh@renesas.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