Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2704630pxj; Mon, 31 May 2021 08:40:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3f+GYWBy+vdh/NwcTS1VK4pdV5dTdhZXTAL8iDhMDvr+qgW3SVGoYx8niK9XJH6B6+zOa X-Received: by 2002:a6b:4f1a:: with SMTP id d26mr16296504iob.85.1622475616134; Mon, 31 May 2021 08:40:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622475616; cv=none; d=google.com; s=arc-20160816; b=Mb2zWaw3QTadmqUwp4HpzRGSZYfhLIz1dwVodaYzxFkGWeZl6AXzkZatj56RtWgvn2 8twjntX/5YCEzxhdqGrno0t2y8sKKfqRuOg6RaKloWy4UGS1bi2wO3fJ1hqa8kS5IC7U 4gWI3N/Z9tNCZa+5WHQtBunm6CisnKEFNM9GSgCiPqZYMFnGJwdYJdvHShmrY9bB1Pzz rR7LHS2ENahH9AYXNMeIzGo3j/7LjrFz9kcxS6ZwdjVpBTL6Kp9lbj4+iWDF4bh+pcJi RxPXamyfQpaDBMsbnLUqEvLlzz6pW5vTdppB3QRfGWRLyROuIMEJd6sna1bFSwmjh8Ai bcQA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hYRae5aSlXrBD507AxbK7kGBaUOExhNhhisGXoJICVY=; b=LFgqESU6am6RzSAn+hpoQHLrqIRKn407+hd/JSzEOjlX1wkEVsjxThCStB3EelNCWl ZW+GZntdfY60idejbmgnRj18CDKef3CxUgYQkTOgfJUX03ARbBcgqNnvpTUcT1jFuhvp XlvpTaoQGfojPt+EAe6S7BAehe3bVULFlqGjl+uvUKfRFCNK4zutO5ixZ+tpvZBe5H0c ZoMaKaoDcXkfV86RpfkM05G/SU5hZzQhgdY2k80psUWc4psWUUxCCJMK3R/3f6zErOsP XsugNuoPG7EQU/zm4qmZTImhT5W+yhCF4O7CSCQXVa62iZVFOAU16T1ONmUVuNarFmlc mrug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tO1KIbYj; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m9si7010125ilg.125.2021.05.31.08.40.03; Mon, 31 May 2021 08:40:16 -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=@linuxfoundation.org header.s=korg header.b=tO1KIbYj; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231938AbhEaPkz (ORCPT + 99 others); Mon, 31 May 2021 11:40:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:47636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232997AbhEaOXC (ORCPT ); Mon, 31 May 2021 10:23:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 45818619CD; Mon, 31 May 2021 13:45:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468730; bh=V+Ak+bq9QckCL6JpOKpd2weyQMBPabw2Ue2S46kTYZ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tO1KIbYjtXXCOKsSqkXLRh3CStrmdBZkh+WSHrDntyporMBc3Em8TMuP8skdSB7Ml hDiUX5CW5l9IGQUqFpk3cnGcN6TGlR6rhW4xyZMe8ov6Qtmh0yfkXAcQSXwtMbqMVd 5bx8vfef+YnEaHPMWzmGrSMDNkP2e4eyILhbalqk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aditya Pakki , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 105/177] Revert "isdn: mISDN: Fix potential NULL pointer dereference of kzalloc" Date: Mon, 31 May 2021 15:14:22 +0200 Message-Id: <20210531130651.539613736@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130647.887605866@linuxfoundation.org> References: <20210531130647.887605866@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman [ Upstream commit 36a2c87f7ed9e305d05b9a5c044cc6c494771504 ] This reverts commit 38d22659803a033b1b66cd2624c33570c0dde77d. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. While it looks like the original change is correct, it is not, as none of the setup actually happens, and the error value is not propagated upwards. Cc: Aditya Pakki Cc: David S. Miller Link: https://lore.kernel.org/r/20210503115736.2104747-47-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/isdn/hardware/mISDN/hfcsusb.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c index 008a74a1ed44..7a051435c406 100644 --- a/drivers/isdn/hardware/mISDN/hfcsusb.c +++ b/drivers/isdn/hardware/mISDN/hfcsusb.c @@ -249,9 +249,6 @@ hfcsusb_ph_info(struct hfcsusb *hw) int i; phi = kzalloc(struct_size(phi, bch, dch->dev.nrbchan), GFP_ATOMIC); - if (!phi) - return; - phi->dch.ch.protocol = hw->protocol; phi->dch.ch.Flags = dch->Flags; phi->dch.state = dch->state; -- 2.30.2