Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2698170pxy; Mon, 3 May 2021 06:11:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGXHvIDpHpyBpuyHUAk+VqLHen3k2HYtdL+k1LQZt3YOvyvtSjat5y2fZgUWTNxgcZXwj8 X-Received: by 2002:a17:90a:6c88:: with SMTP id y8mr21980747pjj.38.1620047464311; Mon, 03 May 2021 06:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620047464; cv=none; d=google.com; s=arc-20160816; b=GNPfJnz6+kS7DMWrWmgcEMv65F5azEsprPUoHhGHoCjKQwegmPeA6CLzmXBbmnnd1F 2tNACzEcTnpGv4p2IlScKyAUPABIevIssvXzGlZZcfRJNKDnzAF53dB5k902DhRSOSvV RJyEpz0QTJIPoL/05AsTcPO7wzwYMPkQjLOvieFgb5tS16r8Vrph/KPB4FAREEtvFLCw I6QGXN00ewlzLhawQ0KXWHSkMMGL0Ct0sRt3h23X5TefneAC8WhYgM0cNgGQ5x85NslP 0F5u+RO+zTv+s6pgLSbC199ibPj79M2JmTgu7wspylgBZeb0ZYaiNDupawz+6Gbv1DlX 0kqA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=w90ijdk5yMpuVV+O7LKSwiOTuP3SvqfLJjtH/IOgbVs=; b=B9WGAr8Wk+Rd+SOZPv40t2+4+L+m6iFg20HQoVORA25G8xK6EdaqMkoTTZyJS62zXC rTruszb6dMQnwFP/zPSPWG9KQZzcLPzRnQ9gyH1DPr/LQETqkcFIbYjO7RCYg6/CYlHp BCbABIc5s5wCSa5HYTCZl1pBKiDesCOXKs1hrsayaj7yvbBXvmMyN3WTnGVzsubNx7CG XGLp3GI5es1okoy+HewoxztK3f68AKM7T0QlVO2t0CjjrDAfInAJpAonW7YONbNPbvcX 14Mq2QZbYsamHdh8jEHoDLzydd2ZJtU34i8kNDnvke241GNshgwMnRuhpNNnE2kw+S92 Q3Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xqGzYE5Y; 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 j20si404974pfj.243.2021.05.03.06.10.51; Mon, 03 May 2021 06:11:04 -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=xqGzYE5Y; 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 S233514AbhECMC0 (ORCPT + 99 others); Mon, 3 May 2021 08:02:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:35614 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233859AbhECMBc (ORCPT ); Mon, 3 May 2021 08:01:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DB3736135C; Mon, 3 May 2021 12:00:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620043239; bh=8aOesSRRzC/9sXnysEQLXQSSW6ON4VuzsL7fpPYSE8M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xqGzYE5Ymu9vcVJelDaHNYVrIwMx7CijK6blDQTv5+ce2DPvCDSdnzHLdCmmHsyRD 6HrNWcQfUs/NJ02LPHVgO5XQsbt9FO24GNDminRcjAtF0uLo1uZVPZ5xbjpbWOc7iP 5FLOs0+tZBdvbcDJKLOpRaleid51rYtRWls5orQ0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Aditya Pakki , Takashi Iwai Subject: [PATCH 36/69] Revert "ALSA: usx2y: Fix potential NULL pointer dereference" Date: Mon, 3 May 2021 13:57:03 +0200 Message-Id: <20210503115736.2104747-37-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210503115736.2104747-1-gregkh@linuxfoundation.org> References: <20210503115736.2104747-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Greg Kroah-Hartman --- 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.31.1