Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp6200017imm; Mon, 27 Aug 2018 11:25:53 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZSz6o0+fmGHIrtsvKUXEBPGmOpiqTI3KmV07L1K3ZVf8ru9GLi24Uf9WoyEx8vb8Y+CUcs X-Received: by 2002:a17:902:b492:: with SMTP id y18-v6mr14460042plr.26.1535394353138; Mon, 27 Aug 2018 11:25:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535394353; cv=none; d=google.com; s=arc-20160816; b=lxoMuduABm4FLYczX4N1hbVUalhwpHiYyJsXZgNsS0YTuMbc+bLERoGYsnZ12vVOhf W8ZuvKsYD7lH5vKVWQ4ql7FUkHQoUW2QCyQ/la25D3Kx4lQpVXJ/S/VYUdnCD6s4EE+q rlaRbqACNCMdz1mBfHa0uWHZHrxyFdwAHMMZz0LNO+2EqxdAha+Og4V2Pg5v8X4k7mok rwCBd3a+xvJgRgmYv7xGGM0pgdFJpk3zN2crn/bBv/HABhpWH6GDFpCaD15Ak+M0sYvK wFg+i3rS4ofr8dsCfSAyedNc3PchQ7XgHC9Wv1LSfyeZaCW2+XgUfv4sPMPcukGvXbtJ 61iw== 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=yEFWKUBx5GkL6MvlPKzEVqGIgKNvhhKE0n3XN6GitDg=; b=sLkKrvdzHH/0JWkWO2EcPG6Lffdt5qUgPt4QTahL4WbGTCP1GUWcnliHr8d5hW476N PgXaiBpENGcmdsVKSBzKQKXWZrX3Hv16RDrS9H3bKS94BWO7ahJ5npcjlp3Wr7+R+NMu dGyYU7rZFnwV1NipqeQ57djgbmWi9vxcWN9AXh2+2YuIBRvYkDpgKtoTpjoi7nlIrWKy ujl9ZfprXPBdd4x4VF5+fb/ObnWOfuAJhDMDgekK8O0Mtc7ysOlQdKFhIWmS/oLAuOJK H0fNohXwnEQAeRNbPpezbmZxr3g46CospDy7I+1cCxrTsPdjf3GBvg5Us1M5arTxa/16 5anA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=McQqere0; 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 35-v6si14059975pla.453.2018.08.27.11.25.37; Mon, 27 Aug 2018 11:25: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=McQqere0; 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 S1727538AbeH0WL3 (ORCPT + 99 others); Mon, 27 Aug 2018 18:11:29 -0400 Received: from mail-pg1-f202.google.com ([209.85.215.202]:52113 "EHLO mail-pg1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726895AbeH0WL3 (ORCPT ); Mon, 27 Aug 2018 18:11:29 -0400 Received: by mail-pg1-f202.google.com with SMTP id 132-v6so11372622pga.18 for ; Mon, 27 Aug 2018 11:23:47 -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=yEFWKUBx5GkL6MvlPKzEVqGIgKNvhhKE0n3XN6GitDg=; b=McQqere0Ch8BJ+7VrMaTxjIfbIBStCMDADxwFGc4cZ6jDFJ8Gp2vzrZt9ZdPZ0V58V NQJ9v1znoJLSUnVvY/9enJaJp6am+GDCxO0lL0e9Aduy8ZAFtCLW96gw1+TJMrwnFLxM w6uXfP2ihGyyETN33EzyIUupt+LkLhTEndTUjCk4bHBTpANY0LPQCNLcBGFCxsvJDJKF GiEWCc7XJdTzi4qPdHwzrdYhGOOvJtcEBsjLbUb8sDKr24sDVsgdy8mRZ5ufWhTG/5dH qcUBNf/70cY/WXquBlOiRB+mOe2BFks+gE9FxT5XYSh60R4FlUPaBRirIMS7vVj30ybE fR7A== 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=yEFWKUBx5GkL6MvlPKzEVqGIgKNvhhKE0n3XN6GitDg=; b=EpGA/32G4W/wBZNHD7L5htU5bEoBJahMnDN4Iqzl8y7tPokNsNUWwIDf9tlKEyfZFh +Lz0qcIIGFf+9oVuCevmyDsGE25amTlHoqzGmOGpy78XVX6L4Y/qlU4Oc6GjjQNKALKY nXp602In3JuP+2cUu8WgZ71GGpnBgANnaqAzBequGcYnfoV8ON96dT1GfY7L5ZUiSXXB tWrHP+RTAx3hyXS9aRUsoqrjx/sc/odLpAOPpLtMZqwCNnD/LaEWpPRtnhmngpUMNvF3 6oGYuh70/hQEhOGefbHXFazQf2XMC7vMAG8gK2ut/LrvxiST6g9xVOiZs3cIuDT40Et1 KHxw== X-Gm-Message-State: APzg51C88KShQpjA55KUg176CG03ubYI9oJSpkG3/Je82iXoq1ZJEJga F/TVTs5+jUUObe1a0A1O8+KPytpB X-Received: by 2002:a65:5689:: with SMTP id v9-v6mr3308781pgs.139.1535394227085; Mon, 27 Aug 2018 11:23:47 -0700 (PDT) Date: Mon, 27 Aug 2018 11:23:00 -0700 In-Reply-To: <20180827182315.126345-1-rkir@google.com> Message-Id: <20180827182315.126345-5-rkir@google.com> Mime-Version: 1.0 References: <20180827182315.126345-1-rkir@google.com> X-Mailer: git-send-email 2.19.0.rc0.228.g281dcd1b4d0-goog Subject: [PATCH 05/20] 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 caf514aafb21..0c55e657da5a 100644 --- a/drivers/platform/goldfish/goldfish_pipe.c +++ b/drivers/platform/goldfish/goldfish_pipe.c @@ -640,7 +640,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.19.0.rc0.228.g281dcd1b4d0-goog