aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy.c
diff options
context:
space:
mode:
authorEkansh Gupta <[email protected]>2023-08-11 12:56:42 +0100
committerGreg Kroah-Hartman <[email protected]>2023-08-22 16:00:20 +0200
commita2cb9cd6a3949a3804ad9fd7da234892ce6719ec (patch)
treec93da28a67fd636680ef5099fe389b8837862c2b /lib/test_fortify/write_overflow-strncpy.c
parentada6c2d99aedd1eac2f633d03c652e070bc2ea74 (diff)
misc: fastrpc: Fix incorrect DMA mapping unmap request
Scatterlist table is obtained during map create request and the same table is used for DMA mapping unmap. In case there is any failure while getting the sg_table, ERR_PTR is returned instead of sg_table. When the map is getting freed, there is only a non-NULL check of sg_table which will also be true in case failure was returned instead of sg_table. This would result in improper unmap request. Add proper check before setting map table to avoid bad unmap request. Fixes: c68cfb718c8f ("misc: fastrpc: Add support for context Invoke method") Cc: stable <[email protected]> Signed-off-by: Ekansh Gupta <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy.c')
0 files changed, 0 insertions, 0 deletions