Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3079452rwd; Wed, 14 Jun 2023 10:55:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5mnvAarcBcbRUxkzDaUkD4zv+wTSeEebQnnmhVJLumpV4ubJr6fRDiY+tDPnnMXilUYvue X-Received: by 2002:a05:6402:26ce:b0:516:5b18:a9f1 with SMTP id x14-20020a05640226ce00b005165b18a9f1mr2717305edd.0.1686765352701; Wed, 14 Jun 2023 10:55:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686765352; cv=none; d=google.com; s=arc-20160816; b=aefWjRHde4CGV+U8Nye+t3uwaUxwBnt/hnpJvAW3ZsEmrwVL9A/y5HjWh3i5o1KswA OUfwgu10P65ytBb9jqU4pHBunvfnpWOjJwhG2BB1NL9e9e3GeJAQqWgOhvopzShruPnZ wHQnTjEw3e5AQAlAgARhPaj/VkspD8O2VJFFaKCn2Tk3ig3eG1gKQtKIYW/e8ghUIDEM /AzEsY2auKYGKgFry0fUHfPKx0MfhSTP8IX9FuAui777a/2e8XGjuDCNQIuULU6kahhD 7sOULT2b0jH5wyLJ7Y/pECVFfssZDi/D8upqVg0CZau628p1xMXC8C6eDFj5UTNEOgnO 9cRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=+mtQ9KRgsRV3qb9QuuaC8ZHbI3X0Zw+V38td7BGTBqI=; b=rAqWll+wEvVD+Fk+SYcjQQDwQwj+HYTIQDHEyPEybv/lHvn7ug7qjNj9WQV6oWeUb2 5maI2aKX0YhqGUYqDqYr5ADr0fFW1CCtsa/jQsVwpUSTSOC2Z4aPfFMuXVACOYvavFug 3JM0L/SDHt8p+yXL6qH7qdrtsmNeRkGTXb2cH/JQT9clZEU+DcAvG/1dYUj3NqtZRHqH VBAPrtiaYXBXG/SFC76GrKLQKaoHhiS0yTQMi1f75kYqpckxIGOcdzKG9cFbZTf9rRcp kFWfFIUBv8Xf0Bm3fAYN70MudZ28TUeYiEGnfZk+pY+ucJ6Ei84oB1WPNaiqrWGdmVjk qOuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=j6SmFN2Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dy19-20020a05640231f300b0050bc94fe05csi9229871edb.117.2023.06.14.10.55.27; Wed, 14 Jun 2023 10:55:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=j6SmFN2Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236282AbjFNQpe (ORCPT + 99 others); Wed, 14 Jun 2023 12:45:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238639AbjFNQpL (ORCPT ); Wed, 14 Jun 2023 12:45:11 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F22A326A6 for ; Wed, 14 Jun 2023 09:45:00 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1b3dd3ca7adso24445735ad.3 for ; Wed, 14 Jun 2023 09:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686761100; x=1689353100; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=+mtQ9KRgsRV3qb9QuuaC8ZHbI3X0Zw+V38td7BGTBqI=; b=j6SmFN2Yd9SEmBnmduo/sXgL3GdVdW191lYP9PKrlEWZXDPohVmh21QZKCMmLFICfi 2O5TkdEok4yQ27votYVvZIq31e0INlTtNojlFiJT0VXLC6SxwH9pQgavHqcsrENHs2sl kRAB3ufu1fxZxP+eibzvJSi7h9eJhEogFm9PSob8PoO7QTjrLwvRrnM7iQmrBaGUnA1V iVqkcgL7dG6nMMw7lE9q7Ib6H7UQHfwn4/GiaJbAv4gtJ17cYriuIaAgrYDfSYaJ2Vjl YVI3HxnOh4VbMeN7djrYL05w/WSLL7guZd1Ru7Ei+LmTSw70LGIQqCxQhHvRhMf1P/xa xXnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686761100; x=1689353100; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+mtQ9KRgsRV3qb9QuuaC8ZHbI3X0Zw+V38td7BGTBqI=; b=ir50GoOdUM73XIdFWo6isuexm1k2osFrAJOsr6r4RJ9wpeNAqzV+vVk5cLASU5Ue44 mV5mP6w91vwQW9JR6fv7Cai6HKe2zGQBgxHcOYKI3q3fgEEsLFsqNgorIfOlUgHgEC/E FSlmhIVlD1qItVUi3x8xlRq+NnFD7IgVFWVtlYPqgUorZNvLZIF88uvOAAZix3YMECBh dPJJ33gux4lzYIJKCGEI/L/y5X1Ee7zkeTPumiWzZCWTiqH+E7U9EGfjOYv5+vFnpG6n mRwX1mzAfm/la5sjOKoR3g9N07sofk0CZD8gEfMwZ+fev7xKBrhVpoHAGM53Rh8qqK5k 0k2g== X-Gm-Message-State: AC+VfDyOJyQPjV1sPpIFXcvdbI5iM05Ixra0hNZIPQMOtiCxfws7aXFH pBHU3k9lWSAQdnSq4RWV8vZVwQsKScVJyiSI X-Received: by 2002:a17:902:f7c3:b0:1b3:cc77:c8ba with SMTP id h3-20020a170902f7c300b001b3cc77c8bamr9063957plw.59.1686761100334; Wed, 14 Jun 2023 09:45:00 -0700 (PDT) Received: from sumitra.com ([117.245.169.18]) by smtp.gmail.com with ESMTPSA id jd4-20020a170903260400b001b3b83b7d4esm7576873plb.211.2023.06.14.09.44.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 09:44:59 -0700 (PDT) Date: Wed, 14 Jun 2023 09:44:54 -0700 From: Sumitra Sharma To: Forest Bond , Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Ira Weiny , Fabio , Deepak R Varma , Sumitra Sharma Subject: [PATCH] drivers/target: Call page_address() on page acquired with GFP_KERNEL flag Message-ID: <20230614164454.GA390511@sumitra.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org rd_allocate_sgl_table() acquires a page with alloc_pages(GFP_KERNEL, 0). Pages allocated with GFP_KERNEL cannot come from Highmem. This is why there is no need to call kmap() on them. Therefore, use a plain page_address() on that page. Signed-off-by: Sumitra Sharma --- drivers/target/target_core_rd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/target/target_core_rd.c b/drivers/target/target_core_rd.c index 6648c1c90e19..d8ea6aff39a2 100644 --- a/drivers/target/target_core_rd.c +++ b/drivers/target/target_core_rd.c @@ -159,9 +159,8 @@ static int rd_allocate_sgl_table(struct rd_dev *rd_dev, struct rd_dev_sg_table * sg_assign_page(&sg[j], pg); sg[j].length = PAGE_SIZE; - p = kmap(pg); + p = page_address(pg); memset(p, init_payload, PAGE_SIZE); - kunmap(pg); } page_offset += sg_per_table; -- 2.25.1