Message ID | 153077338570.40830.10517740093746798315.stgit@dwillia2-desk3.amr.corp.intel.com (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 E2B5560116 for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 5 Jul 2018 06:59:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D077528E01 for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 5 Jul 2018 06:59:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C462428E49; Thu, 5 Jul 2018 06:59:47 +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, 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 5BBEC28E66 for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 5 Jul 2018 06:59:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CDFEA6B0273; Thu, 5 Jul 2018 02:59:45 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C91C76B0274; Thu, 5 Jul 2018 02:59:45 -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 B09D96B0275; Thu, 5 Jul 2018 02:59:45 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id 710316B0273 for <linux-mm@kvack.org>; Thu, 5 Jul 2018 02:59:45 -0400 (EDT) Received: by mail-pf0-f200.google.com with SMTP id a12-v6so4261482pfn.12 for <linux-mm@kvack.org>; Wed, 04 Jul 2018 23:59:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:subject:from :to:cc:date:message-id:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=JZVKZudZ2e9Gxl9A27oiEK19l/Tgm4N/lY57RGoU+Vs=; b=JdyzfNz8t4YNrYkp+K0B0JPUqiaI3Bg7LQZ1tyzFEZvz2edgPIJpOa2MRIIRwLaiJj mumiuISU+21ojBC4byjZXrtPx23tkXDkEQGN89/radf5Ntp0C8iVIQFLeAgWh5C+7H9z fxGubm/FRcKYUyOJUliZFb4o6lwuiKcKAwNf+CEwA6Cqyk9V2qC7WllW2PPBE5AeZ7lq e+wwFxZ9KlZOYXG2AvOBAWWIbf5Fj3n5OPp50uUBrTlyWbsjUg64g5t/iaM7kxl41uAZ 3Z/ROrNq0IavxCcGhfU2BoJCVVIIhXzCmhp7skgwKaO90OR6jXOBUfJjh8RM1jqKuldm e6pQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Gm-Message-State: APt69E11thJJLql73Oc8jUzOPhn8zym3Q6tz4bA8UxugpZSm3Irzo20c E4FME9BXNVquyHZh1wlMx9STkK8fMQ1GnJdb5UY8LuwfsIhjZ1e86TUKvtIBZ9y3lphypn86zre w/vHMUZxzqBRFDT+zxeDiey4s/yqf4QCs9xnbrIzvBW9PyQ472lrGag9CAbvczLyvsQ== X-Received: by 2002:a62:fc5:: with SMTP id 66-v6mr494730pfp.237.1530773985159; Wed, 04 Jul 2018 23:59:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpetuYW5+mT0wjXXQV8k51sJXiKeJBtPrm2HRfBZoElfASyKoH2mvkuS+o7i8Tj8woT8McDr X-Received: by 2002:a62:fc5:: with SMTP id 66-v6mr494671pfp.237.1530773983886; Wed, 04 Jul 2018 23:59:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530773983; cv=none; d=google.com; s=arc-20160816; b=PB2LMFRR1va4y/+Yor+LOymw2V68KRpljeO4xQQ8+MLoIlrJCLY9spWX6wQmfruEMp xynZDlb32x+Kcs2q7tUPvipOYyhup4ZtPN+jmsIE7d5UqeK7D4m3L1U3wn4F60/xrRwk ICls2sf5sPxz/byoZf4E1mVaxiPmKYxg31IGxHuAiZVnFYnG3Mm3JDJHlU83Heu2MeYi Me1W1y8Jhao3UypNnejl5z/U5Qoz5t1TULCr0JLFHGxdinK3P+i77PXWu9tXmLw7uAsr SeyQ9Iv+eAgjNZljyrtptWA+v/RImCtFxJ9bpxFqabQbtVxo80+x32XswzGbuqnSAFhq XYLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:message-id:date:cc:to:from:subject :arc-authentication-results; bh=JZVKZudZ2e9Gxl9A27oiEK19l/Tgm4N/lY57RGoU+Vs=; b=U5tuAk6LkPMBEqwUlqygQJsKlJcmZLWgprthWdHE6tTDXDZtf/lmTkR6BRDQvWKul5 DnCMlxw1FjPb1KBfnLgl6XQvSvkEOeAnI+6CIQXTiqWHLaJhzPJMiXa0gjdE3Z+jgNTH hXevK9HUKofpXb0mF9IYZaY/Ck7YaT0X+Eag4fm1QSwe3PJthhhSst2IqGSSb58e50x1 qkI6wx+dpX7JIbpESKTPRcZxXsKLUefVXbQ79zrAyGukqMsB7Xz5b5mXFP+ikRaDMLW4 geIgotuQ88hlkhBJDXmkuCWhA2smusWwmhfBeopiGmQEYO7jWMkPEB3lK+YbLpkgnM8e GmcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga05.intel.com (mga05.intel.com. [192.55.52.43]) by mx.google.com with ESMTPS id j135-v6si6084553pfd.207.2018.07.04.23.59.43 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jul 2018 23:59:43 -0700 (PDT) Received-SPF: pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.43 as permitted sender) client-ip=192.55.52.43; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jul 2018 23:59:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,311,1526367600"; d="scan'208";a="70215726" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga001.jf.intel.com with ESMTP; 04 Jul 2018 23:59:43 -0700 Subject: [PATCH 08/13] s390/block/dcssblk: check the validity of the pointer pfn From: Dan Williams <dan.j.williams@intel.com> To: akpm@linux-foundation.org Cc: Huaisheng Ye <yehs1@lenovo.com>, Jan Kara <jack@suse.cz>, vishal.l.verma@intel.com, hch@lst.de, linux-nvdimm@lists.01.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Date: Wed, 04 Jul 2018 23:49:45 -0700 Message-ID: <153077338570.40830.10517740093746798315.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <153077334130.40830.2714147692560185329.stgit@dwillia2-desk3.amr.corp.intel.com> References: <153077334130.40830.2714147692560185329.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index ed607288e696..a645b2c93c34 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c @@ -923,8 +923,9 @@ __dcssblk_direct_access(struct dcssblk_dev_info *dev_info, pgoff_t pgoff, dev_sz = dev_info->end - dev_info->start + 1; *kaddr = (void *) dev_info->start + offset; - *pfn = __pfn_to_pfn_t(PFN_DOWN(dev_info->start + offset), - PFN_DEV|PFN_SPECIAL); + if (pfn) + *pfn = __pfn_to_pfn_t(PFN_DOWN(dev_info->start + offset), + PFN_DEV|PFN_SPECIAL); return (dev_sz - offset) / PAGE_SIZE; }