[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1510339445.3735.10.camel@redhat.com>
Date: Fri, 10 Nov 2017 13:44:05 -0500
From: Doug Ledford <dledford@...hat.com>
To: Thomas Bogendoerfer <tbogendoerfer@...e.de>,
Moni Shoua <monis@...lanox.com>, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] IB/rxe: don't crash, if allocation of crc algorithm
failed
On Tue, 2017-10-31 at 11:16 +0100, Thomas Bogendoerfer wrote:
> Following crash happens, if crc algorithm couldn't be allocated:
>
> [ 1087.989072] rdma_rxe: loaded
> [ 1097.855397] PCLMULQDQ-NI instructions are not detected.
> [ 1097.901220] rdma_rxe: failed to allocate crc algorithmi err:-2
> [ 1097.901248] BUG: unable to handle kernel
> [ 1097.901249] NULL pointer dereference
> [ 1097.901250] at 0000000000000046
> [...]
>
> Reason is that rxe->tfm is assigned the error return, which will then
> be used for crypto_free_shash() in rxe_cleanup. Fix by using a
> temporary variable and assigning it rxe->tfm after allocation succeeded.
>
> Fixes: cee2688e3cd6 ("IB/rxe: Offload CRC calculation when possible")
> Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@...e.de>
Thanks, applied.
--
Doug Ledford <dledford@...hat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists