Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp865777pxb; Thu, 19 Aug 2021 13:18:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJFeVmrqxj0l0eOjk2HShiDdhyz7gnN80UorXBgA6mRjEzRnyzCoLJlivuKKah8XlW4r2n X-Received: by 2002:a17:906:488a:: with SMTP id v10mr17271213ejq.91.1629404294326; Thu, 19 Aug 2021 13:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629404294; cv=none; d=google.com; s=arc-20160816; b=GMZHX4HcuEYgssFYuOzQwu+GbBZVcusBNHYjWrizJ/uprtPpvkya0kB//3gfgZIVFu 5Q8zxjBfxen5dcBFjXssmFDcBl7uIdQlE9YG0ZFHFLx1tncJFc3AILs47z/L59z2KtKQ MfMyLCMrdxbrUkY/I2qNC+rRKKXVMpb8D/JEvi5C3bf3hDfgTfDr/ngjNMl3sG6v7806 yjogGtZ36tZMyjwF8WqWQHMmXYPQpBLBTfOLugCnWHzwt61LVSAUQp2R3IZseaO/jEtb ++ICmS+1gJsqkVn0Pk0YCJq2J6uBQi2+PSWOhEiZNWcVYc/JqT6UgU/p+Z48BJSSOgJP FIWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hrWz4NAakvkbXED+TiflwM6YH+DFROJfdHAiNsIJBK0=; b=voL28MC1husnXDs9uw38DNKsJZ2WiA77rNM8KHR1LpbNjws1ai3LUmexOzqhBIZomd lhf0N5VHD9liNsq1XdD1N3uXvzeG1RBDufHy1nr6RCQ6Sgx2oJrQ2lHyzHJk4W9OqRQ+ 2EmuZJ7Z4kQ04SKaO7doGyemosCXhGFOfPtqwD3ajitK2exzg3+A9xnpyDCT5oa1z4Vv 6zfqxJoAYFPAwe2kFouxO5jFoUrbNGHfdd0nvpb315oZgwk77/aDFEeHfQ1bF7Pnjipd G59Lwiw9q/rp+98NpQjYmE5k6S6S9+P0LGAin1zH+/DmCtFpZTsMstEUdxtZLnb8PGZu oh/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nBFk1Xsg; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pw3si4338799ejb.206.2021.08.19.13.17.47; Thu, 19 Aug 2021 13:18:14 -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=@gmail.com header.s=20161025 header.b=nBFk1Xsg; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234978AbhHSUQ2 (ORCPT + 99 others); Thu, 19 Aug 2021 16:16:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231856AbhHSUQ1 (ORCPT ); Thu, 19 Aug 2021 16:16:27 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E91EFC061756; Thu, 19 Aug 2021 13:15:50 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id d4so15428298lfk.9; Thu, 19 Aug 2021 13:15:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hrWz4NAakvkbXED+TiflwM6YH+DFROJfdHAiNsIJBK0=; b=nBFk1XsgHsVry9Qc6yaHDy+PvJLnZ6Zu5cdlqGO+4+12ZvLSfr5ETy6twZb2l0SSs/ nSUlQAlL4AkAgQVU6+mS+9OBCWI+SGCtn2c8UEmABWG+9gGP2IO4spo7JHqaC5qIUO3v Pjn0PDCnFZmTsHnYMR0XxTrxhLBClpjoXOZU05PhKd9KR53SnVhe5OVUIXJaTg4lheDv ORogd8/sAqoeago8IklvD8qO9yXq54U1af5ujQWAcL1AMz/vIl7xwQ8pjsQwSg4XQ1ok umOgxsjmhaNMPdmMMbVpHpGAv5WGLLMdihIXfWl5YlnFjZqeBZk2ZMQ4CUms0WE8TS5t EvKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hrWz4NAakvkbXED+TiflwM6YH+DFROJfdHAiNsIJBK0=; b=NdilHCr0WnEoePAuOn9TAiHLrrhiIn5+i6iMjtAGkZMC7MOP1ijRIApEsu5gs0kU0d l91IhpxpvEKuDRhvZoWspBtrMH4wDb0L/peie07QJA4D3ZbdZDkU3/kWY1E1m7cyOaZs 0EF5aLl6uf7Nn4NkGZyk2DMY4CDz3KVbUFtDfrkzE9Z73dqSiH0yWNrj6V5AKdjnGLsP 4Hrp+6KeIW8IjOWT3PIMHhIiHPMfVX2b7s51Cik1yN425XzPNOtdAfGynSzHDsROZjVs 0vSnv8qVGZIALdFu9yYD4QMLWl4wsF8Bu2KGJytoRg0qdZyA3rdNN+cPycB6ZCNPdSRS zj1A== X-Gm-Message-State: AOAM532YExvfJuZHx/LvusYL5EHH1OU/4dWV1cMjNccLQcU3/J/5MfZ1 qFHhWKHcInHUdLXV4RxPYiGenYrnUx78E1d+jrw= X-Received: by 2002:ac2:4143:: with SMTP id c3mr9598186lfi.295.1629404149335; Thu, 19 Aug 2021 13:15:49 -0700 (PDT) MIME-Version: 1.0 References: <20210819154818.18334-1-lutovinova@ispras.ru> In-Reply-To: <20210819154818.18334-1-lutovinova@ispras.ru> From: Fabio Estevam Date: Thu, 19 Aug 2021 17:15:38 -0300 Message-ID: Subject: Re: [PATCH] usb: dwc3: imx8mp: request irq after initializing dwc3 To: Nadezda Lutovinova Cc: Felipe Balbi , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , USB list , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-kernel , ldv-project@linuxtesting.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nadezda, On Thu, Aug 19, 2021 at 12:48 PM Nadezda Lutovinova wrote: > > 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. "necessary" > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Nadezda Lutovinova Reviewed-by: Fabio Estevam