]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/wan/fsl_ucc_hdlc: reject muram offsets above 64K
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 28 Nov 2019 14:55:51 +0000 (15:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Feb 2020 14:42:23 +0000 (15:42 +0100)
commita65c9f767042f737a95bc50f97169b1ef30be4be
treefbad4e6fc816e02b722e28c50e4687a5f48c6e98
parentb8584429a36db64345a272c9d58dc28baa641d2f
net/wan/fsl_ucc_hdlc: reject muram offsets above 64K

[ Upstream commit 148587a59f6b85831695e0497d9dd1af5f0495af ]

Qiang Zhao points out that these offsets get written to 16-bit
registers, and there are some QE platforms with more than 64K
muram. So it is possible that qe_muram_alloc() gives us an allocation
that can't actually be used by the hardware, so detect and reject
that.

Reported-by: Qiang Zhao <qiang.zhao@nxp.com>
Reviewed-by: Timur Tabi <timur@kernel.org>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wan/fsl_ucc_hdlc.c