From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
Cc: linux-serial@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>,
stable@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty/n_gsm: fix bug in CRC calculation for gsm1 mode
Date: Thu, 31 Mar 2011 13:11:44 +0100 [thread overview]
Message-ID: <20110331131144.74a579db@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <1301184300-9158-1-git-send-email-mikhail.kshevetskiy@gmail.com>
On Sun, 27 Mar 2011 04:05:00 +0400
Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com> wrote:
> Problem description:
> gsm_queue() calculate a CRC for arrived frames. As a last step of
> CRC calculation it call
>
> gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs);
>
> This work perfectly for the case of GSM0 mode as gsm->received_fcs
> contain the last piece of data required to generate final CRC.
>
> gsm->received_fcs is not used for GSM1 mode. Thus we put an
> additional byte to CRC calculation. As result we get a wrong CRC
> and reject incoming frame.
>
> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
(This wants cleaning up better as Mikhael also says but this patch is
clear and unlike a big clean up a better base point for a stable fix and
can be reworked further)
prev parent reply other threads:[~2011-03-31 12:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-27 0:05 Mikhail Kshevetskiy
2011-03-27 13:30 ` Alan Cox
2011-03-27 17:33 ` Mikhail Kshevetskiy
2011-03-31 12:11 ` Alan Cox [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=20110331131144.74a579db@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mikhail.kshevetskiy@gmail.com \
--cc=stable@kernel.org \
/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®