Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp774772imm; Sat, 1 Sep 2018 21:27:23 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdba+DcPeY9P0hFdcD67hzpMZ+B+kP6KYlfUk2ft6F5Zo9nms/Uuk5/9TUota00oeObpFKR4 X-Received: by 2002:a17:902:4503:: with SMTP id m3-v6mr22395443pld.168.1535862443725; Sat, 01 Sep 2018 21:27:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535862443; cv=none; d=google.com; s=arc-20160816; b=G/wWeL4HElSCKzhXNZia546xBcLQ/LgiQThZYjFs2kNG/1BimqbgHAFIDwl6KPw09o BofXeIJV3UPXClxIM79EH/4OSlfSayAyWP6L8QNUK5WrG47SHlEzPnhk1kDeuYog313h /7qcEFHiQ+X+CJrzwTCUUbt/k+6ZXNZqOIVDe+ZDMGiTU0gbdjQ0emFeN0/KjBlVh4mf 9drbQnN5TP9O8bdVqBYf185q0WsBaGUMxyvucFkA7+RTtiC6bp9RUIXi09Q/hKabuKHO ssayerMY//uc1pDh2c5tFdOpW4dU1B9fqBx8XtD6U5W0+DGKDc3ijKxU7ksv9ZrBi4Qj vA0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=ApP2+YiEfgwgHWz8v8+4aqX/fq/oys/vbPbLOvrHig0=; b=0NkGiiQW1DX17u1Si19LL9ayWZkoie7qggAur5+sqvQhgTu7Yr0abzCbKGnv3Yy1WJ ZSFWbz2qal5FoGaCy10HVEo6/pl3qBex1hpILUGDYb333NIhX8pmO35BUmy527yjxV15 Ywlp4BpehIMcqqFZAMo8Uk/a0vcu7yxMKeXcSh5uz96ZUcCSPmG4+S/yJilzDFQwHVqQ nY+2at1rmyRKW21D+b5pwEwsoPX6RGshznmIkU4w7UBM2wgRSMC53hgq8ZPo+CLjgido MXPOHaUPsci42jh25s9Y9hONiC7WPDVxOLHnPpoFYWB0JZY+9G2mJHZaXudcpY7V6S0l 4VgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O7eI7eQe; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d34-v6si14350602pld.301.2018.09.01.21.27.06; Sat, 01 Sep 2018 21:27:23 -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=@gmail.com header.s=20161025 header.b=O7eI7eQe; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726155AbeIBIkT (ORCPT + 99 others); Sun, 2 Sep 2018 04:40:19 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:40241 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725914AbeIBIkT (ORCPT ); Sun, 2 Sep 2018 04:40:19 -0400 Received: by mail-it0-f68.google.com with SMTP id h23-v6so11844833ita.5; Sat, 01 Sep 2018 21:25:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ApP2+YiEfgwgHWz8v8+4aqX/fq/oys/vbPbLOvrHig0=; b=O7eI7eQe5nsJtNvfdR2J6BLM9ChTfLheF15dMF9TnYhKsEnEgpTkE6s2LdFnGXdHBz QUMCc3JXWUEN+JmK0Y1igNKbxa82MyQgJ3fi9UBv6jbGlPguLhISYXA0g7yTbf7neSXQ V8G4JwE1Z+dUicYoZvrFXR1iCLKQwAyYAygKpTw5/NagCBCcgEhQXJYrurZp6vG0iNU0 h5yPF27p3Xu5E80jvQ5uMY/CBBtxIvubgmRDcyR1dM6qcaOc30O/8nrqMcb858eO856L v10xbBS9RjvMp2OHjIFVpQNEoB7SDeVdWzHsBiqmUU6pxAST5fn27fJA2ydUZG5CuGjP bxfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ApP2+YiEfgwgHWz8v8+4aqX/fq/oys/vbPbLOvrHig0=; b=m038eHyH7xJvz1ryDrPymbWWOn/d6fecR2LKGACKcUFUj6dkmUYuYQkRvtPazJqkkB +Tv0rtH7xtPOlyljnbLxa/T/uFe+YCZIBfw+gqSjxnAJxFGO1c3P3K5JCxH9lQosd2fL 77gIMvRbpy6dRlvJQjCnibcm7x4SwncbvKOgbSVAUOwssVOM3dO7bH5Eog+LtjFG5pZy omC6Gpxa49RfaDX1vCObBR3szB8nAmnR9w/XnRtBL85kM4Sa1MNQCwY1WnUXIrUTzwRE Zmgsq7ljbeAVJgEUVnp4k/Sw+trHmF82PsqIQN7n2zL5MlZ56blqAB8xXN5JMZ04OXLx a49g== X-Gm-Message-State: APzg51BvMTL1ZzofoZk5nNc+P5sSHZ56xdVDuwqJsrtSlVOPFKw3+WGy VrJLBFy7BV5eBEsKrAsbbaiMrJ+u X-Received: by 2002:a24:d786:: with SMTP id y128-v6mr2020180itg.140.1535862357570; Sat, 01 Sep 2018 21:25:57 -0700 (PDT) Received: from dsa-mb.local ([2601:284:8200:5cfb:895c:498:52ef:1a1f]) by smtp.googlemail.com with ESMTPSA id 68-v6sm4616944itx.19.2018.09.01.21.25.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Sep 2018 21:25:56 -0700 (PDT) Subject: Re: [PATCH] net: ipv6: route: Fix a sleep-in-atomic-context bug in ip6_convert_metrics() To: Jia-Ju Bai , davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180901111958.26529-1-baijiaju1990@gmail.com> From: David Ahern Message-ID: <4cbf0c0c-ec8b-d953-8ff8-c5cab4d10441@gmail.com> Date: Sat, 1 Sep 2018 22:25:55 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180901111958.26529-1-baijiaju1990@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/1/18 5:19 AM, Jia-Ju Bai wrote: > The kernel module may sleep with holding a spinlock. ... > diff --git a/net/ipv6/route.c b/net/ipv6/route.c > index ec18b3ce8b6d..d15e72def7c1 100644 > --- a/net/ipv6/route.c > +++ b/net/ipv6/route.c > @@ -2742,7 +2742,7 @@ static int ip6_convert_metrics(struct net *net, struct fib6_info *rt, > if (!cfg->fc_mx) > return 0; > > - p = kzalloc(sizeof(*rt->fib6_metrics), GFP_KERNEL); > + p = kzalloc(sizeof(*rt->fib6_metrics), GFP_ATOMIC); > if (unlikely(!p)) > return -ENOMEM; > > This is the wrong solution. I'll take care of it next week after the holiday weekend.