Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3067289ybb; Sun, 12 Apr 2020 23:09:39 -0700 (PDT) X-Google-Smtp-Source: APiQypKFb1u/67QQM4asebVoM04Zc1LOhMBB36bxkNpQtdhn3eMnU5kP9tvKwWokBlUqb3cXzq9h X-Received: by 2002:a37:9b4f:: with SMTP id d76mr11867487qke.268.1586758179430; Sun, 12 Apr 2020 23:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586758179; cv=none; d=google.com; s=arc-20160816; b=ceuMV8S1S5RvYbLNOX5Fv9CnY6xDBm25qyYajG5fN9Ubaijcpm3l0/J/z4YTelKYFA o983HXCZf1KZZaNGldBF1x53J+vwReoDBN65tzj+bNPe4bI/L3pOs/kxb0sdphy5lUl6 Apw1J8CF8IMX2gkmI2DnfEADzk/Q57QySflyCN6QHXfIg2+t7NzUhi+tR29POth+p/4F ZpK7O7/kpIYwZTs4AXOYnyR+DBPYBgfLhaWpX/6/WKkpS+BApOwkanEln2wBpOmIP4p6 DKOpchHOe66Md+thq6yGU3BGva7yYx/WzN3d8+FE6LbXJLx3c3JOW8HJWNBiO13cJ57u R+ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=3f9Cx4vuQp0lnaSNcvVJVRxifL4+qfEGzskDZduwPfs=; b=AZ6T3XzWM0HaXpGHD1u7kifeHV3UfXMU/KqOv3oee9gtStZIGsP9xjWytJp/8mPp3i UP2E5ViZLOyfRy6k3ghOf3CybQh4guxMdJyN/Yzu6B3VzyplTh8K36QDO73zijizFbtt jAD0bmI34VDh3zjpcU2E9j3Y/LOa9bQigw/hws2Cs/ftcADi0XB8SeRBr8XOhv+nGoOS HKl3fdYcgaGPq/4UmIX2PGn/muvimT9RJGXU9tyYCB0PRSh6T95ApKwm2AGLqoV69fOj 97rjfGfqyvhJIxDl0u3zAu3tHmdREeUdyQOjCzLHx5IEOFm7gHHu7dJCH6SFPTOkiUbM Nwew== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 209.132.180.67 is neither permitted nor denied by best guess record for domain of linux-kernel-owner@vger.kernel.org) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org ([209.132.180.67]) by mx.google.com with ESMTP id q34si5067311qtb.216.2020.04.12.23.09.25; Sun, 12 Apr 2020 23:09:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.132.180.67 is neither permitted nor denied by best guess record for domain of linux-kernel-owner@vger.kernel.org) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.132.180.67 is neither permitted nor denied by best guess record for domain of linux-kernel-owner@vger.kernel.org) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728264AbgDMGFv (ORCPT + 99 others); Mon, 13 Apr 2020 02:05:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.18]:46922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726967AbgDMGFv (ORCPT ); Mon, 13 Apr 2020 02:05:51 -0400 Received: from shells.gnugeneration.com (shells.gnugeneration.com [66.240.222.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D261FC0A3BE0; Sun, 12 Apr 2020 23:05:50 -0700 (PDT) Received: by shells.gnugeneration.com (Postfix, from userid 1000) id 967BE1A402DF; Sun, 12 Apr 2020 23:05:50 -0700 (PDT) Date: Sun, 12 Apr 2020 23:05:50 -0700 From: Vito Caputo To: =?utf-8?B?UsOpbWk=?= Denis-Courmont Cc: netdev@vger.kernel.org, courmisch@gmail.com, davem@davemloft.net, kuba@kernel.org, linux-kernel@vger.kernel.org Subject: Re: kernel BUG at net/phonet/socket.c:LINE! Message-ID: <20200413060550.347r47zp7kmn4vkh@shells.gnugeneration.com> References: <00000000000062b41d05a2ea82b0@google.com> <1806223.auBmcZeozp@basile.remlab.net> <20200413054914.euz7g2fcxsr74lfm@shells.gnugeneration.com> <2585533.60Y2ixrnJE@basile.remlab.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2585533.60Y2ixrnJE@basile.remlab.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 13, 2020 at 09:01:58AM +0300, R?mi Denis-Courmont wrote: > Le maanantaina 13. huhtikuuta 2020, 8.49.14 EEST Vito Caputo a ?crit : > > > If we are to distinguish the two error scenarii, then it's the rebind > > > case > > > that needs a different error, but EINVAL is consistent with INET. > > > > Isn't the existing code is bugged if treating -EINVAL as valid and a rebind? > > > > The invalid size will return a NULL sobject but -EINVAL, triggering the > > BUG_ON. > > How do you pass an invalid size? It's a constant `sizeof(struct sockaddr_pn)` > in that code path. > duh, sorry for the noise, I should have re-read the code before replying.