Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2685739pxj; Mon, 31 May 2021 08:13:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvJIEXv6shz49E47Ae3EZshR/XsvG/fP+/qV15QFXnC2OoaVeDTA+0WDvtpFt9WDpKHZ9/ X-Received: by 2002:a05:6402:176b:: with SMTP id da11mr26895550edb.234.1622474039047; Mon, 31 May 2021 08:13:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622474039; cv=none; d=google.com; s=arc-20160816; b=gZFv4Lt4ILL67M8/npbqqN9QEehFERQaMewQZw+3USdcexa+pGRJpe1LWWVLYaClkc VmwSCOM6nHav19gC2UDSLcXc91yo4sR9ZMy8ldoof4KggxbpciyoSbZr6/f4qqo/n9vc YNKN8WGMAGsBOAvu3jy0avFT7uFrT9mfSN4lGoM8mX5EOPF5f0u+v08GVgBnORN4tv// OkL7VSv3a8+3tBIx3Eo+vZM+rJEdCi+ZEUKwOyqakczfGTkfL3R/TC3GJCJuldtQEWE8 6r5pcFrWrtdIa1P9/qN6GyeIN6VoZhdpQtRUao/tGOBjAnZyuNGNcxdYSF/2yNRjinMy 3g6A== 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=vmRVgX+ZUoJr27akFb0e+OCUUjy5w33IRxcEQjXdGT69aDQbU9ZvsevJiUUr0h6oqT UVTqSxAcz0aAm3ODxAGsd8M1fiZn1WF/ahXo1nJ/8YYVznVkv1yoYwdkTkoWWoSiLndD 6vdMUi4Lu2bEwNlWIS2jWA8LPMV8tfWbYo+tptblxxwBzcyZQjRMXYOnk6htKtGtDBp4 UvpnhVO8s2+8VbIFGE+B2qNOxjrdu9NrwRmH6tTzHLcyNLKJveTrxFoaNXtzJwwX6vGq PRCGLwOs26Bs+hzbkTfWrk/pq5u7EoESdeUGwOS/g4aBLWWOBMu8A3N6CDMKz7dDba3m LjAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Mfmmq4YQ; 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 hs26si11348629ejc.307.2021.05.31.08.13.35; Mon, 31 May 2021 08:13:59 -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=Mfmmq4YQ; 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 S233487AbhEaPMS (ORCPT + 99 others); Mon, 31 May 2021 11:12:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:40026 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232964AbhEaOK5 (ORCPT ); Mon, 31 May 2021 10:10:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 06E976197E; Mon, 31 May 2021 13:40:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468454; bh=ho8wNsWodGV8XUdzJfKNfzNnuCbo3ugXe/yK1a6pLyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mfmmq4YQ8SAMsTofxShQ5oCo4jNG5SwECSTx+L9ufax4qGjLkuGh5SlTsSatlOvU2 t98ZYxAFzhEtq40DHAplX5pFjHKd5f6LRu7EcbdL54MM9zhbg8B2GbbCTZV0Q/fqEl W6GWmMrj+hkg3srGDl8tEELHOnWnlgtjpX/Spqrs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 5.10 248/252] Revert "Revert "ALSA: usx2y: Fix potential NULL pointer dereference"" Date: Mon, 31 May 2021 15:15:13 +0200 Message-Id: <20210531130706.422623619@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@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) ||