This is a note to let you know that I've just added the patch titled pata_legacy: fix a couple uninitialized variable bugs to the 5.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: pata_legacy-fix-a-couple-uninitialized-variable-bugs.patch and it can be found in the queue-5.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 013923477cb311293df9079332cf8b806ed0e6f2 Mon Sep 17 00:00:00 2001 From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Date: Wed, 6 Oct 2021 10:34:19 +0300 Subject: pata_legacy: fix a couple uninitialized variable bugs From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> commit 013923477cb311293df9079332cf8b806ed0e6f2 upstream. The last byte of "pad" is used without being initialized. Fixes: 55dba3120fbc ("libata: update ->data_xfer hook for ATAPI") Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/ata/pata_legacy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c @@ -352,7 +352,8 @@ static unsigned int pdc_data_xfer_vlb(st iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); if (unlikely(slop)) { - __le32 pad; + __le32 pad = 0; + if (rw == READ) { pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr)); memcpy(buf + buflen - slop, &pad, slop); @@ -742,7 +743,8 @@ static unsigned int vlb32_data_xfer(stru ioread32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); if (unlikely(slop)) { - __le32 pad; + __le32 pad = 0; + if (rw == WRITE) { memcpy(&pad, buf + buflen - slop, slop); iowrite32(le32_to_cpu(pad), ap->ioaddr.data_addr); Patches currently in stable-queue which might be from dan.carpenter@xxxxxxxxxx are queue-5.14/iio-ssp_sensors-add-more-range-checking-in-ssp_parse_dataframe.patch queue-5.14/drm-msm-a3xx-fix-error-handling-in-a3xx_gpu_init.patch queue-5.14/pata_legacy-fix-a-couple-uninitialized-variable-bugs.patch queue-5.14/drm-msm-dsi-fix-off-by-one-in-dsi_bus_clk_enable-error-handling.patch queue-5.14/drm-msm-dsi-fix-an-error-code-in-msm_dsi_modeset_init.patch queue-5.14/block-rnbd-clt-sysfs-fix-a-couple-uninitialized-variable-bugs.patch queue-5.14/iio-ssp_sensors-fix-error-code-in-ssp_print_mcu_debug.patch queue-5.14/iio-dac-ti-dac5571-fix-an-error-code-in-probe.patch queue-5.14/drm-msm-a4xx-fix-error-handling-in-a4xx_gpu_init.patch