Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp339202ybc; Fri, 22 Nov 2019 22:54:00 -0800 (PST) X-Google-Smtp-Source: APXvYqyCBqpPgvnQmAVgxBUWJfHMPwbTa1nLNw42NMt050GlJuZGLLww2sgqJGmCrrSaKTaDxy2S X-Received: by 2002:a50:fb8d:: with SMTP id e13mr5796809edq.213.1574492040878; Fri, 22 Nov 2019 22:54:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574492040; cv=none; d=google.com; s=arc-20160816; b=uAN1YMiQlCetln91829c0nGTZe7ZI01YjXJdmxbdn3P8XDhJIOtOrzc9r2Ok/qSzh3 bBwFHgiVloLpu/4mW8NXPBHWoQ/J0OZ9QeB9ezH+RwZsetRLNiTLR+RhY9G54N50p+O3 R5FAY5ndMJPp6Ir3I4kSrm7TfiIoqBCnb2Qc3w3rgnq+Vs7OvVS1YDWRriAdb12+uu4u /8j2wwLbcqlcCMDD1LGXTheMyDV3r8ZjRbB2mDqPGRAyhJQEa6tCoL/aW5wotyvS0KyA ttre+RDEpf+0cw63UrCj3ZSrZdlr9mODvNsTXiTeZ2+o+18iD5bDqwKzSr5XYdLHmCnj tuCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=P+MUZ1y2xb9PhY7+WKJzGw1iInQZnQRbBnrxCn4UQzw=; b=QLqH/zK/fkQoDSd06xL5IQwZGtaAOKKNR30T8Wx7zLLYHH4SvilnYrK9owI9oFiRU5 vhk6dwKExjvnnUwMEOMJJ26S2nlqYViMhTDuu7x7Hz30nid8fkpP2r+3iqhtTThfB8ou iTE9UpH0eJ7nDvdch6UZczEqMygIuJU0Hfjlb+vFF/iIqn36QnyJT3kbYvs9jCsUZHFa ttHk+GhcReyEBAQP9K7XptmGvHo657CdcZ6dUFigtrM5uh9QMnfXXGy9f7+s4vOtFY8j eTH7Xsg2KyE5Ti/hagJl8GKx2OIPYWEMXm+/vh4A9q62wi/vD2DwRwMu6jp+btv4n+pY j59A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ef4pBY7x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p24si297897edt.411.2019.11.22.22.53.35; Fri, 22 Nov 2019 22:54:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ef4pBY7x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726368AbfKWGwi (ORCPT + 99 others); Sat, 23 Nov 2019 01:52:38 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:42163 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725800AbfKWGwi (ORCPT ); Sat, 23 Nov 2019 01:52:38 -0500 Received: by mail-qt1-f193.google.com with SMTP id t20so10606414qtn.9 for ; Fri, 22 Nov 2019 22:52:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=P+MUZ1y2xb9PhY7+WKJzGw1iInQZnQRbBnrxCn4UQzw=; b=ef4pBY7xeFKFfeQ/8fzoBtrVicRJxFcNv7xwZsVE9YZFB7OBVPVFbdxHC66O3jBsXS kSO2Qg57e2UCBOtT7P3IdscYIZRF1sAbTXGNsuv78EbZ2oNQK48+yBd0fsSK4Vw/87Jp ZQxW2xuyAvXmL/koRI3Bqlxh8WPdUDRqr7BR33qnH8Ri5603dDwQxHzy3UBys5pKdShU EfuBt6tK9bBhsB6Ryl/YyG2R3mCFm7E/BKb56qV+35we7vLeMTDcWz+OxS2WOQqjCAXG ny+h43woX108oFb4ptQp5vPXaCcQBbAUiACKS08iXmBdo05M6nBaczjFDA+62NNx6wFp KHHg== 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:content-transfer-encoding; bh=P+MUZ1y2xb9PhY7+WKJzGw1iInQZnQRbBnrxCn4UQzw=; b=hd4sa7nErDj7pfAIQtUEMf7Hxv/7N5uLHndiqAhF8CIYmdbUDJDi9DSmV8B/Wd+Fk0 Bxud2wPLr+y30e9gYalk84wCodj8HhfYcauu4aemLlYiyxqIay2UpE6LkORhuOyJwqHw hB5JdFXpwieT4JUKPTemLeTspVkxFy7GGO7WxY0n4b+7KfJj/7WRt6bxEfRCrft+mxje Qtzb4Li6W8GIDLX7Mt/AH6sfHULkrzN6v4mZqSS/05RjnsrOl+avhUK7niMeQ1T+Rdkq EUnRD9l1CUL1vw8/XW02XoyXCWTtm4us2EUHlnmwx2Q4LK4nPm9f7J3uuNaE89B+o2EU PLVg== X-Gm-Message-State: APjAAAV9lER0K7ezwaMsjnsn2sWO9mmHCWR5knMhxF8Md9GJLIKqi0Xw GoXhbMl8qW2T6lJfBrCfb1GmFqH6cHKDPuRrr8FiaA== X-Received: by 2002:aed:24af:: with SMTP id t44mr4069018qtc.57.1574491957069; Fri, 22 Nov 2019 22:52:37 -0800 (PST) MIME-Version: 1.0 References: <0000000000003313f0058fea8435@google.com> <8736ek9qir.fsf@miraculix.mork.no> <1574159504.28617.5.camel@suse.de> <87pnho85h7.fsf@miraculix.mork.no> In-Reply-To: <87pnho85h7.fsf@miraculix.mork.no> From: Dmitry Vyukov Date: Sat, 23 Nov 2019 07:52:25 +0100 Message-ID: Subject: Re: INFO: task hung in wdm_flush To: =?UTF-8?Q?Bj=C3=B8rn_Mork?= Cc: Oliver Neukum , syzbot , Andrey Konovalov , Jia-Ju Bai , Sebastian Andrzej Siewior , Colin King , Greg Kroah-Hartman , LKML , USB list , syzkaller-bugs , yuehaibing@huawei.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 19, 2019 at 12:34 PM Bj=C3=B8rn Mork wrote: > > Oliver Neukum writes: > > Am Dienstag, den 19.11.2019, 10:14 +0100 schrieb Bj=C3=B8rn Mork: > > > >> Anyway, I believe this is not a bug. > >> > >> wdm_flush will wait forever for the IN_USE flag to be cleared or the > > > > Damn. Too obvious. So you think we simply have pending output that does > > just not complete? > > I do miss a lot of stuff so I might be wrong, but I can't see any other > way this can happen. The out_callback will unconditionally clear the > IN_USE flag and wake up the wait_queue. > > >> DISCONNECTING flag to be set. The only way you can avoid this is by > >> creating a device that works normally up to a point and then completel= y > >> ignores all messages, > > > > Devices may crash. I don't think we can ignore that case. > > Sure, but I've never seen that happen without the device falling off the > bus. Which is a disconnect. > > But I am all for handling this *if* someone reproduces it with a real > device. I just don't think it's worth the effort if it's only a > theoretical problem. > > >> but without resetting or disconnecting. It is > >> obviously possible to create such a device. But I think the current > >> error handling is more than sufficient, unless you show me some way to > >> abuse this or reproduce the issue with a real device. > > > > Malicious devices are real. Potentially at least. > > But you are right, we need not bend over to handle them well, but we > > ought to be able to handle them. > > Sure, we need to handle malicious devices. But only if they can be used > for real harm. > > This warning requires physical acceess and is only slightly annoying. > Like a USB device making loud farting sounds. You'd just disconnect the > device. No need for Linux to detect the sound and handle it > automatically, I think. Hi Bj=C3=B8rn, Besides the production use you are referring to, there are 2 cases we should take into account as well: 1. Testing. Any kernel testing system needs a binary criteria for detecting kernel bugs. It seems right to detect unkillable hung tasks as kernel bugs. Which means that we need to resolve this in some way regardless of the production scenario. 2. Reliable killing of processes. It's a very important property that an admin or script can reliably kill whatever process/container they need to kill for whatever reason. This case results in an unkillable process, which means scripts will fail, automated systems will misbehave, admins will waste time (if they are qualified to resolve this at all).