Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1408827pxb; Mon, 22 Feb 2021 00:40:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvlcmy3cK1hQmU9QOl/UI6WDJ3NCj0d/jFTD4oXC6TPCr7QBfSq8CMlo559xDpUlDywmNL X-Received: by 2002:a17:906:f903:: with SMTP id lc3mr19964782ejb.163.1613983207951; Mon, 22 Feb 2021 00:40:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613983207; cv=none; d=google.com; s=arc-20160816; b=0lvcDMTQKvkXg2S6FWRDYKw7pw/MJJICmVwPx5sayBBPgd5ow95F2MyzJLz1auL16/ dWC0NnfkVwpU4ZxC5QW7eCdRvBXNj+KtsaAQEosvtyolbpzbIyBygtdR0q2OMAH+HWHu 5jft1j6VaPP9uLiVb/uN9+em93bZAaYkws1WmU5A5iwKsuNN0RVZ3nqz3X/EVCQWluwO 10dYZkE+FuHzd7HfIF1zpFnuT3lCj/FN+ZdxBwSi3RFttmJfd0xHAMAWmt2eWAHKYSdk S9giT3mNR1Anjc9H60Vu4V7TkpMqoG1uywlYoH+qLxpDAwtMz5o44mC8eqMb/ROtmygc KBkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=CeWBZt+hcCxVqYJNaniFHpV0E/tU4rgmknD4HdcGoA8=; b=lbtyu1we4jWzbffh4jKQ06L9XSXXQFacagZQrYInRqYNZH6qXHyxWFp0BdZkmNP6Fz IP2TZUarpBwFbHYoOEh3B8wnW1MxS5rakCwDsic383IeaQyxzXj3a7omIA7EE1ttPDgZ 52Ombu2pu+rRJJFencI87quS50OUnCkpVz39FF6E3DOf/o7FNWA0DVRkfnUQR9vyXiHX 9ZPyppgTcBaAcBW1n8Knm+nul0cldqDMM7Q54gGAiGL4oNChc54ge0RH/XcjxNi2oPQ/ b8yMTzC4zcHbQmgOza5syHmmvBT+k+ywh6NooZyOhM/Izc/7LJVJhzojXnifBgR4jkzB DWOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B7RaBO+a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id n15si12534445eje.486.2021.02.22.00.39.45; Mon, 22 Feb 2021 00:40:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B7RaBO+a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230036AbhBVIij (ORCPT + 99 others); Mon, 22 Feb 2021 03:38:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229989AbhBVIid (ORCPT ); Mon, 22 Feb 2021 03:38:33 -0500 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD775C061574; Mon, 22 Feb 2021 00:37:51 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id p3so2524380wmc.2; Mon, 22 Feb 2021 00:37:51 -0800 (PST) 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=CeWBZt+hcCxVqYJNaniFHpV0E/tU4rgmknD4HdcGoA8=; b=B7RaBO+aD3Tzj0ptbjRBs/L0Tl8BhA1vYGHLzgZGwDCq0Wf9LNAP4q91TXQIXqcrJD 6UwWdNJgd+CIoAEOII3zYFqGA7VH3HaVaqbWbFV+T/L653qvNuDr7h1HY5w5AUzZXi5Z dSv37h529bzRmG4aNSY0+KyY59cdMaQo1HmBoR7qeOEYSs6j9VMwk0e/KuJg3uY+6qXI k8fIqAKGWTG4XTYVQ+5M9HqYqlQPIgyW+J0ZQOtpVwDdNeMUILMudW5+mXgUjhI+Oga7 fJCb8tlsYSLuqxYyGcflHCx+aEo3pPgZyFENysWtucVVbp8fNuzdZPdHes8gM13k3o3Y OLiQ== 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=CeWBZt+hcCxVqYJNaniFHpV0E/tU4rgmknD4HdcGoA8=; b=gvh4Z8TnoVEZWifQREkLgpkj7L1JD+xmvUWzC/nnNfjbgMU1OG708U/Q4XW7mbFQqZ am9enpuK80svXkXDFbe6gd2xvPD0c89pEnUUCKXDHmTe+6LTj3TdIjJjFdlYk69I8ASM quFqbBDWg/jgiSk/6lSo1AKeOAUqXOh1U5MahzmVj1VH+976OrzYNS4qJw23LrCUhNOx HP+4rlgbTs5u/UMMJJVrFOq+CoX3haUbWvaHIM3j3igew/Q6nh0+390Vs1ig81asdgKY SWvdXGatMGfu6aEkoIube89udWX4vP9ecaEKHjWBlUFhQUFEOaZdjDG+d0f/lRnssBDY /QkA== X-Gm-Message-State: AOAM531NM6LHZSs/L+PH2gSjWFPoQXcR+JcJwNPVNSP0LQlvab8L4eMm 8vjFVo6dFduwF4cvnaY5y2Hi2uc3QB8= X-Received: by 2002:a05:600c:4f46:: with SMTP id m6mr19430978wmq.154.1613983070546; Mon, 22 Feb 2021 00:37:50 -0800 (PST) Received: from [192.168.1.101] ([37.171.239.209]) by smtp.gmail.com with ESMTPSA id f7sm28234732wrm.92.2021.02.22.00.37.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Feb 2021 00:37:49 -0800 (PST) Subject: Re: [PATCH] arp: Remove the arp_hh_ops structure To: Yejune Deng , davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org, kuba@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot References: <20210222031526.3834-1-yejune.deng@gmail.com> From: Eric Dumazet Message-ID: <0143f961-7530-3ae9-27f2-f076ea951975@gmail.com> Date: Mon, 22 Feb 2021 09:37:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210222031526.3834-1-yejune.deng@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/22/21 4:15 AM, Yejune Deng wrote: > The arp_hh_ops structure is similar to the arp_generic_ops structure. > but the latter is more general,so remove the arp_hh_ops structure. > > Fix when took out the neigh->ops assignment: > 8.973653] #PF: supervisor read access in kernel mode > [ 8.975027] #PF: error_code(0x0000) - not-present page > [ 8.976310] PGD 0 P4D 0 > [ 8.977036] Oops: 0000 [#1] SMP PTI > [ 8.977973] CPU: 1 PID: 210 Comm: sd-resolve Not tainted 5.11.0-rc7-02046-g4591591ab715 #1 > [ 8.979998] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 > [ 8.981996] RIP: 0010:neigh_probe (kbuild/src/consumer/net/core/neighbour.c:1009) > I have a hard time understanding this patch submission. This seems a mix of a net-next and net material ? > Reported-by: kernel test robot If this is a bug fix, we want a Fixes: tag This will really help us. Please don't let us guess what is going on. Also, if this is not a bug fix, this should target net-next tree, please take a look at Documentation/networking/netdev-FAQ.rst In short, the stack trace in this changelog seems to be not related to this patch, maybe a prior version ? We do not want to keep artifacts of some buggy version that was never merged into official tree. Thanks. > Signed-off-by: Yejune Deng > --- > net/ipv4/arp.c | 15 ++------------- > 1 file changed, 2 insertions(+), 13 deletions(-) > > diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c > index 922dd73e5740..9ee59c2e419a 100644 > --- a/net/ipv4/arp.c > +++ b/net/ipv4/arp.c > @@ -135,14 +135,6 @@ static const struct neigh_ops arp_generic_ops = { > .connected_output = neigh_connected_output, > }; > > -static const struct neigh_ops arp_hh_ops = { > - .family = AF_INET, > - .solicit = arp_solicit, > - .error_report = arp_error_report, > - .output = neigh_resolve_output, > - .connected_output = neigh_resolve_output, > -}; > - > static const struct neigh_ops arp_direct_ops = { > .family = AF_INET, > .output = neigh_direct_output, > @@ -277,12 +269,9 @@ static int arp_constructor(struct neighbour *neigh) > memcpy(neigh->ha, dev->broadcast, dev->addr_len); > } > > - if (dev->header_ops->cache) > - neigh->ops = &arp_hh_ops; > - else > - neigh->ops = &arp_generic_ops; > + neigh->ops = &arp_generic_ops; > > - if (neigh->nud_state & NUD_VALID) > + if (!dev->header_ops->cache && (neigh->nud_state & NUD_VALID)) > neigh->output = neigh->ops->connected_output; > else > neigh->output = neigh->ops->output; >