Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp333877pxj; Tue, 1 Jun 2021 23:50:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyW3HJBr5atnqvFU0mmMmzqrgier8dTVS2nggGMO+Ir7Y2kMBWYzhvrhOALg219l+BbaZzX X-Received: by 2002:a05:6602:242b:: with SMTP id g11mr23685476iob.105.1622616621229; Tue, 01 Jun 2021 23:50:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622616621; cv=none; d=google.com; s=arc-20160816; b=gUZRYvhqorwioF/60AwWepI9wN9j8ZRo8faHl6Ihemx1HH8DBMm1g7PwPu44vVj87b FSsPihOy2ud6vtuo3WPhalw/6Nx34Rvja8Guf5l7e2sx6UoJ/jdVfb8AJjfUKigc6VHE GzE+5SWvI4Wz7xOU29cZM3RaGiXsV8SnFJs2CdO/2vaf3Hqt66/Ddnd7Q/kvn3yjpbAg EOK55hF3URe5+N+pfp3RTRkJM6eioYHDRYsdjOQ7IoPrm1sCyXF+yLjSuf87hKWk2Jyk 7VAmnh3XPO5IPj/WQ4C1N5tMiswcOzJWATvcJjTCavCyJD8FsMsIkPffM6fSHerNK4Bv 3shg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HVcJbN/KT1+fyetrnk2iAeiqGIXFm+abamxXaSbzX64=; b=gTQjYdKk+eTnOoDSJQYCjuNQG5m4Yno6rS8y3l777nMdFUkY+cYUGQKZl6CK4zoFeo 5JWKIiR26i0eP5scHLn42lO910YLNWo1ubqOxqeOg1KSixxTmKwa0zAWfhbS0uQi67Uq ROa/nAwDMgIThDcWWQt+lPeLIGMSurSQINa81aLH/r7zYrpONqSfgHR5+27afdQiNBDQ O/0sqOfQtbGNamY9SdkQyPZhsvrw4KEwtCCP4DFOBHNTp+KjDM013VTWz/rKL2/32/Te Zd1opmdlLOLHJXu5kc2MBqaQqXHEF4P9hwX6MEadvE4WY8IziRt/7EU3l21s68lMptD4 g/sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aCbniVSo; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t22si24750924ioh.58.2021.06.01.23.50.07; Tue, 01 Jun 2021 23:50:21 -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=@redhat.com header.s=mimecast20190719 header.b=aCbniVSo; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229838AbhFBGtV (ORCPT + 99 others); Wed, 2 Jun 2021 02:49:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:57662 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229966AbhFBGtR (ORCPT ); Wed, 2 Jun 2021 02:49:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622616454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HVcJbN/KT1+fyetrnk2iAeiqGIXFm+abamxXaSbzX64=; b=aCbniVSoxED9tvY13FSMQ9T8Z9BrqtnWGZYYW4BtXTlv/zStbXb58SK60i3XrnFknFhVLG Et91Gbd4kKUElewNhOKP2LxG2EsKuyeCvUU7QP0MOAGjo0RgOv032Y9ff1icCV10LwNYU9 IQjvEYZHmIDQnyS6KkC3lbZjIm2lgNc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-49-09wOAkscMgeBsiscxpu5_A-1; Wed, 02 Jun 2021 02:47:31 -0400 X-MC-Unique: 09wOAkscMgeBsiscxpu5_A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B5B6E107ACE8; Wed, 2 Jun 2021 06:47:29 +0000 (UTC) Received: from T590 (ovpn-13-164.pek2.redhat.com [10.72.13.164]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 459DFE460; Wed, 2 Jun 2021 06:47:22 +0000 (UTC) Date: Wed, 2 Jun 2021 14:47:16 +0800 From: Ming Lei To: Hannes Reinecke Cc: Jens Axboe , Christoph Hellwig , linux-block@vger.kernel.org, Linux Kernel Mailinglist Subject: Re: [PATCHv2] block/genhd: use atomic_t for disk_event->block Message-ID: References: <20210602062015.33605-1-hare@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210602062015.33605-1-hare@suse.de> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 02, 2021 at 08:20:15AM +0200, Hannes Reinecke wrote: > __disk_unblock_events() will call queue_delayed_work() with a '0' argument > under a spin lock. This might cause the queue_work item to be executed > immediately, and run into a deadlock in disk_check_events() waiting for > the lock to be released. The above commit log isn't correct, and the current usage shouldn't cause such deadlock, so can you root cause the task hang report[1] on 5.3.18? [1] https://lore.kernel.org/linux-block/73783f6f-a3ec-907f-ea19-966e9d1457dc@suse.de/T/#mcde381522bdb95740e04ced555ec017a25c993cc Thanks, Ming