Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3011053imu; Fri, 23 Nov 2018 19:18:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/XAnH/kT1fii24WB0x+/n0EVq4GJl6X34pQke3vgMjDyskeEjqboTcTFm0FgY6tBSD1Hws0 X-Received: by 2002:a17:902:42e4:: with SMTP id h91mr18721622pld.18.1543029510035; Fri, 23 Nov 2018 19:18:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543029510; cv=none; d=google.com; s=arc-20160816; b=Hnbh+aIYMQ0EO3Hz8Sj6xHW3CdVbblqP5FQ4K9Hq9Q4CBtDVxmot0557FXpkRB0Knt 5Oyp+fm67EiG+qTHK8KHbux10Xwh2GoFfNJb+tnwl3gRbMJm3XmNpdpprmaLfQntilJE Z6JHkTFz90FzMBHMPQqHce10m/tCSIhLd6HUZFITJ3l0LpA+NOhJUtUKFqvq80XptJo1 9NG8tIqvht5PV0ht8ISf7nZ2ktwttWn412+tiHLdgPai7pi2tkXtC8H1Z4DqdMUDKPTz EqAARCc4EAiEYDS78fVJA3wChwo2xn2d9zJ89AZfVYh27T6O2NHDvYIt8H2wuYts31va BxxQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=35SA+A3zSGOUwg2DuEDiDQyYR9o/qAXgi6nZL2aj8/Q=; b=zv4XnHX+bxjE/HzuiaPoFmZkIVsZIaUvpZBnRAv40CR7nHNxDQiOilE7Uv789BzPOK 8Rxm96KofTKacOatOHO5ixqJi5kYYai5muYdNtzg1RLDMP23iUgFrKI9hjK5i5DFOJCw 6BQQFSKOk1CWvHNzjuEvn63I3klP5umReIcHxfi4eAuU680zzAdMHhZdfJIb0dta31TX cgxmZMCFnJLbC8q+prbWQUVScAXavaoyx5fQV284tUj1nNwYx5GFb7P8QXoFu11gCd5T rf/RInTp3qgjz+wYx4bhJhhcPc8h4N432zAXjQArkqFs0I7R2t9LNQdME6Vg8elJd/+u T5fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=T6LI94Z0; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b14si56329679pgj.20.2018.11.23.19.18.15; Fri, 23 Nov 2018 19:18:29 -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=@ffwll.ch header.s=google header.b=T6LI94Z0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406038AbeKWDb2 (ORCPT + 99 others); Thu, 22 Nov 2018 22:31:28 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:42743 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731065AbeKWDb0 (ORCPT ); Thu, 22 Nov 2018 22:31:26 -0500 Received: by mail-ed1-f65.google.com with SMTP id j6so8205441edp.9 for ; Thu, 22 Nov 2018 08:51:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=35SA+A3zSGOUwg2DuEDiDQyYR9o/qAXgi6nZL2aj8/Q=; b=T6LI94Z0asV3yzmoBf2IesRD6VsGBDpIYF984cFK/5uoflQEU62+7Gv+8nL8dSimEH VVRZdWL4nrC7LT8+R6AClQYQf+KnkfZA92h+SBHYngfeeoFcXGNrLQCHsLR54Vv7Llds ZElU3K4qoo2YLnpkZIDN5WzFwtGdErLMEcxIg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=35SA+A3zSGOUwg2DuEDiDQyYR9o/qAXgi6nZL2aj8/Q=; b=K5H2jmLPoxUxNfqR/iYIPf2jLjMr9YY4WfjTelVQ6NR2TCzeTRpPU7X2RpK9uPYqvX x1v9ZqNKvGJ4YorLlaLYq5SbrbpMt5szAc+9Gij6Wns3XmdmDX6+ETOvc9aNlvpGGhtr UI1OrNvMZKjDWKB9oL/QNxmsT0iz6lR/rPY2fNHtJhQ2TyOxpW3spFZvUpKW4/eG/EWl Urvid0lZFRaeNB3c1FhPpOs6O3ayfkJJyskZENopG0q9kVSJNBeem6TAmceAdlxDY7wG NRUSPNQD/b7VyGftXmLOihtNaAgK45suO5c9yg1ucoaC2eLCriYa7Ii/UXnMDDaqGFg8 QxXQ== X-Gm-Message-State: AA+aEWbQkYL2TyuL3STgk3xHc50f/Q5hWT+S/ymWnvRHQB9Xg5PRwdHg CWfBCKTMya+TVvDtSdz3Np1vR18fpAs= X-Received: by 2002:a50:bdc8:: with SMTP id z8mr3626337edh.46.1542905474153; Thu, 22 Nov 2018 08:51:14 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id s12sm12914780edb.43.2018.11.22.08.51.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Nov 2018 08:51:13 -0800 (PST) From: Daniel Vetter To: LKML Cc: Linux MM , Intel Graphics Development , DRI Development , Daniel Vetter , Andrew Morton , Michal Hocko , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Rientjes , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Paolo Bonzini , Daniel Vetter Subject: [PATCH 1/3] mm: Check if mmu notifier callbacks are allowed to fail Date: Thu, 22 Nov 2018 17:51:04 +0100 Message-Id: <20181122165106.18238-2-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181122165106.18238-1-daniel.vetter@ffwll.ch> References: <20181122165106.18238-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just a bit of paranoia, since if we start pushing this deep into callchains it's hard to spot all places where an mmu notifier implementation might fail when it's not allowed to. Cc: Andrew Morton Cc: Michal Hocko Cc: "Christian König" Cc: David Rientjes Cc: Daniel Vetter Cc: "Jérôme Glisse" Cc: linux-mm@kvack.org Cc: Paolo Bonzini Signed-off-by: Daniel Vetter --- mm/mmu_notifier.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c index 5119ff846769..59e102589a25 100644 --- a/mm/mmu_notifier.c +++ b/mm/mmu_notifier.c @@ -190,6 +190,8 @@ int __mmu_notifier_invalidate_range_start(struct mm_struct *mm, pr_info("%pS callback failed with %d in %sblockable context.\n", mn->ops->invalidate_range_start, _ret, !blockable ? "non-" : ""); + WARN(blockable,"%pS callback failure not allowed\n", + mn->ops->invalidate_range_start); ret = _ret; } } -- 2.19.1