Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2493397pxb; Sun, 31 Oct 2021 17:33:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBmYth1qo4bVuhqFx0bGZNpsVNV+NI9dpHEtkCSEhjdIgdSx4ap6kIZIyR4/l33GB2KwHq X-Received: by 2002:a17:906:58c6:: with SMTP id e6mr1092054ejs.524.1635726828304; Sun, 31 Oct 2021 17:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635726828; cv=none; d=google.com; s=arc-20160816; b=ofVmaYDwcl2b36LZkDwi8CFnLizp+LdKliacKemLLjon9xkLX2RWpf88Ioto2QLl6x nwU4Uaal5R+cabUsv3S40Im8z9wIW7WOzSR1miw7DcsibTX799K5HhvcXLHz8zUviGBY L+isYO25IVhkIvXEKP+tpKV0/yw5qsbtMIuMCt3gOChe92ustw9OQGmJQNVF6F0iuVj1 OJVTi31myHV7kTzbHutzqbTZAQWZ1UYRv2peb1z8H9Pohh08aUFaVrkZlYNMpWzSzQPh ggnMa+QtZiMHIJ77Bxf7X4rltsUK8FO6eklLDJDXGBbQFXwxrieHIQC0cisCgISkWTpr BBKQ== 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=bwK7P4QgnRnUF2ekpWubt1matGUWb4X+us3G6c5xcg8=; b=PjLtIymhy8sSpjVqwyJejh+cadXtAL3bN2HOJb3513tPQ9qoDOsAmflc1Ph8cnOv7s mR/sYJgKD4inkOZSBOeIxJS6ty4YYuXOULBY+dQwhJ6DFuqjXbVuAETIsP0FA8w58AyF r84Wl4R2b75gzYxdLAnTWZHO1Y1h4BpcKe/+tHPU0r85jd0LXjYB6zqU30Y7VW/sMDMi MDr3pWBxOdSbhiDCwkkuDvjwOAoPdNNgVgOct16mvftsDt1Ac8JLCeJRfugCc5bXGiVC 0Qtu6MDR4guZ1sbfcA/xVcaz5GLXgfyJHBtxx1lX38/BnNNV4Lc9b9+MKH7xt2ZOa+IV qq5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U7+uZV5O; 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 kx10si16695557ejc.472.2021.10.31.17.33.24; Sun, 31 Oct 2021 17:33:48 -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=U7+uZV5O; 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 S230246AbhKAAbG (ORCPT + 99 others); Sun, 31 Oct 2021 20:31:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21641 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229982AbhKAAbF (ORCPT ); Sun, 31 Oct 2021 20:31:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635726512; 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=bwK7P4QgnRnUF2ekpWubt1matGUWb4X+us3G6c5xcg8=; b=U7+uZV5OQm8/Y6obBxMy+pHMTUEo6/J7wZGQeaT2SIV8dWWYFlcgDwzUT3yu5sq/gVeIqw ixKa15YntgARDIRDMIVxNiRE7d9zYfT/rMFLZhulDWnLk7Zn13tf9I605tuCQPxhq6k1z0 rlnxo5LKYNp0Hfpm7ovWxebb47a6GX0= 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-249-Q-OEjBXROCC95hHeKdPuAQ-1; Sun, 31 Oct 2021 20:28:29 -0400 X-MC-Unique: Q-OEjBXROCC95hHeKdPuAQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0BD6A8018AC; Mon, 1 Nov 2021 00:28:28 +0000 (UTC) Received: from T590 (ovpn-8-17.pek2.redhat.com [10.72.8.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 069E72B399; Mon, 1 Nov 2021 00:28:19 +0000 (UTC) Date: Mon, 1 Nov 2021 08:28:13 +0800 From: Ming Lei To: Minchan Kim , Andrew Morton , Jens Axboe Cc: linux-block@vger.kernel.org, Luis Chamberlain , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, ming.lei@redhat.com Subject: Re: [PATCH V3 0/4] zram: fix two races and one zram leak Message-ID: References: <20211025025426.2815424-1-ming.lei@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Andrew Morton and Jens, On Mon, Oct 25, 2021 at 09:30:07AM -0700, Minchan Kim wrote: > On Mon, Oct 25, 2021 at 10:54:22AM +0800, Ming Lei wrote: > > Hello, > > > > Fixes three issues reported by Luis Chamberlain with one simpler approach: > > > > - race between between zram_reset_device() and disksize_store() (1/4) > > > > - zram leak during unloading module, which is one race between resetting > > and removing device (2/4) > > > > - race between zram_remove and disksize_store (3/4) > > > > Also replace replace fsync_bdev with sync_blockdev since no one opens > > it.(4/4) > > > > V3: > > - no code change > > - update commit log or comment as Luis suggested > > - add reviewed-by tag > > > > V2: > > - take another approach to avoid failing of zram_remove() > > - add patch to address race between zram_reset_device() and > > disksize_store() > > > > > > Ming Lei (4): > > zram: fix race between zram_reset_device() and disksize_store() > > zram: don't fail to remove zram during unloading module > > zram: avoid race between zram_remove and disksize_store > > zram: replace fsync_bdev with sync_blockdev > > Andrew Morton usually takes zram patches so Ccing him. > > Acked-by: Minchan Kim > > for all patches in this thread. Any chance to make it in v5.16? Thanks, Ming