Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1524262pxb; Fri, 20 Nov 2020 11:38:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrSr8vld0XDN6ZfWlByBLUlE9BeIA/vkTiwMq17FtdE/Jq7pYytlIpOuu5En4GjDbdQ3r6 X-Received: by 2002:a50:da46:: with SMTP id a6mr32465245edk.272.1605901084625; Fri, 20 Nov 2020 11:38:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605901084; cv=none; d=google.com; s=arc-20160816; b=b7tCZOBagsihuGCVq6Ji2MVVWnz/QhAWxUZ8gUSJw+eX2U7e1vuaib/wX4qtxYN1pT rVmtmaXaecJx3l80gwW5RyD/fAHhyl3uzLUYSSxEGqcEk6vV+uEg4lR/eAMkZtiUJRz7 qfG2zZQnQHQqT1G67OBPLMT9NzElDCuDR8BAuAZwtBOAQuv1KmaEKkzLTj3Ozn3oUcb7 aDGo+GNxdy2US7SLFppeu5iaVZuKbJIPB8PAtybiarNFrFfaxZ6f+EWK6KlH3SsagbAn eDgNu4fFw/eU10AojimqH6tlvCopfBsLJw28AAjjXmxRbtnF7z+7LIcJW2YBCz/Vqd5v EyBg== 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=OCXdvbpLcHPqsyPAvHs2fAO+t2cUHARppytDiUNGqUs=; b=efgzVXD87pCknOzkEyIKL58vIGCK/xL/q1xJX99mD2uoAv+QEHp+yBcBaNO10AAC86 5DQxWJCC3bA9Iy4BKFpqB0lVIuAgy68jLlIPvTSt0hzEPXwSWwrIAt9YXX2DwGtCOkFA DkJ9EZi5HNRSRfa63GabCV3mCA+D6u9rlJlvbj7dkED6VEhl8BOxnMMF3AIX8iaLbq9V m8QrhalOl2LfWxXjtEBz7d25LpDiSFaTAfCfG/CQY9eBOkQW5fXeYojYU4141InLhE+U 1+/t/DvxlP0C9+CePvH/CY1AvSUgLw1Yz1eGPuN5wjpRVmezevjvWDA/iR9XPCK+t+V0 jpYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=D7fTRsyp; 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=163.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bc3si2306090edb.258.2020.11.20.11.37.41; Fri, 20 Nov 2020 11:38:04 -0800 (PST) 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=@163.com header.s=s110527 header.b=D7fTRsyp; 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=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727962AbgKTTeO (ORCPT + 99 others); Fri, 20 Nov 2020 14:34:14 -0500 Received: from m12-16.163.com ([220.181.12.16]:36016 "EHLO m12-16.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728131AbgKTTeN (ORCPT ); Fri, 20 Nov 2020 14:34:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:Message-ID:MIME-Version; bh=OCXdv bpLcHPqsyPAvHs2fAO+t2cUHARppytDiUNGqUs=; b=D7fTRsypZ5YlDOfASrJQA D+WmO6bKjNsNIfq3M1HO2ThNNCQt+BdXXOMm0f9JgRI43b1T4h4Ld5xdPuecUPti kG326WHvvDE3bASZ8HHIN6t8ejbayVpKDsgzx+odw19xA9/cc91qehauiGU+l9IM icFNHlB/5pQSz5fwHsvW2U= Received: from localhost (unknown [101.86.213.141]) by smtp12 (Coremail) with SMTP id EMCowAAHWzreGbhfZQJnNA--.32030S2; Sat, 21 Nov 2020 03:32:47 +0800 (CST) Date: Sat, 21 Nov 2020 03:32:46 +0800 From: Hui Su To: Hugh Dickins , Andrew Morton , Stephen Rothwell Cc: hughd@google.com, mm-commits@vger.kernel.org, sh_def@163.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: + mm-shmem-use-kmem_cache_zalloc-in-shmem_alloc_inode.patch added to -mm tree Message-ID: <20201120193246.GA19677@rlk> References: <20201116230526.NkEfmeDCH%akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CM-TRANSID: EMCowAAHWzreGbhfZQJnNA--.32030S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxZw4fWF1fAr4rKry3Zr1kKrg_yoW5ArW5pF WfG3Zayws8JryxKryxtw4kWry093yfKFWUta45Xr18Z3Z8Z3WkKr4vyr1rZryUCFy5WFy2 vF4DGr48uF4UAaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zinjjkUUUUU= X-Originating-IP: [101.86.213.141] X-CM-SenderInfo: xvkbvvri6rljoofrz/1tbifx-iX1r6mslkqAAAsi Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 16, 2020 at 10:17:20PM -0800, Hugh Dickins wrote: > On Mon, 16 Nov 2020, akpm@linux-foundation.org wrote: > > > > The patch titled > > Subject: mm/shmem: use kmem_cache_zalloc in shmem_alloc_inode() > > has been added to the -mm tree. Its filename is > > mm-shmem-use-kmem_cache_zalloc-in-shmem_alloc_inode.patch > > > > This patch should soon appear at > > https://ozlabs.org/~akpm/mmots/broken-out/mm-shmem-use-kmem_cache_zalloc-in-shmem_alloc_inode.patch > > and later at > > https://ozlabs.org/~akpm/mmotm/broken-out/mm-shmem-use-kmem_cache_zalloc-in-shmem_alloc_inode.patch > > > > Before you just go and hit "reply", please: > > a) Consider who else should be cc'ed > > b) Prefer to cc a suitable mailing list as well > > c) Ideally: find the original patch on the mailing list and do a > > reply-to-all to that, adding suitable additional cc's > > > > *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** > > > > The -mm tree is included into linux-next and is updated > > there every 3-4 working days > > > > ------------------------------------------------------ > > From: Hui Su > > Subject: mm/shmem: use kmem_cache_zalloc in shmem_alloc_inode() > > Andrew, Stephen, please revert this untested "cleanup" from your > trees a.s.a.p: it's a disaster for anyone using shmem/tmpfs. > > > > > in shmem_get_inode(): > > new_inode(); > > new_inode_pseudo(); > > alloc_inode(); > > ops->alloc_inode(); -> shmem_alloc_inode() > > kmem_cache_alloc(); > > > > memset(info, 0, (char *)inode - (char *)info); > > > > So use kmem_cache_zalloc() in shmem_alloc_inode(), > > and remove the memset in shmem_get_inode(). > > I could not follow that argument at all. The shmem_inode_cachep > uses a constructor, and the memset shown is of only a portion of > the whole inode. zeroing the entire inode quickly crashes the > kernel, after showing errors. > > (If you're lucky enough to have a readable display at that point: > I did not, but got on better with framebuffer than drm/i915; and > I wonder if there's a separate bug in that area too, because fixing > this shmem issue is not enough to get my drm/i915 rc4-mm1 booting.) > Sorry, I thought it was a small change before, so I forgot to test it. It's SO STUPID. I'm really sorry. > > > > Link: https://lkml.kernel.org/r/20201115174026.GA365412@rlk > > Signed-off-by: Hui Su > > NAK. Hui Su, please test your "cleanups" before sending them. > I will remember it, thanks. I have spent two evenings building a patch automated test platform using qemu and jenkins. > I'm sorry for being slow to respond, but the priority appeared > to be to get Matthew Wilcox's series running reliably, so I had not > got around to checking the less urgent shmem patches before they > slipped into mmotm - there may well be more that I want to NAK, > but this is the dangerous one. > > Thanks, > Hugh >