]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - drivers/isdn/hisax/hfc_pci.c
isdn: hisax: hfc_pci: Fix a possible concurrency use-after-free bug in HFCPCI_l1hw()
[mirror_ubuntu-focal-kernel.git] / drivers / isdn / hisax / hfc_pci.c
index 5b719b561860c630508e337b9be367a5aa7e3547..81dd465afcf411d1bea0422f27daed2b1c2c5594 100644 (file)
@@ -1169,11 +1169,13 @@ HFCPCI_l1hw(struct PStack *st, int pr, void *arg)
                if (cs->debug & L1_DEB_LAPD)
                        debugl1(cs, "-> PH_REQUEST_PULL");
 #endif
+               spin_lock_irqsave(&cs->lock, flags);
                if (!cs->tx_skb) {
                        test_and_clear_bit(FLG_L1_PULL_REQ, &st->l1.Flags);
                        st->l1.l1l2(st, PH_PULL | CONFIRM, NULL);
                } else
                        test_and_set_bit(FLG_L1_PULL_REQ, &st->l1.Flags);
+               spin_unlock_irqrestore(&cs->lock, flags);
                break;
        case (HW_RESET | REQUEST):
                spin_lock_irqsave(&cs->lock, flags);