Patch "mISDN: fix misuse of put_device() in mISDN_register_device()" has been added to the 4.19-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

    mISDN: fix misuse of put_device() in mISDN_register_device()

to the 4.19-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:
     misdn-fix-misuse-of-put_device-in-misdn_register_dev.patch
and it can be found in the queue-4.19 subdirectory.

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



commit eee1f7be1b4845a923bcb2459f7c38e49dfc854f
Author: Wang ShaoBo <bobo.shaobowang@xxxxxxxxxx>
Date:   Thu Nov 10 19:38:23 2022 +0800

    mISDN: fix misuse of put_device() in mISDN_register_device()
    
    [ Upstream commit 2d25107e111a85c56f601a5470f1780ec054e6ac ]
    
    We should not release reference by put_device() before calling device_initialize().
    
    Fixes: e7d1d4d9ac0d ("mISDN: fix possible memory leak in mISDN_register_device()")
    Signed-off-by: Wang ShaoBo <bobo.shaobowang@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/isdn/mISDN/core.c b/drivers/isdn/mISDN/core.c
index 5cd53b2c47c7..e542439f4950 100644
--- a/drivers/isdn/mISDN/core.c
+++ b/drivers/isdn/mISDN/core.c
@@ -231,7 +231,7 @@ mISDN_register_device(struct mISDNdevice *dev,
 
 	err = get_free_devid();
 	if (err < 0)
-		goto error1;
+		return err;
 	dev->id = err;
 
 	device_initialize(&dev->dev);



[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