Message ID | 20180712143158.7d5njt37x2bvq2xr@kshutemo-mobl1 (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D4B50602C8 for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 12 Jul 2018 14:32:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCFBC28585 for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 12 Jul 2018 14:32:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0E06285D8; Thu, 12 Jul 2018 14:32:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21C9A28585 for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 12 Jul 2018 14:32:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 02DC46B0003; Thu, 12 Jul 2018 10:32:07 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id F1E7B6B0006; Thu, 12 Jul 2018 10:32:06 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E0E2E6B0007; Thu, 12 Jul 2018 10:32:06 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f197.google.com (mail-pf0-f197.google.com [209.85.192.197]) by kanga.kvack.org (Postfix) with ESMTP id A14666B0003 for <linux-mm@kvack.org>; Thu, 12 Jul 2018 10:32:06 -0400 (EDT) Received: by mail-pf0-f197.google.com with SMTP id u8-v6so11208168pfn.18 for <linux-mm@kvack.org>; Thu, 12 Jul 2018 07:32:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:date:from:to:cc:subject :message-id:references:mime-version:content-disposition:in-reply-to :user-agent; bh=+cY5515XQFFJf75PglpAaqgaiPiDB97yZJu28sfA6Y4=; b=l7K3E9wLLHaUkbzsYrfWYCP1+GIqfrBHrA1PcxFUnc0HiD9MBVacSXgX9POg9OmyuX ntZdpXaBOmExsgUppubEHNh7BZOHrcVmwEo/syahZMTNRqy5On/BvYJYgH6eVKdmMdtd XcXbLJW47PRPVT3HOb8U7zg/vxN7u8y4OTPq0mSfcWQSNolxVKIXRmlI86V3DfGkRdGJ ZLiKiRA8cpLSljpeWk4dCOEpi51Q1OUWLFI2RbkAElXGqixv18jquuXPRQN/V++TCXb9 fXbcYkRNpKjdxl8N9JimToQUPDWlxHFm03Uc7JivjKZvf9VD8knYITNVaOnluMxN7orh oVDA== X-Gm-Message-State: AOUpUlFnmAIMMbiqMwYQz28Iun6dUzq1M1x4yTO4jqSvWpfJblE7RWu4 X/pPOSQ69kHHBpBE8a5gQ3v1CIlOq11xaTvQOQnPHYO4Dyc9vpX3yavDeWoI7tCoaRiVS3dEmFN pp64GLGG3RWRoSeSxiKIj0VEziyTkmggpLGqHwUgGW6emHgANnM0ZfiT1ymwfncRIf1ONvLq7R5 k73fJSXCe/ExeG9j1JGMgbAeOWK0kS3D9n9wOwY10pmtgx7kDy5pw1gNQYhKlOHLVXgybmBsuCE zb976AfaRZ0y7ehL/M9epWJYQCO1Kv/io5hlDTZFQZFCFUaUjeUyM016RqSzZihFP1pnBEnJA2G MAT2hDVa6603YgrHxu0c0ws7kqxPhdeRGF/caa638QX7BZDtmwq3IMaToLbTzJ4GaLTEkVdrGB2 Z X-Received: by 2002:a63:8449:: with SMTP id k70-v6mr2338637pgd.309.1531405926279; Thu, 12 Jul 2018 07:32:06 -0700 (PDT) X-Received: by 2002:a63:8449:: with SMTP id k70-v6mr2338552pgd.309.1531405925047; Thu, 12 Jul 2018 07:32:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531405925; cv=none; d=google.com; s=arc-20160816; b=XlMK7p8F6PxymI74E90tIKx+9+ZyCjLhixdqOAEKmftIgb6BNhc4Z6rKU1FR2uzuIs 2gzKc7qbSuzyX/8R67bJJQ1GQHlBrPsBfOGB+bFlc62mYdWKL8OOZYD0VT+AXrmZbQIw bCj40OkJxk12Epl74yylHO8LyotcG2TRWfoO8xWs8K3jzXMadI5VYqWaFAv107brwgLJ qZqpsebtXyFbeYcFenyWuBky1dD04fEUoEKQ0TWXLsYYM4yzpIY4RHNEcBL2ewIFIKMy beXfucJOSwj28WMVIln20hJp2EUcPxTIm2OmfqBjtIR+q0kAcUtoQnwleooMwFah/f4U 5JJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=+cY5515XQFFJf75PglpAaqgaiPiDB97yZJu28sfA6Y4=; b=ql6Go6W/e9gHaZQqjmJb5TZh51bYyZtzZ7FScYDy3+tbGl2WGPPHYOm5aWwzaEh+dE 24G6yjITwXrShcfiN5qGygc6P2ReX1v0mNMtaIv7qQQT9ynNDs0/yNk031mKeyqoZjS1 SRLEiz4hBFsWQTrGtD1GfzsC7yzLKo+zjADciLRtRNA4eyCn29N9TjzlhjbiE4B+YErB 2haHp2XR42htgaHrm1CzhboHVnhB5g20KQrezLvZdiGM3iAuF9Xn+VYHxXFJKHMuf5Mc WgbQAwLXgm0TpWXQOiCzwwGGoh2VLDuZ8OKSLJrBc+7YCfQFHs0ZeQcYUgnSzVMbCuDi sIDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="rbpQM/Up"; spf=neutral (google.com: 209.85.220.65 is neither permitted nor denied by best guess record for domain of kirill@shutemov.name) smtp.mailfrom=kirill@shutemov.name Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id u3-v6sor5663442pgr.176.2018.07.12.07.32.04 for <linux-mm@kvack.org> (Google Transport Security); Thu, 12 Jul 2018 07:32:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.65 is neither permitted nor denied by best guess record for domain of kirill@shutemov.name) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="rbpQM/Up"; spf=neutral (google.com: 209.85.220.65 is neither permitted nor denied by best guess record for domain of kirill@shutemov.name) smtp.mailfrom=kirill@shutemov.name DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+cY5515XQFFJf75PglpAaqgaiPiDB97yZJu28sfA6Y4=; b=rbpQM/Up+ZeG1AdQ5qpnl00HOm4hZH/OAuTq2Y0R8WqBVeueTN+0wHJ06PEHLKlU9L YEaNCegM5FZR3bFrpByqcqbKjSrCBqQmT2n3vZP1qMvo4ROAGUPqc99y/QyTmVvg7lQ7 J/yBFX+PYCO4warjO7BKFa0RCrSpsBqJBqwwFEIXkJl8xsTJcLGlNRIG6j+/ZhLfCi15 njf2Wi1n+J6aWDFYaOcUHrxbEO89dr8Xi6xrWnyvgA2/Gu4sA0HB8RGD6kOofrKQwnBY CqME6i3gm0/M6XmvJJLLBXDZi/8R02Eo3R0TdqHwSGnUf8K2ItrpBnBK1P8W4cTPYufQ JqAw== X-Google-Smtp-Source: AAOMgpdCmyHARUxbjH1+qsGtBqcJYk5qaYcMFibt+NSWjHTQZcEKv/WgxhWcTQOY6CSk70QvPu3qkQ== X-Received: by 2002:a65:5641:: with SMTP id m1-v6mr2427110pgs.246.1531405924603; Thu, 12 Jul 2018 07:32:04 -0700 (PDT) Received: from kshutemo-mobl1.localdomain ([134.134.139.83]) by smtp.gmail.com with ESMTPSA id m6-v6sm33241303pfh.153.2018.07.12.07.32.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 07:32:03 -0700 (PDT) Received: by kshutemo-mobl1.localdomain (Postfix, from userid 1000) id 3560630029E; Thu, 12 Jul 2018 17:31:59 +0300 (+03) Date: Thu, 12 Jul 2018 17:31:59 +0300 From: "Kirill A. Shutemov" <kirill@shutemov.name> To: Andrew Morton <akpm@linux-foundation.org> Cc: syzbot <syzbot+120abb1c3f7bfdc523f7@syzkaller.appspotmail.com>, jglisse@redhat.com, kirill.shutemov@linux.intel.com, ldufour@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhocko@suse.com, minchan@kernel.org, ross.zwisler@linux.intel.com, sfr@canb.auug.org.au, syzkaller-bugs@googlegroups.com, ying.huang@intel.com Subject: Re: general protection fault in _vm_normal_page Message-ID: <20180712143158.7d5njt37x2bvq2xr@kshutemo-mobl1> References: <00000000000010c9390570bc0643@google.com> <20180711140449.3702358d7e8898017e34dcfd@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180711140449.3702358d7e8898017e34dcfd@linux-foundation.org> User-Agent: NeoMutt/20180622 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/mm/mmap.c b/mm/mmap.c index 74d4d2a8fe08..eedac20735c1 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1776,6 +1776,11 @@ unsigned long mmap_region(struct file *file, unsigned long addr, */ vma->vm_file = get_file(file); error = call_mmap(file, vma); + + /* All mappings must have ->vm_ops set */ + if (!vma->vm_ops) + vma->vm_ops = &dummy_vm_ops; + if (error) goto unmap_and_free_vma; @@ -1788,10 +1793,6 @@ unsigned long mmap_region(struct file *file, unsigned long addr, */ WARN_ON_ONCE(addr != vma->vm_start); - /* All mappings must have ->vm_ops set */ - if (!vma->vm_ops) - vma->vm_ops = &dummy_vm_ops; - addr = vma->vm_start; vm_flags = vma->vm_flags; } else if (vm_flags & VM_SHARED) {