netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Aditya Pakki <pakki001@umn.edu>,
	"David S . Miller" <davem@davemloft.net>,
	Sasha Levin <sashal@kernel.org>,
	netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.10 23/62] Revert "isdn: mISDN: Fix potential NULL pointer dereference of kzalloc"
Date: Mon, 24 May 2021 10:47:04 -0400	[thread overview]
Message-ID: <20210524144744.2497894-23-sashal@kernel.org> (raw)
In-Reply-To: <20210524144744.2497894-1-sashal@kernel.org>

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

[ 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 <pakki001@umn.edu>
Cc: David S. Miller <davem@davemloft.net>
Link: https://lore.kernel.org/r/20210503115736.2104747-47-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 70061991915a..4bb470d3963d 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


  parent reply	other threads:[~2021-05-24 14:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210524144744.2497894-1-sashal@kernel.org>
2021-05-24 14:46 ` [PATCH AUTOSEL 5.10 08/62] Revert "net: fujitsu: fix a potential NULL pointer dereference" Sasha Levin
2021-05-24 14:46 ` [PATCH AUTOSEL 5.10 09/62] net: fujitsu: fix potential null-ptr-deref Sasha Levin
2021-05-24 14:46 ` [PATCH AUTOSEL 5.10 10/62] Revert "net/smc: fix a NULL pointer dereference" Sasha Levin
2021-05-24 14:46 ` [PATCH AUTOSEL 5.10 11/62] net/smc: properly handle workqueue allocation failure Sasha Levin
2021-05-24 14:46 ` [PATCH AUTOSEL 5.10 12/62] Revert "net: caif: replace BUG_ON with recovery code" Sasha Levin
2021-05-24 14:46 ` [PATCH AUTOSEL 5.10 13/62] net: caif: remove BUG_ON(dev == NULL) in caif_xmit Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 19/62] Revert "isdn: mISDNinfineon: fix potential NULL pointer dereference" Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 20/62] isdn: mISDNinfineon: check/cleanup ioremap failure correctly in setup_io Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 21/62] Revert "ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()" Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 22/62] ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd() Sasha Levin
2021-05-24 14:47 ` Sasha Levin [this message]
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 24/62] isdn: mISDN: correctly handle ph_info allocation failure in hfcsusb_ph_info Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 27/62] Revert "libertas: add checks for the return value of sysfs_create_group" Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 28/62] libertas: register sysfs groups properly Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 39/62] Revert "net: liquidio: fix a NULL pointer dereference" Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 40/62] net: liquidio: Add missing null pointer checks Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 41/62] Revert "brcmfmac: add a check for the status of usb_register" Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 42/62] brcmfmac: properly check for bus register errors Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210524144744.2497894-23-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pakki001@umn.edu \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).