From patchwork Mon Jul 12 06:06:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 476406 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8033AC07E9B for ; Mon, 12 Jul 2021 06:15:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6800D610A6 for ; Mon, 12 Jul 2021 06:15:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231911AbhGLGRx (ORCPT ); Mon, 12 Jul 2021 02:17:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:36046 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233333AbhGLGRv (ORCPT ); Mon, 12 Jul 2021 02:17:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DF95C61042; Mon, 12 Jul 2021 06:15:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626070503; bh=I8yX76CWi35+CBkApP6M2FZ0fbXrdCmns726GOCxKYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qByVRGFNqew3r2kGIopnsFsFOQ0sBbu0QL0bw0qYA7tK09QxUPE3idLhcpEtJiYz1 bMBYeM4L7hw3kMOSRcQAzE/x5HgzGBMSPCevRerwo1otiyrJ3t/fJADc8EqhNCn1Jv S1Tgy24j8xWLJVSx6tpvC6arCc7iOfKgvI0UZmFs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Al Viro Subject: [PATCH 5.4 019/348] [xarray] iov_iter_fault_in_readable() should do nothing in xarray case Date: Mon, 12 Jul 2021 08:06:43 +0200 Message-Id: <20210712060702.713561901@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060659.886176320@linuxfoundation.org> References: <20210712060659.886176320@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Al Viro commit 0e8f0d67401589a141950856902c7d0ec8d9c985 upstream. ... and actually should just check it's given an iovec-backed iterator in the first place. Cc: stable@vger.kernel.org Signed-off-by: Al Viro Signed-off-by: Greg Kroah-Hartman --- lib/iov_iter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -422,7 +422,7 @@ int iov_iter_fault_in_readable(struct io int err; struct iovec v; - if (!(i->type & (ITER_BVEC|ITER_KVEC))) { + if (iter_is_iovec(i)) { iterate_iovec(i, bytes, v, iov, skip, ({ err = fault_in_pages_readable(v.iov_base, v.iov_len); if (unlikely(err))