Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1323169pxb; Fri, 20 Aug 2021 03:08:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLcyv+Q6XV+JwomQJRNKY5vM7WUIqYtdVvs2pmueU5Qz5u2WjHb9pLtC2Uojgkf+zdtT8V X-Received: by 2002:a5d:8a0e:: with SMTP id w14mr1701931iod.94.1629454084264; Fri, 20 Aug 2021 03:08:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629454084; cv=none; d=google.com; s=arc-20160816; b=Y5K0Ewk3FAatxnijcH8t6+M6eiAEm4wyK35sUTNg3P660bLCqRs4r3jsP8KaSAR7LE LtfBWCmI9ezT4COMWC8btgVMnXYiEzvVzwheD8p8ZEco1ArhgapmWVtagQa5eT9l5Vkb nQUtkSw3OI4HBjt6kQL0Ps6pSWnmuRDrA6zxdTc+z3nvcKUX1DYBQqsb1y3HEtD1GnOG OQNLxNRyozxJhehTR72Nufqz3IbjJeDuqBJg/FdUikGFn8zms271/+IfgXjmZKmVo6dS lB0BcGI3mdlmTZQxGreRGSKYzrr/4lt65I5UVD8kHZEOi4BPqJxNwZeqU7SzoISuKvs3 Il3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:subject :cc:to:from:user-agent:references:dkim-signature; bh=6h3xxFlriVF+y7Dtq+X2hUcgqYsYAf29WE7BWwQ2F24=; b=b3xNh7k4evntTG8Z9WfzGz66rLMoWNUCBPciaCRbQowXNHlmDt4c8j7RRUeFI9eUX0 N625n6oCA3dQHN7QPi5uypHclP+ExuC8Sxe2sO8YYGvJK0eSd71Mn3i0r6JGFLdnIpDK 0IjjZKQSIvSryBioqXKixGHIUuBZs8j9C/8TbhwkD7WQh/9Eh6b7V/JiMgvxsmI1TWFa QGWEwNyC15gG00lJCWB14n6zFAhbKe7vikGz4X5Tb26EY5HcIVOn5BcFtUsrSKUQYGmj DB6GYQNLr5JX4onfB+yMYij9PeiIJWuZchRPnV19nEwPm0Oi0U8NjdgW9Pd4wYe/cjID M5ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z9iuAsW3; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w12si6372085ilo.99.2021.08.20.03.07.52; Fri, 20 Aug 2021 03:08: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=@kernel.org header.s=k20201202 header.b=Z9iuAsW3; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237267AbhHTKHm (ORCPT + 99 others); Fri, 20 Aug 2021 06:07:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:55966 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232244AbhHTKHl (ORCPT ); Fri, 20 Aug 2021 06:07:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DD9476024A; Fri, 20 Aug 2021 10:07:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629454024; bh=4wOWt2TLJnChpQZUoUnZ7pdN3g/0c/c11ETk2UqFr7w=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=Z9iuAsW3c17hodu6Hgq6226o2iKkjrnDSLYW/eEIFf5COL+zNpvEOaf49CqrpDiMp 2VtLuppafClyPPIzOHDdpOxerJxfrGOH0DncrlkR5dtR6Yd2Ki2g8+XklrDzt5snOt sAABGBYzV6REPEMdCg9yNSZ2vq23ArlwH2s0atAN0G0J9Q/WLpOclelAGDEpPSyW7W HUoSYTBIu6Zkw2IWj7XOqt7ZHe9+vRaILNXUDYrw7NW8VM1j38hegdj8zM3kHNy3aZ ivfRB1sb46h9nrBsIdVGD1h99d4LI5ZTLXQ/A31qv1hDldEejZgPyVpusnr6ksjEU0 wGlW/8wThl4Cg== References: <20210819154818.18334-1-lutovinova@ispras.ru> User-agent: mu4e 1.6.3; emacs 27.2 From: Felipe Balbi To: Nadezda Lutovinova Cc: Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: Re: [PATCH] usb: dwc3: imx8mp: request irq after initializing dwc3 Date: Fri, 20 Aug 2021 13:06:33 +0300 In-reply-to: <20210819154818.18334-1-lutovinova@ispras.ru> Message-ID: <878s0wfn0c.fsf@kernel.org> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nadezda Lutovinova writes: > If IRQ occurs between calling devm_request_threaded_irq() and > initializing dwc3_imx->dwc3, then null pointer dereference occurs > since dwc3_imx->dwc3 is used in dwc3_imx8mp_interrupt(). > > The patch puts registration of the interrupt handler after > initializing of neccesery data. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Nadezda Lutovinova Acked-by: Felipe Balbi -- balbi