patch "staging: gigaset: fix illegal free on probe errors" added to staging-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
staging: gigaset: fix illegal free on probe errors
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 84f60ca7b326ed8c08582417493982fe2573a9ad Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Mon, 2 Dec 2019 09:56:09 +0100
Subject: staging: gigaset: fix illegal free on probe errors
The driver failed to initialise its receive-buffer pointer, something which could lead to an illegal free on late probe errors.
Fix this by making sure to clear all driver data at allocation.
--- drivers/staging/isdn/gigaset/usb-gigaset.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/staging/isdn/gigaset/usb-gigaset.c +1 -5
@@ -571,8 +571,7 @@ static int gigaset_initcshw(struct cardstate *cs) {struct usb_cardstate *ucs; - cs->hw.usb = ucs = -kmalloc (sizeof (struct usb_cardstate ),GFP_KERNEL ); + cs->hw.usb = ucs =kzalloc (sizeof (struct usb_cardstate ),GFP_KERNEL );if (!ucs) {pr_err ("out of memory\n" );return -ENOMEM ;
@@ -584,9 +583,6 @@ static int gigaset_initcshw(struct cardstate *cs) ucs->bchars[3 ] =0 ; ucs->bchars[4 ] =0x11 ; ucs->bchars[5 ] =0x13 ; - ucs->bulk_out_buffer =NULL ; - ucs->bulk_out_urb =NULL ; - ucs->read_urb =NULL ;tasklet_init (&cs->write_tasklet, gigaset_modem_fill, (unsigned long ) cs);
Signature · 1 line
2.24.0