Received: by 10.213.65.68 with SMTP id h4csp3854378imn; Tue, 10 Apr 2018 05:49:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx49y0y9CBph2f/TeXJSGdrnCkd3c14sRmAo7tmOK50gwjXdsLwl9aClh7CJwYMCe/2kexnuf X-Received: by 10.98.107.138 with SMTP id g132mr219106pfc.163.1523364565243; Tue, 10 Apr 2018 05:49:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523364565; cv=none; d=google.com; s=arc-20160816; b=H9r+EqJRi707hWCvQveQuE9zRDPQ47eS/8bNZzaADN230ATxwm+WP397vXyDK3jxyq 5AFeGSUhLa6UAo35z7ZeQ8pFCX1WgPxlYXx2VtJPAbC7bSxwCeKdZTHTPwPtWwcDxmUG 3d7YEfuM+MrN51IBZZRMRNtO3iF1bEqCZ1sqS34EZUTsYgfq2zz7x99yrk3EuSRhYtaM jKPbNTzDNKQPYKKna92bVscgN+5uh1P079H2wGfxFKfwaU5HhaAJB2TPOei5iygUZO5P I9SIF92736anmtRz241fNmO7Uj73dd2+G2ddgloQCyDVmYMoJVq6lL+bwfc3OGauafAq draA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=TVnBeYQpgiumAHO/UpQnIKbrx0JZ/p08x0IGySTJSP4=; b=cRQ8t/4jIlAsbu+sfNafBUnU02biVwTKAimuDDoCsKLstXuCvEH6FJDH5/82Zh+7s9 w2spYkPLNTVMMYmMeqVERiMHsvgIiRknx9AshnSS+MhpE0KVNE8XWbBZBcOiOHAx5hS3 8mUp/G80c8bpfXrTKOz9tVffAttJEMgr8YYlczVkxM0XxoilsGgzLbS8j1SDq/MBV+nt /sfXfzwe2ZRj7LSvgW6/lqUVKt1GdFxnRuZtq0qcLx7zFiNdRE5CrmGpRBREXzl1zWG/ cPUUijJB4zsIQeTeHFIcvjpycVDN4zTfnYbwRGpzIFwr6kNnkpu93+ZD8of/mU0lK3Vc wTdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cmpxchg.org header.s=x header.b=J86edhPU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j7-v6si2681353pll.223.2018.04.10.05.48.48; Tue, 10 Apr 2018 05:49:25 -0700 (PDT) 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=fail header.i=@cmpxchg.org header.s=x header.b=J86edhPU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753510AbeDJMnh (ORCPT + 99 others); Tue, 10 Apr 2018 08:43:37 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:50892 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753150AbeDJMnb (ORCPT ); Tue, 10 Apr 2018 08:43:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cmpxchg.org ; s=x; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=TVnBeYQpgiumAHO/UpQnIKbrx0JZ/p08x0IGySTJSP4=; b=J86edhPUba7pQBIfrW828g6YuC iId8Cc1OHpV7xdv94sVuJKuPrKboEaLdTmtIKHM/wmlBuZa+lYk66m4xMVZzpVsto6yFDshzCmwc4 SEtGkqOCSiX0uIL/pcnTRhSCGmwjlNELZvwwkSu4LMkT+4uoavt1G6NUyzTmn5HSNS0U=; Date: Tue, 10 Apr 2018 08:44:59 -0400 From: Johannes Weiner To: Minchan Kim Cc: Andrew Morton , linux-mm , LKML , Jan Kara , Chris Fries Subject: Re: [PATCH] mm: workingset: fix NULL ptr dereference Message-ID: <20180410124459.GB6334@cmpxchg.org> References: <20180409015815.235943-1-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180409015815.235943-1-minchan@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 09, 2018 at 10:58:15AM +0900, Minchan Kim wrote: > @@ -428,6 +428,7 @@ radix_tree_node_alloc(gfp_t gfp_mask, struct radix_tree_node *parent, > ret->exceptional = exceptional; > ret->parent = parent; > ret->root = root; > + INIT_LIST_HEAD(&ret->private_list); > } > return ret; > } > @@ -2234,7 +2235,6 @@ radix_tree_node_ctor(void *arg) > struct radix_tree_node *node = arg; > > memset(node, 0, sizeof(*node)); > - INIT_LIST_HEAD(&node->private_list); > } I have to NAK this. The slab constructor protocol requires objects to be in their initial allocation state at the time of being freed. If this isn't the case here, we need to fix whoever isn't doing this, not the alloc site.