Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4244106pxv; Mon, 5 Jul 2021 18:17:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxFcX+E/sjU56kyjQd0cYW9RUqqmX6VBt+9+336NyY5g3E0Fisy2PHcGCtMhzW96lo+NTk X-Received: by 2002:a17:906:9bec:: with SMTP id de44mr9330594ejc.512.1625534229766; Mon, 05 Jul 2021 18:17:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625534229; cv=none; d=google.com; s=arc-20160816; b=ct68S5j6OkPz1P91rwFPNc2quaXLhL2b+j/20RZS0JPbKOGZAzVjFmH7NuS0OzzH3/ HcF3BOBQDg8bFYQdJmrLjy4af+93fo8jFbRVfiqlQy1A18rrItp65+a5+5inPtHryjlP WbbxYeMr5TV13c7MQCs1odxy2bXxLVsB1jfaUodnww1RcC1IQd+5ck7GCOwdxQoWNiha qCIvQaurpRO1e6a2r5E+TrKEyKiZTdZTli2s2f50I8uaAe7ExK00hBWgHRAdHIOFmCwk OdbEjz7ZY5FoKA9iDsGcjF/pdaJR481RWOobuaf1rpfeyrOg5BYfLYOk4H4nXwp6egNh CSMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=xG6P1+sDQl4jEV3cq/HGM+DddaPYqM/HhUpbXndOJ58=; b=Oo3fADZbDPVcMDtTG8H1LVI65OSedCGbkQam/y2+LDg/Rq0jcjp0WoPfaEVLqKLiZ6 AXW7eVjWS1xUzDXvJIhLHw/slAfHjlFDsogeGXAc3urz+eOzv8Eqal38glHRtJeGrNvJ EhrpQpSH7N7ICMNY8gBbThqO8nNuBZ9Jv+1wV9iPeDdB6b26wuhvX4uo4WAeTVQ45Pu9 7J0CASgit4DU27Wk4vT73Kzyx2mxAVlW9AxtFQhkYOViFdj6RgaGUsrHfZ3T/3J/H1u2 rU+3yQbW8YJEsBcmZjST6EQ3wDfXSi58uNQ0qg2xGd/nk3uaxuJPncxqCW/w2eQDvrys hIHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HhsZ0ceU; 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 nc11si14210048ejc.155.2021.07.05.18.16.46; Mon, 05 Jul 2021 18:17:09 -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=HhsZ0ceU; 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 S229774AbhGFBSV (ORCPT + 99 others); Mon, 5 Jul 2021 21:18:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229733AbhGFBST (ORCPT ); Mon, 5 Jul 2021 21:18:19 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFCDAC061574; Mon, 5 Jul 2021 18:15:41 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id bq39so22708878lfb.12; Mon, 05 Jul 2021 18:15:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=xG6P1+sDQl4jEV3cq/HGM+DddaPYqM/HhUpbXndOJ58=; b=HhsZ0ceURhcOFz0Vj0ytT1juZaq7agnU9T1ESybefYQGZPdHYOu6SPYBjEIBXwZMyw zfpxxRW6w5uHhpT63pNPeB0Q7av4f6MWeAVz9f+hnbqjeMDogGshggk8FRMk8Vt0l3NX 0mc6lfcyV3/RE+2cNDGfY/6Z+22eoBmtqwxxpCwoPDHIw+K1CD9xvdbU0BKZ/qEbsINs l4RqAxTy6eHzaeAzw0ado/C4Ns0k6POG/PmsXeW8nDWWSQggOjnhBytjgw4xPZRkS64x cyzfsWt8kW9ncdpiz/KehBgmmyoQPzGncWOjuKoRPsSUVyqojrK1y6EhIiu9BXxYdRyM q7Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xG6P1+sDQl4jEV3cq/HGM+DddaPYqM/HhUpbXndOJ58=; b=aZ5lMsgsazkX1O0KedjGWpwVVGYMXR33h7FjbfbJaoaG7jQxNSDa+5AnB9HE/L0kUM vb43WFyluDbEJbfUYiegYe185+QjWepgGPBrd9lK3hMVf5R724ywYURA0hrp3c/agiJ+ hBWj7hbCI+S20CvtIyX587AHquIsUMrqpjJ/3rAs/RLgoxuvijNLrgFA1gW1tym+SphL 8nsBWMV+RQQ5U+U7A8DUairL58e5hSjFVBUWZa4yI49ezpj2kt5ykPJkXrK/oURtB47e dTW61Mh2PbJJYnCOmX8Pz4mfTZiZSjtnwq1EjEnFfuSsUSxvhptTzbYHCqmSXxxDFx+7 OIAA== X-Gm-Message-State: AOAM5319fthad/HkAclvA6+KUJToXdy6JSN6vtp2hkfgbimXhowGdi6F IJggWxyX3MkNh/50TX6R4ed5FfXWSIs= X-Received: by 2002:a05:6512:3c89:: with SMTP id h9mr12102895lfv.17.1625534140087; Mon, 05 Jul 2021 18:15:40 -0700 (PDT) Received: from [192.168.2.145] (94-29-37-113.dynamic.spd-mgts.ru. [94.29.37.113]) by smtp.googlemail.com with ESMTPSA id a8sm1532867ljq.127.2021.07.05.18.15.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Jul 2021 18:15:39 -0700 (PDT) Subject: Re: [PATCH v3 05/12] usb: otg-fsm: Fix hrtimer list corruption To: Peter Chen Cc: Thierry Reding , Jonathan Hunter , Mark Brown , Rob Herring , Sebastian Reichel , Greg Kroah-Hartman , Felipe Balbi , David Heidelberg , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org References: <20210704225433.32029-1-digetx@gmail.com> <20210704225433.32029-6-digetx@gmail.com> <20210706005739.GA19143@nchen> From: Dmitry Osipenko Message-ID: <04a679be-ec66-f71f-5b61-59b8ef82e128@gmail.com> Date: Tue, 6 Jul 2021 04:15:38 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210706005739.GA19143@nchen> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 06.07.2021 03:57, Peter Chen пишет: > On 21-07-05 01:54:26, Dmitry Osipenko wrote: >> The HNP work can be re-scheduled while it's still in-fly. This results in >> re-initialization of the busy work, resetting the hrtimer's list node of >> the work and crashing kernel with null dereference within kernel/timer >> once work's timer is expired. It's very easy to trigger this problem by >> re-plugging USB cable quickly. Initialize HNP work only once to fix this >> trouble. >> >> Cc: stable@vger.kernel.org >> Signed-off-by: Dmitry Osipenko > > Acked-by: Peter Chen > > It is better to append kernel dump if you have v4 patchset. The stacktrace isn't very useful because it crashes within a hrtimer code from a work thread, i.e. it doesn't point at usb at all. It actually took me some effort to find where the bug was.