Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2704607pxj; Mon, 31 May 2021 08:40:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsQHhmMHH07A9nMJaWPeqtOfGxQvcc4AhmVXCXDwKd5QYsOYwar3SKeIbOd/6FXLKmuYAl X-Received: by 2002:a17:906:d967:: with SMTP id rp7mr9242255ejb.424.1622475613450; Mon, 31 May 2021 08:40:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622475613; cv=none; d=google.com; s=arc-20160816; b=1CbjvMwvpdomIjKsD9WkPXdN8RpVEHsXeP9bBvgLo0nON+1rDEREjjc4f4JOr+v/mQ V8LKoDG3RpppE3YkBXoHX/aEcQ5IdC/Mvect/hsl0+rPeLAFg8jEM3/dZZpMSBg60HDR y/2uryxwMFlQD2D4AsxM7Y279Mbi0Yfi2cr6DmV/L4hWoOjLSERIAQS7TLba5cd9R3d8 /Dk0jX8J0jfgPh3ULW9DtlWAs8QKL/0vb9hfSFsk5abrYzd0aU+63S9+vN/tcct6v8Qr fYdl8dm1YOPaewy5VWXL5T7KHI6klriDp8h+VHuzPkuzBxM5HY1iCW2wIWgaEJVhe2aO oAFA== 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=wqRCFxmIjrm9iQRNd/hf5eraHE3t+S1YvCghbHGH8DQ=; b=KiYvmKGs0ig34phQQYlaSsAPIO/uBpBM3IJTj050F3X6R3NQkDOHobWwIfGBuIhYaF 8+P3/hXUhMFkKwDPhn7bqzvg8DsdXkYXyEp2zz0PjPzd4obyTl/oPV2SJ5XRFjN03x+5 QucRFumUbFKMCtx2DwJ+jUjCAgssabDY/CSeglFINhfFJwxOUXFkr77ddo0BIc3SmtEx v4HP+iI0HPL/lY7i59XkadQZ7h99Kpq5JQs/RiJn9OxlPo6baOtRF5FU0cNODGN6QwKA W8u4sVeh/b7x8E5sNWzgeVD4aNu7k3JIw+hfsKqWroK3Qugo6oqtyQygADx+xMIHdCNg p7gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=13P3syLV; 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 k3si13890264eds.334.2021.05.31.08.39.51; Mon, 31 May 2021 08:40:13 -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=13P3syLV; 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 S234762AbhEaPjs (ORCPT + 99 others); Mon, 31 May 2021 11:39:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:48850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233861AbhEaOVb (ORCPT ); Mon, 31 May 2021 10:21:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 40CB0619CB; Mon, 31 May 2021 13:45:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468716; bh=YMUIRBqPsKnP1v3cJ/Dw9pNi02k97cYZ5bin7a9UhRc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=13P3syLVuRdV+IfHtmowW3KIvPcs0SszUqId4rfbukpLHkBkl4S7QawNyC3I7BQzi 74/jewcPkyMTx85amAztwOSfrV13yAQBULrYa6sCEKbZnBFXVSGn1oIv6Dl90dR1Fh qSUizHixHmkuDtenos5eq6bdTmY378i9mV9AJu5A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aditya Pakki , Takashi Iwai , Sasha Levin Subject: [PATCH 5.4 100/177] Revert "ALSA: usx2y: Fix potential NULL pointer dereference" Date: Mon, 31 May 2021 15:14:17 +0200 Message-Id: <20210531130651.352230755@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 4667a6fc1777ce071504bab570d3599107f4790f ] This reverts commit a2c6433ee5a35a8de6d563f6512a26f87835ea0f. 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. The original patch was incorrect, and would leak memory if the error path the patch added was hit. Cc: Aditya Pakki Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20210503115736.2104747-37-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- sound/usb/usx2y/usb_stream.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sound/usb/usx2y/usb_stream.c b/sound/usb/usx2y/usb_stream.c index 091c071b270a..6bba17bf689a 100644 --- a/sound/usb/usx2y/usb_stream.c +++ b/sound/usb/usx2y/usb_stream.c @@ -91,12 +91,7 @@ static int init_urbs(struct usb_stream_kernel *sk, unsigned use_packsize, for (u = 0; u < USB_STREAM_NURBS; ++u) { sk->inurb[u] = usb_alloc_urb(sk->n_o_ps, GFP_KERNEL); - if (!sk->inurb[u]) - return -ENOMEM; - sk->outurb[u] = usb_alloc_urb(sk->n_o_ps, GFP_KERNEL); - if (!sk->outurb[u]) - return -ENOMEM; } if (init_pipe_urbs(sk, use_packsize, sk->inurb, indata, dev, in_pipe) || -- 2.30.2