Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp632511iog; Mon, 13 Jun 2022 09:31:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwqA6777KvmzX1cqb/e8kPTUC6doeQZljd+5VwqvdBeH6/Zz70UHvCDNjJj7R4L7VpuPl2 X-Received: by 2002:a05:6a00:84e:b0:51c:43a4:f351 with SMTP id q14-20020a056a00084e00b0051c43a4f351mr395824pfk.86.1655137916097; Mon, 13 Jun 2022 09:31:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655137916; cv=none; d=google.com; s=arc-20160816; b=GCNnnTN1MPW4EZ5Ft/9UHHfjBYCMMJ2BaIc0IdHU6xqndnGjJTe/mz57yIHGwwkDJh MIayd6U6ETLPeZwffowyb7dIxWGvQwZbd00GF02MebodOb/UiasRfFcQnIcimTcPWF7p udUjE5AxmfmwhZnXOpUf3qiBYGYsLsz20ViURefZWd4nV453rQvv0krL+eEHwRFRAblt AdEO6ZFMIniA5kvvFSJDaFjh24WFEhJUKGrXRpfC3QU/npaWnFYDI24fYqm1cJNYzUjM V0jN3nP9/UItLHPcWP+He75pWfpx0sGBJd9P2YV2WYXBXj5ngrCXuRyqEvgiu7UM8yd7 CNnA== 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=MCYLiST6kKElJTM2f5UaA+dnrNpASgYSWcSV7exa8PY=; b=b3CaAAZwl7nquzet6s4sNfKQXT1UPqThW9ep4SoznMxtSPGE68j9UpFFQeHrvPqr7F b2XwWJdYzcXsE/tjwHbDuSJ03rP3SOTh5VQRxG3SigiPzy3ImoN8/+xzaiJulr2L6Zt+ iM1rs/dUgzcIdsKih2zdFWRygESOHGrJuNInuvRakBx7pA/NqW0rkW7Pa0BfNI1+OcTr qeEUh8kdJ5RpdMNcUpNN6Ias/05M13DCHdPpG2ipmlCwAqAtiCjR9iCgVilIAfSasLfK HQSKeeO70/TI8inLcSHyMaFLDCVwd1Q2cU6tfeQpuHlzoR2G9304AsY4CRz54nQkoHgH NEKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qNu0dN92; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r83-20020a632b56000000b003fc4d7e5410si10152570pgr.850.2022.06.13.09.31.43; Mon, 13 Jun 2022 09:31:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qNu0dN92; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1356711AbiFMLu4 (ORCPT + 99 others); Mon, 13 Jun 2022 07:50:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357000AbiFMLpT (ORCPT ); Mon, 13 Jun 2022 07:45:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBB1D4990D; Mon, 13 Jun 2022 03:51:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E7F83611B3; Mon, 13 Jun 2022 10:51:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06B23C34114; Mon, 13 Jun 2022 10:51:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655117491; bh=1VUA0cPwHrZpHe5xpepOfsqAMeMYOWh+2QgQ3qGUM4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qNu0dN92692UA3xP2jlfQfl0KMyYey+wed3Tupg0bvWJNjCF7lCxepi44SMVL/Fqm Putnf5fiodymOQbnRO1vkLAX0GwzS/vGWOpIlQ7hnNjpyfBoGb9qUWbVADyqfujyCF h4hTqJic0MPqEPjN0RcxrLn67J9xsjjFYiy7gahs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shuah Khan , Sasha Levin Subject: [PATCH 5.4 377/411] misc: rtsx: set NULL intfdata when probe fails Date: Mon, 13 Jun 2022 12:10:50 +0200 Message-Id: <20220613094939.978003114@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shuah Khan [ Upstream commit f861d36e021e1ac4a0a2a1f6411d623809975d63 ] rtsx_usb_probe() doesn't call usb_set_intfdata() to null out the interface pointer when probe fails. This leaves a stale pointer. Noticed the missing usb_set_intfdata() while debugging an unrelated invalid DMA mapping problem. Fix it with a call to usb_set_intfdata(..., NULL). Signed-off-by: Shuah Khan Link: https://lore.kernel.org/r/20220429210913.46804-1-skhan@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/misc/cardreader/rtsx_usb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/cardreader/rtsx_usb.c b/drivers/misc/cardreader/rtsx_usb.c index a328cab11014..4aef33d07cc3 100644 --- a/drivers/misc/cardreader/rtsx_usb.c +++ b/drivers/misc/cardreader/rtsx_usb.c @@ -667,6 +667,7 @@ static int rtsx_usb_probe(struct usb_interface *intf, return 0; out_init_fail: + usb_set_intfdata(ucr->pusb_intf, NULL); usb_free_coherent(ucr->pusb_dev, IOBUF_SIZE, ucr->iobuf, ucr->iobuf_dma); return ret; -- 2.35.1