Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2713761pxj; Mon, 31 May 2021 08:55:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX5d+mt1DHsAD4BqvZO0zEOHhrKDltr8A9t83DhzmJ07MJAjVqGWWG3evBfmWvb6VjPn6l X-Received: by 2002:aa7:d786:: with SMTP id s6mr25756686edq.239.1622476502470; Mon, 31 May 2021 08:55:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622476502; cv=none; d=google.com; s=arc-20160816; b=Rr62phjmGDIMSd3/F+z+5Q6u2OQoRv4R6IHPGGaDoNe1/bAIO1OMBeVxb/DNidF4br xR6PV+441wSUY8+FtkIDMKhn91hU0VhkIC5qmAbo2PpIL2V2vHXzn+9DXsp3yE8NUjeo TjkZL2jjfUU0tIRPaKNSnpFpr4vpgQ6FMi58KUxrPDn6z06GiJCVnl+NjkOyhF3WxGQG Ptsm2Z9RsDh6PMxu1IjYbbxGPkD6Aqg16HF5kG28KQMDq/XJevZhsSvIAzA4Ifmnt1Xu f0dpIvj3QyvtNyXJJiVwhDYA7hnDDAH9Yz5ib3fYUL6rPkuYGwGzMBlLb7wOA4Cza8Rv wC/w== 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=DVFah7ybV/6/eMH2ec+LH9uNuY3nTGYvO8KrTk/UmoQ=; b=W105F7jvDeCLZvnDWnzDvK9SPMgkt9fDKDogHXZmYK70Mj0Vr4XyDPVx6AMPmDf/uN rGCDtlGuXDoosE8DufFmuBCP179KqVdhz88Kn3vlaZpAiUrC8BjasAlKHmXW4I5xJ7kr 9BvgxVMDjW46uGAJRwOcMLY8lTlNb0i5GTGjpOJdthO2RA5/o/kFOzJeGAOqLe+h1cOm bZ5TIEPeI3ISHPNUKfPZqGJQ/8/DwC1MD2xtm4vg7SMpucIPdRxXWrd7Xq17Z37ztL/R XFZWG0iuXN+Tq9ggkB+Q/UkALKDAegp4rrg67lHag9IG1Lqk9xClqZZcdCIDqUVQVD3g YFHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cZgEVpyM; 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 t8si14674210edi.510.2021.05.31.08.54.39; Mon, 31 May 2021 08:55:02 -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=cZgEVpyM; 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 S234098AbhEaPyp (ORCPT + 99 others); Mon, 31 May 2021 11:54:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:56128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233957AbhEaO33 (ORCPT ); Mon, 31 May 2021 10:29:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BCA3061C23; Mon, 31 May 2021 13:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468906; bh=ho8wNsWodGV8XUdzJfKNfzNnuCbo3ugXe/yK1a6pLyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cZgEVpyMGC4TPcocGcCq+Uxg8dEi2lkQ2kDZmzboPe8g/FSfP2BsJ6clP68Sloebe KZqdS3BDbn9u9z3jRlnsRNwpwvxqblGfTFzGm9+dAOB47z1rkeExXZaIKIm9WU/4Ea sgmgJSp3Q2MKSXpNQx3FtvqJEanpb0WwTTsVKOjI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 5.4 174/177] Revert "Revert "ALSA: usx2y: Fix potential NULL pointer dereference"" Date: Mon, 31 May 2021 15:15:31 +0200 Message-Id: <20210531130653.944213090@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 commit 27b57bb76a897be80494ee11ee4e85326d19383d upstream. This reverts commit 4667a6fc1777ce071504bab570d3599107f4790f. Takashi writes: I have already started working on the bigger cleanup of this driver code based on 5.13-rc1, so could you drop this revert? I missed our previous discussion about this, my fault for applying it. Reported-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/usb/usx2y/usb_stream.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/sound/usb/usx2y/usb_stream.c +++ b/sound/usb/usx2y/usb_stream.c @@ -91,7 +91,12 @@ static int init_urbs(struct usb_stream_k 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) ||