Patch "net: wan: Add checks for NULL for utdm in undo_uhdlc_init and unmap_si_regs" has been added to the 5.10-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

    net: wan: Add checks for NULL for utdm in undo_uhdlc_init and unmap_si_regs

to the 5.10-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:
     net-wan-add-checks-for-null-for-utdm-in-undo_uhdlc_i.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 5b926926da3b94c24afa369f2d2d67abe8c5d2cc
Author: Esina Ekaterina <eesina@xxxxxxxxxxxxx>
Date:   Thu Jan 12 10:47:03 2023 +0300

    net: wan: Add checks for NULL for utdm in undo_uhdlc_init and unmap_si_regs
    
    [ Upstream commit 488e0bf7f34af3d42d1d5e56f7a5a7beaff188a3 ]
    
    If uhdlc_priv_tsa != 1 then utdm is not initialized.
    And if ret != NULL then goto undo_uhdlc_init, where
    utdm is dereferenced. Same if dev == NULL.
    
    Found by Astra Linux on behalf of Linux Verification Center
    (linuxtesting.org) with SVACE.
    
    Fixes: 8d68100ab4ad ("soc/fsl/qe: fix err handling of ucc_of_parse_tdm")
    Signed-off-by: Esina Ekaterina <eesina@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230112074703.13558-1-eesina@xxxxxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index 7eac6a3e1cde..ae1ae65e7f90 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -1245,9 +1245,11 @@ static int ucc_hdlc_probe(struct platform_device *pdev)
 free_dev:
 	free_netdev(dev);
 undo_uhdlc_init:
-	iounmap(utdm->siram);
+	if (utdm)
+		iounmap(utdm->siram);
 unmap_si_regs:
-	iounmap(utdm->si_regs);
+	if (utdm)
+		iounmap(utdm->si_regs);
 free_utdm:
 	if (uhdlc_priv->tsa)
 		kfree(utdm);



[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