Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4203782ybb; Tue, 7 Apr 2020 02:53:12 -0700 (PDT) X-Google-Smtp-Source: APiQypIufj7ZzXURgwW0rjhx5RSXN6rZgxwK9rOzAma9jDJIzt+3CV2mkSvco9p969KttiU/QewF X-Received: by 2002:aca:dbd6:: with SMTP id s205mr831158oig.109.1586253192114; Tue, 07 Apr 2020 02:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586253192; cv=none; d=google.com; s=arc-20160816; b=etLYUnD2kXYQGpRt6S3ptcSzKM0Agw3qIVgh/X0NKOyQUyDotR8qjLgZs6fhAQAnqy BBIY+3veSzmfXTwnioRRRf4j8i7ee/3vA5quAozvjsIcreWF4ItY+zd45F3vOd/1md9N 15DbOScP/1r++88mMRZ4APHjVxS1uBXeJy8d5fsqEdDIl9pj0fzDM54aDoH8M4Cb08QJ XhlEIVl7LdhUoHhsPd5GRTlsg94FEyd7v1xbuttzkT1vh3N4bE++1jfeqxXuw71P9Iat UQgWPurslnagcXJfIX0no0W49KAVCbxMy3KwS+fiJsAUoWgG54Ulkjqck5KJEaWel5FX pbZA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=XLhZCqqQ+XAe7Id+sLkm1mR2JnMwc/iwpAHwXkCFgUQ=; b=W4U7FSPXfx3NM6Gw1/QM7JDhoI4j1XpJLkYszANDQ/Zqr2bamXeR6UHYel9clZXdCt oYbi/kCST5dji4Vy3nLkNVPiHCHHK41ZgkcTGMO5mlMVbBDI7cmywMAiAJDPqrxI2qrR kSJzPJzPR4S0C7HpvD30QvLqmr4G6KkzOlJRfOd43eW8Wws6DJ3/os3THREhW5oRDyWb cJm7TXbTBEoeCUNIIM74DBZ2dT0G3PxHHZwl79yyKnPOCFnJaIQRSPurT08m4QEt4oOh qGAe5IChdAyMKojIQNTt0kgRkCzILPMrLmL/llB4XaJo8ThX45DmHjrQiZBkheGLo/E/ sYvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=iNG2m24U; 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=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si968364oor.75.2020.04.07.02.53.00; Tue, 07 Apr 2020 02:53:12 -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=pass header.i=@mediatek.com header.s=dk header.b=iNG2m24U; 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=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728158AbgDGJvT (ORCPT + 99 others); Tue, 7 Apr 2020 05:51:19 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:7649 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728093AbgDGJvS (ORCPT ); Tue, 7 Apr 2020 05:51:18 -0400 X-UUID: 5e6f45f9af8e4cba8c047962a43391fb-20200407 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=XLhZCqqQ+XAe7Id+sLkm1mR2JnMwc/iwpAHwXkCFgUQ=; b=iNG2m24UbyP+zalcyLC9KtRSw+sVWZcos6iUdHCiqUfyRjX/A6WHvCt5MzK2MAaeH2s5WS0YR6d0KEiPRIf1RtdA2y2MG9I7Z2sXezcxqQiiYPdoyoxc2c9XMqFMiTI89LWTY55hBDqOpx+EfxjKpUvO7mtVsPyqbVWj/ac/v8I=; X-UUID: 5e6f45f9af8e4cba8c047962a43391fb-20200407 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 269059542; Tue, 07 Apr 2020 17:51:14 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 7 Apr 2020 17:51:10 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 7 Apr 2020 17:51:09 +0800 From: Miles Chen To: Andrew Morton CC: , , , , Miles Chen Subject: [PATCH] mm/gup: fix null pointer dereference detected by coverity Date: Tue, 7 Apr 2020 17:51:07 +0800 Message-ID: <20200407095107.1988-1-miles.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: F11F2E2A2FF92E73BAB9EDC1B554CE3E5CCB1D0ABAD6F0EF683C94EC7DB3A3AF2000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SW4gZml4dXBfdXNlcl9mYXVsdCgpLCBpdCBpcyBwb3NzaWJsZSB0aGF0IHVubG9ja2VkIGlzIE5V TEwsDQpzbyB3ZSBzaG91bGQgdGVzdCB1bmxvY2tlZCBiZWZvcmUgdXNpbmcgaXQuDQoNCkZvciBl eGFtcGxlLCBpbiBhcmNoL2FyYy9rZXJuZWwvcHJvY2Vzcy5jLCBOVUxMIGlzIHBhc3NlZA0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