Patch "ipack: ipoctal: fix missing allocation-failure check" has been added to the 4.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ipack: ipoctal: fix missing allocation-failure check

to the 4.4-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:
     ipack-ipoctal-fix-missing-allocation-failure-check.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 445c8132727728dc297492a7d9fc074af3e94ba3 Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan@xxxxxxxxxx>
Date: Fri, 17 Sep 2021 13:46:20 +0200
Subject: ipack: ipoctal: fix missing allocation-failure check

From: Johan Hovold <johan@xxxxxxxxxx>

commit 445c8132727728dc297492a7d9fc074af3e94ba3 upstream.

Add the missing error handling when allocating the transmit buffer to
avoid dereferencing a NULL pointer in write() should the allocation
ever fail.

Fixes: ba4dc61fe8c5 ("Staging: ipack: add support for IP-OCTAL mezzanine board")
Cc: stable@xxxxxxxxxxxxxxx      # 3.5
Acked-by: Samuel Iglesias Gonsalvez <siglesias@xxxxxxxxxx>
Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20210917114622.5412-5-johan@xxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/ipack/devices/ipoctal.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/ipack/devices/ipoctal.c
+++ b/drivers/ipack/devices/ipoctal.c
@@ -391,7 +391,9 @@ static int ipoctal_inst_slot(struct ipoc
 
 		channel = &ipoctal->channel[i];
 		tty_port_init(&channel->tty_port);
-		tty_port_alloc_xmit_buf(&channel->tty_port);
+		res = tty_port_alloc_xmit_buf(&channel->tty_port);
+		if (res)
+			continue;
 		channel->tty_port.ops = &ipoctal_tty_port_ops;
 
 		ipoctal_reset_stats(&channel->stats);


Patches currently in stable-queue which might be from johan@xxxxxxxxxx are

queue-4.4/ipack-ipoctal-fix-stack-information-leak.patch
queue-4.4/ipack-ipoctal-fix-tty-registration-race.patch
queue-4.4/ipack-ipoctal-fix-module-reference-leak.patch
queue-4.4/usb-serial-option-add-device-id-for-foxconn-t99w265.patch
queue-4.4/usb-serial-cp210x-add-id-for-gw-instek-gdm-834x-digital-multimeter.patch
queue-4.4/net-hso-fix-muxed-tty-registration.patch
queue-4.4/usb-serial-mos7840-remove-duplicated-0xac24-device-id.patch
queue-4.4/ipack-ipoctal-fix-missing-allocation-failure-check.patch
queue-4.4/ipack-ipoctal-fix-tty-registration-error-handling.patch
queue-4.4/usb-serial-option-add-telit-ln920-compositions.patch
queue-4.4/usb-serial-option-remove-duplicate-usb-device-id.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux