Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4272013ybc; Fri, 15 Nov 2019 01:48:15 -0800 (PST) X-Google-Smtp-Source: APXvYqynq3qG5nmcHPQg8udx7tvZnB79gcA/brI+4SCeHPBFBzfDXG8AgT8VRyZo4B9ezLr1o0cs X-Received: by 2002:a17:906:32d0:: with SMTP id k16mr7111519ejk.155.1573811295508; Fri, 15 Nov 2019 01:48:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573811295; cv=none; d=google.com; s=arc-20160816; b=Gc9CGu9pocxwSxfjImOF+N+6waF1IaumiBbNoWk05l5GgS27eyf9/3ecst8aWUTHAo vjaBEhTx7qj62tA1mZgJYVao3Ui2nFpOxNFmBRlD/pJYU9ynFMLTJcfnhpso5lSNIwkg ILvc+o7EYRUGmVCXGSuc0t3SyCdT82svK4oViJyKX9bKiYkaVONKn6L+T9bLvJX3ay/o Sh0DhD1zUiYjhL4nBpykgMaPXXxJ8MyRcq7ZmBYUgvw/v35D0QKFPOrsztOy1iN0SERV ivPHXSzkJLIJqcCThwXvVCLyS+z82/2F4eYHfxyySn6k+MkiGXIZlsYpHHTZWpQAeYqH 64AA== 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; bh=TLmD69J0Xy+cS8IvmNZ6RKfvlTnS4mWUfEJs4cgHoao=; b=JccjvJZyPOID6LTauYsMg/JPZPrEDC/bjvvBclFEpPkGNawEOVr7YDE0chNDgXhcw9 D+5HMok/BnWz5hWhD4m2qhWd8qGeFujzOuYs6W2MG0ZJ17C4Uh/0KzvSAwG/8IVBrizw A5FujWxTTdHjfzwb4Cw/gutLdl3HcVurfaSLGfTeiaWOiviQk5WhNDrKb0rcFeDek0Vv QSqS5FAK6gmdzAVagNaw0WvbKBGbzi7kxoHaNo+wYnAOumH5rjVgzdPU0lQhJiR3ATZN O2RtInnj1TMhDsuf7YKzHAav7fD338fti0Rex4vubKWAV3SCKILKZDEre5JWqDv+UdTM E4MA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6si6098037edl.442.2019.11.15.01.47.50; Fri, 15 Nov 2019 01:48:15 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727618AbfKOJoa (ORCPT + 99 others); Fri, 15 Nov 2019 04:44:30 -0500 Received: from www262.sakura.ne.jp ([202.181.97.72]:56755 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727170AbfKOJo3 (ORCPT ); Fri, 15 Nov 2019 04:44:29 -0500 Received: from fsav102.sakura.ne.jp (fsav102.sakura.ne.jp [27.133.134.229]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id xAF9hluQ013037; Fri, 15 Nov 2019 18:43:47 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav102.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav102.sakura.ne.jp); Fri, 15 Nov 2019 18:43:47 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav102.sakura.ne.jp) Received: from [192.168.1.9] (softbank126040052248.bbtec.net [126.40.52.248]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id xAF9hfEU013011 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NO); Fri, 15 Nov 2019 18:43:46 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: unregister_netdevice: waiting for DEV to become free (2) To: =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= Cc: Alexei Starovoitov , Jesper Dangaard Brouer , Alexei Starovoitov , Daniel Borkmann , syzbot , ddstreet@ieee.org, Dmitry Vyukov , LKML , Network Development , syzkaller-bugs , bpf , Yonghong Song References: <00000000000056268e05737dcb95@google.com> <0000000000007d22100573d66078@google.com> <063a57ba-7723-6513-043e-ee99c5797271@I-love.SAKURA.ne.jp> <87imopgere.fsf@toke.dk> From: Tetsuo Handa Message-ID: <6f69f704-b51d-c3cb-02c6-8e6eb93f4194@i-love.sakura.ne.jp> Date: Fri, 15 Nov 2019 18:43:36 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <87imopgere.fsf@toke.dk> 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 Hello. syzbot is still reporting that bpf(BPF_MAP_UPDATE_ELEM) causes unregister_netdevice() to hang. It seems that commit 546ac1ffb70d25b5 ("bpf: add devmap, a map for storing net device references") assigned dtab->netdev_map[i] at dev_map_update_elem() but commit 6f9d451ab1a33728 ("xdp: Add devmap_hash map type for looking up devices by hashed index") forgot to assign dtab->netdev_map[idx] at __dev_map_hash_update_elem() when dev is newly allocated by __dev_map_alloc_node(). As far as I and syzbot tested, https://syzkaller.appspot.com/x/patch.diff?x=140dd206e00000 can avoid the problem, but I don't know whether this is right location to assign it. Please check and fix.