diff options
author | Roman Kiryanov <rkir@google.com> | 2018-08-27 20:23:00 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-14 15:31:30 +0200 |
commit | 84ae527aa58c0f790233fec287d3a060a7501baa (patch) | |
tree | e0f5bae07ca7c78790a062305ae03d0bf21372f0 /drivers/platform | |
parent | platform: goldfish: pipe: Separate the host interface to a separate header (diff) | |
download | linux-84ae527aa58c0f790233fec287d3a060a7501baa.tar.xz linux-84ae527aa58c0f790233fec287d3a060a7501baa.zip |
platform: goldfish: pipe: Update the comment for GFP_ATOMIC
Provide an explanation why GFP_ATOMIC is needed to prevent changing it to
other values.
Signed-off-by: Roman Kiryanov <rkir@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/goldfish/goldfish_pipe.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |