Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1678859pxb; Fri, 10 Sep 2021 11:08:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBZqqF1JY7LGao23PMXBUfM9zMEEpjV15crNLNyTdCmc8clzCnl+STFfb5f6hd75YEKUzh X-Received: by 2002:a92:6907:: with SMTP id e7mr7223810ilc.301.1631297299097; Fri, 10 Sep 2021 11:08:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631297299; cv=none; d=google.com; s=arc-20160816; b=rE98XAcewR3PmDn/uXyVguBUSTLXavSnMa7zO+Naf9EfRW3UhvtOcILlAb7Zvd1gLB 8AiCotZpOnuBGOn8m6N7DpRzjqySFOCnCsVD5uv23v1aTL570HyZUvf0cpz+F+LfeVQA od3aqpTqmmLhchcYkTS3jQRn4ymtZT3Fr5SNq92mVRRRLOmDtTYRDOCJtNQnkkXnVEHN f51plG7FZav2QfywVFLRvjtNIWRFSeHrThfwc/osDj0u2az2UYmtiXuh6izg5vlOtcuM jqJ5HvO0Qi7pu5FStetTF9qUVMEApnvEnfr8M7jDyy11S6Id1dC2+W4rcMewVqNI+3G0 r3jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=jW448sTpnZDFN8QUPHirb3j8PtdVPnlNAfzumAnRlCg=; b=z0s6bZjwKUMIukp/KK/1gEsva9diEZy5BFAw3WRtmmxUFYBwWKw8i3pbp5wW8gB+hu cluV89eTR6EeOEAja0K+dhYC9+Kcdw5yES25Xpe9z+54qc2yMIlnTf/6Jbx00cuo/S/+ l2TtFIQjeXbf6kJqDTDnThUxQTkvi9LmVFDi5Iz452tkvjg0NHszGrOvJV6KrJKcQFDm 0Pdlgl/IQYfFUART1kKmMAg25YhFLh+vMEztTu6BorIW5o/Mfjp5LCcnVOa+DgUSDfjR H9AMwF6x/o6pG4ctDXwHrUf2M6z/0AvrDnZb8KbgbENFDWMKayTq8CPAgf121tWHD9xp jWow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=Sau4UFrV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l5si6342816jaj.63.2021.09.10.11.08.06; Fri, 10 Sep 2021 11:08:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=Sau4UFrV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230489AbhIJSHy (ORCPT + 99 others); Fri, 10 Sep 2021 14:07:54 -0400 Received: from mout.gmx.net ([212.227.17.21]:56217 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbhIJSHv (ORCPT ); Fri, 10 Sep 2021 14:07:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1631297194; bh=jW448sTpnZDFN8QUPHirb3j8PtdVPnlNAfzumAnRlCg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=Sau4UFrV1U7CBrV2HCXYodO7ioryBw4nIq8GJ1aaA8kqGW8lpg3L+MjQlvtGVDHXn wUkJNohBXkfHLtF0JztEhkYssG06zefT0J2BYPiPcslOfLp9sgJZklUrIxeF7CrRH+ XGxY1JOiQl7rixTkCThbeODPA2uS4X0uaW05SUYw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([46.223.119.124]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MI5QF-1mBqLm3a35-00FDr0; Fri, 10 Sep 2021 20:06:33 +0200 From: Lino Sanfilippo To: peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca Cc: p.rosenberger@kunbus.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, Lino Sanfilippo , stable@vger.kernel.org Subject: [PATCH] tpm: fix potential NULL pointer access in tpm_del_char_device() Date: Fri, 10 Sep 2021 20:04:51 +0200 Message-Id: <20210910180451.19314-1-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:0DM/eQqN4B/1MK1yjszEd9wMzscabNNp2hctTNBF7BDsN95RFlQ QWE+gJIP3x2739QCpvtIJzyyKQZIzXFtI+jVuMjK0ACVMwqJeyhljcXOjcafP4jygrwv5FG nFJdANsr9U5EmnW1j7ECFEpNwqp2bIDwvVO4VQMLeGWOcDscODIK9lUSI0ILISyt+yGZNGs AMYUpbrDi7PQlra3XfsEA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ddwqrUnKMt8=:c+XWJ89mC6OfwVzn2Fp3SF 3+8f26ajiFtiXxhy2grMmNV7HAVKIztaqu3nDu/fzeOruDBRnDbXB5GkHHjbB3hRZ4X55fEQS /pfw1aihg5hbhoCStwl1T5VjRVatXP2Qy9fULL2ZseY+w8gL0IYaLUhxRxZ4iVZGA2tdEv6Z/ batx1CS4Vvruaz/UnQb0w14eeJCAbdOH8or9yLAwPrdtTvvqMM8Ly9/0U/UH+8EQL7Wst/1m4 a89UlXwDXdPyBFYUI185mf54o2IOCn85gDP3r8N2eAyD8ZbJ3zpA2L0ZFrbZI3Q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