]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
Input: synaptics-rmi4 - fix an unchecked out of memory error path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 6 Apr 2018 22:36:11 +0000 (15:36 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 12:54:49 +0000 (14:54 +0200)
commitbe13bd0b632c959a1d41cd3ce251c9ab4936cc64
treeb5ae31b60d4d62597ecec7469668917b63738ab5
parentde00ac38d3c9d8179698fd19c1395555b98d687b
Input: synaptics-rmi4 - fix an unchecked out of memory error path

BugLink: http://bugs.launchpad.net/bugs/1794889
[ Upstream commit 839c42273617787318da7baf6151d553108f5e17 ]

When extending the rmi_spi buffers, we must check that no out of memory
error occurs, otherwise we may access data above the currently allocated
memory.

Propagate the error code returned by 'rmi_spi_manage_pools()' instead.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Andrew Duggan <aduggan@synaptics.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/input/rmi4/rmi_spi.c