Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp3698385ooa; Mon, 13 Aug 2018 16:40:53 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxUViFvVfWCs/2bMz78MZ0mJS0ynqUJXqBaVRUiOPwpKMiL8D5Y9QlWbpPD8wh0Wpd7eJGP X-Received: by 2002:a65:5307:: with SMTP id m7-v6mr16641931pgq.431.1534203653733; Mon, 13 Aug 2018 16:40:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534203653; cv=none; d=google.com; s=arc-20160816; b=QXM+5rGHhgWnSiG2z36tfm5XX0pqH4oGSiamc8zmEDPWOD3wv7UV9w5X2LgJeaGjDh 2zvLaxAt9ErovuHwb80tFJ1GMdSSXgnY/tn/MnVpD0JOmuM09tw/etQQU61/DvY+T+NA 0AfDDu/HZW7iv9oXt5X/RP51JE+FbHlD8MgSSwATQlAwMXQ9xV2crLgWiFMYLELYZyyV eiZBxmELUuYx8l97Qppxct0FJ05NFFGkpCNSAq6kXuRzBy1ngMWIKzc68VlcB0W+rRrR h6vKV5bH4l/na8wGZ93Gl8HhHe10LNjQgF4Xtb2DkWCQfkKwBq15SYLWdp2leHSRqMaZ jWyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature :arc-authentication-results; bh=7e7HdXoi9bnRKx/iR6BbLaDysyKfZGcjHn6Pl8qK/5I=; b=syPRv8bTStHgb0SeZiiocg17IEl9m0x1fqGMdKSElqvHwGktBbfwDas+YxHBHxRY1n CuaKuRgq7nX5dl4m5H9ZT3OeD8Es0qNzthuJFAh2EGvEeWYZfgt/QjDvG7ouZKCZQPRw YUGeNXXFVv6gqkwMSlPIHi4Q3MXSxxEt8B89Vtdj7RdcaxWrfDqD2GccFi20836c7Inf ZHXdEnQhghg2/hCMliFArwsSo1my7kIWDRRzrwHfsdg5auflZYA1vU8Vb6jHoD5SM/bV N90kpEj69we1EbyFtTy0T0M8Q12veNGKHy/EJ+ZEFxcxAybDGllMLg+i9gedkq6pdqjP xZ1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nDZ7j51S; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p83-v6si19388680pfa.180.2018.08.13.16.40.38; Mon, 13 Aug 2018 16:40:53 -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=@google.com header.s=20161025 header.b=nDZ7j51S; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732545AbeHNCYC (ORCPT + 99 others); Mon, 13 Aug 2018 22:24:02 -0400 Received: from mail-ua1-f73.google.com ([209.85.222.73]:41061 "EHLO mail-ua1-f73.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729947AbeHNCYB (ORCPT ); Mon, 13 Aug 2018 22:24:01 -0400 Received: by mail-ua1-f73.google.com with SMTP id c13-v6so8509766uao.8 for ; Mon, 13 Aug 2018 16:39:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=7e7HdXoi9bnRKx/iR6BbLaDysyKfZGcjHn6Pl8qK/5I=; b=nDZ7j51ShDEBvXgZmxOdZoWHaExEK882YPmaGztRBk65AiNO11M9gpsMqkIm7XdIaa 8FpNndjwDvOegkfNOef5yydeXpJkwCxNYqoFXT+HNuTuA25G6S7JN+dNJSBkkmozkio0 wALhWV8+3BKeFrboc89FQlUQXl0Ox3ZLr9d1kQsv9l6KZKYZFyHeFuyIUjB8clqT0iJO LCKxIOwXDxI7tXshs1GvO9OB7TNBhplIC2i/KA9SIM1oPa/ruWkCbkRHkaC4HMse6v08 8lmuLq3+INhdCFL3ndAtWrfHNo9nYgxzdevm1gTPwUUtuqsU/BKhO9o6QinoB9taomLd MmGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=7e7HdXoi9bnRKx/iR6BbLaDysyKfZGcjHn6Pl8qK/5I=; b=lPPxIh7bkyXbYq6TQn0opcWoyiSkGYcZZhI6tINjlIdUexZB+wcv3UBNple1cc7/uq qpEcpRBE+pX+P/1U683rx8ev8iB9f5+UERl13rbZrWBf355eF8VFDhHOC1q/6nQDVjBQ xY3R7ce/USwdt+f7/xUPZzO+PIvjNIDTKWqdPd5nf13k2bLK1/KODUOkmL6LKL+Dagbn ni1PqlNv4kbFgvoz/5OWT5qtGvIO4y78zQWBsGAe6BCycWGQ5c5T0IJrYsuxIVtFUc73 0WW/ZeL8vCcxXDCl7Zwf3XEUGZsjbxoP3Y5/JAXChbE1WDvf/4T755bxTiPXmFZJDbqf Ce3g== X-Gm-Message-State: AOUpUlFtEGVNycgnnMUyUE+oS4LouUtw+sS/Pdn7a/dZbzympIgUCpmh OmTMJdPRCCxki7DrIV16dRNibNwH X-Received: by 2002:a1f:898f:: with SMTP id l137-v6mr10674988vkd.33.1534203572817; Mon, 13 Aug 2018 16:39:32 -0700 (PDT) Date: Mon, 13 Aug 2018 16:38:36 -0700 In-Reply-To: <20180813233839.190855-1-rkir@google.com> Message-Id: <20180813233839.190855-5-rkir@google.com> Mime-Version: 1.0 References: <20180813233839.190855-1-rkir@google.com> X-Mailer: git-send-email 2.18.0.865.gffc8e1a3cd6-goog Subject: [PATCH 5/9] platform: goldfish: pipe: Update the comment for GFP_ATOMIC From: rkir@google.com To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, tkjos@google.com, Roman Kiryanov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Roman Kiryanov Provide an explanation why GFP_ATOMIC is needed to prevent changing it to other values. Signed-off-by: Roman Kiryanov --- drivers/platform/goldfish/goldfish_pipe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c index 8f9580454154..a4db4d12b09c 100644 --- a/drivers/platform/goldfish/goldfish_pipe.c +++ b/drivers/platform/goldfish/goldfish_pipe.c @@ -639,7 +639,10 @@ static int get_free_pipe_id_locked(struct goldfish_pipe_dev *dev) return id; { - /* Reallocate the array */ + /* Reallocate the array. + * Since get_free_pipe_id_locked runs with interrupts disabled, + * we don't want to make calls that could lead to sleep. + */ u32 new_capacity = 2 * dev->pipes_capacity; struct goldfish_pipe **pipes = kcalloc(new_capacity, sizeof(*pipes), GFP_ATOMIC); -- 2.18.0.865.gffc8e1a3cd6-goog