From mboxrd@z Thu Jan 1 00:00:00 1970 From: chetan loke Subject: Re: [PATCH net-next] packet: fix panic in __packet_set_timestamp on tpacket_v3 in tx mode Date: Mon, 6 Mar 2017 13:36:57 -0800 Message-ID: References: <1483580068-13854-1-git-send-email-daniel@iogearbox.net> <1483640872.9712.1.camel@edumazet-glaptop3.roam.corp.google.com> <586E9A0F.1020002@iogearbox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Daniel Borkmann , Eric Dumazet , David Miller , Sowmini Varadhan , Willem de Bruijn , netdev To: Willem de Bruijn Return-path: Received: from mail-ua0-f171.google.com ([209.85.217.171]:34327 "EHLO mail-ua0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754058AbdCFWdX (ORCPT ); Mon, 6 Mar 2017 17:33:23 -0500 Received: by mail-ua0-f171.google.com with SMTP id f54so186339387uaa.1 for ; Mon, 06 Mar 2017 14:31:33 -0800 (PST) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Mar 6, 2017 at 9:45 AM, Willem de Bruijn wrote: > On Mon, Mar 6, 2017 at 12:13 PM, chetan loke wrote: >>>> >>>> Gosh. Can we also replace this BUG() into something less aggressive ? >>> >>> >>> There are currently 5 of these WARN() + BUG() constructs and 1 BUG()-only >>> for the 'default' TPACKET version spread all over af_packet, so probably >>> makes sense to rather make all of them less aggressive. >>> >>> >> >> Very few consumers actually go looking in the kernel logs to see the >> error-warnings and report them back here. >> >> This severity will get them to report the incident which in this case >> got fixed?? > > But BUG_ONs in the datapath can cause outages in real production > environments. This should not happen for recoverable failures. For > users who cannot be bothered to check their logs, there is sysctl > kernel.panic_on_warn. Completely understand(and you should have failover to handle these outages). But then are you ok giving incorrect info to the application? For this specific bug: it is so basic that you should hit this bug 1st time everytime when you are adding support or porting a new header. Correct? And so from that point of view, this BUG_ON has served its purpose.