Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp516423pxb; Wed, 18 Aug 2021 07:36:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN5jzz7+UOzztmAXKO9YG+PeJ0IjZI4bAOdi/vscDKnAuc4ikLB/ncRBxYjsRg3gQeW3Bi X-Received: by 2002:a05:6402:754:: with SMTP id p20mr10887084edy.356.1629297390041; Wed, 18 Aug 2021 07:36:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629297390; cv=none; d=google.com; s=arc-20160816; b=DHssGo8RIJIqh4yR8zZV0dez1INz6BF05vHUF7fqlE7JUhCZWswdyL4+Gayr2oNtU1 3NWrMedE4mTcUSrzh2u1Kx2JJHxov0bRrrHL4pL9AOW8Yn9NP2kKc5e6zbKVnz/VAaLE 0ry+WQN+q+skpb6kiLxTF0sXC3dFegPfM+JceHFxehasH8S3CRro/gdA5tErDSA5nkHO xXt/Y6xuUPye2d32UQB55FB3guGZX9pyCQVtZyxQbHYy6eCPDiwWMSKI3AQjm3jFZvSu Bn03/bDh5wggFFKxV0zoz0wPj25wrG2sbY6Agw2Q+pfiYw1YvxKoATvuduRdFwlxs6dy FJDw== 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=UjpRehhi4QX7Aifxe6y+lRtXeAKK+oJVY/aWaR1YvRk=; b=LSh/2oh3QN/XL9sPRZgbX9IT5N2JU0usULiFZO3aLZ+1xJoD1ht+axcF2QSK9ifpXH QWoVOxq2zcCIWJVeaiQ0gz2NqSkeTjqtMBaeT7OLBmL6fUq3AfhKy+BVDkF91CkShGgV zN4LYh85BJZZisJcaR41L7VHHVMpMR1voohNvr82Cq0yfMUYJl18QjXnmB0VzDHOywu9 JYzJz/IuW3I+tWCfR0fZc5xfB6S0Gd42iR6ktJZ2DlqSjc0imCnPIRsFvmdxxnaS3QIY EKbbrZm1frjppJjMi0iBikJG7COtX1dv113TYbYmcGv1U7DTORrVUbhNlYexqM3tqI1i GopA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B6pwO5as; 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 rl8si26452ejb.460.2021.08.18.07.36.04; Wed, 18 Aug 2021 07:36:30 -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=B6pwO5as; 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 S239308AbhHROeT (ORCPT + 99 others); Wed, 18 Aug 2021 10:34:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:40406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239431AbhHROeQ (ORCPT ); Wed, 18 Aug 2021 10:34:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B6319610A7; Wed, 18 Aug 2021 14:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629297221; bh=OF1J2wHd4VzDXAmG26skt+r/Iv8T+sRv9vvuG57iN6E=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=B6pwO5as/P1Nq+fBBC9DeW/1j44+QFTpGF3CkY5HVnb6ZxvhNwR4/cqBNeztwcEQN Glkt3Bq5uvxZZYA4Y9MvJ0vL7KeR74sTwNzKSwhfOgVtcQgSm97EcJ7J7ths+LnyV1 TusydswoqB0/Dmv4zeieOHXwpRUY5kHQYKuwzMh4MlWGe3DNYZLA2ttZbv5RjK8aqV 9k8BeMyKoRe2OLaHNfTuZkcVe31+myaCKmcz2l4K4w0x+9SFFtBqfai0fLSojDRH8y qaPZpqeJzqeQ6CH+Ba+XmS3+Qgvjv9HN8p11m7wH53JWKuXiVd7bP1Vo/qp7L/DYyw fnZzILs80TIVQ== References: <87mtpegak8.fsf@kernel.org> <20210818141247.4794-1-lutovinova@ispras.ru> User-agent: mu4e 1.6.3; emacs 27.2 From: Felipe Balbi To: Nadezda Lutovinova Cc: Greg Kroah-Hartman , Johan Hovold , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org, stable@vger.kernel.org Subject: Re: [PATCH v2] usb: gadget: mv_u3d: request_irq() after initializing UDC Date: Wed, 18 Aug 2021 17:33:16 +0300 In-reply-to: <20210818141247.4794-1-lutovinova@ispras.ru> Message-ID: <87k0kig6v2.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 request_irq() and mv_u3d_eps_init(), > then null pointer dereference occurs since u3d->eps[] wasn't > initialized yet but used in mv_u3d_nuke(). > > The patch puts registration of the interrupt handler after > initializing of neccesery data. > > Found by Linux Driver Verification project (linuxtesting.org). > > Fixes: 90fccb529d24 ("usb: gadget: Gadget directory cleanup - group UDC drivers") > Signed-off-by: Nadezda Lutovinova Thanks for updating so quickly: Acked-by: Felipe Balbi -- balbi