From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932965Ab2DKTE1 (ORCPT ); Wed, 11 Apr 2012 15:04:27 -0400 Received: from mx2.parallels.com ([64.131.90.16]:41406 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760903Ab2DKTEZ (ORCPT ); Wed, 11 Apr 2012 15:04:25 -0400 Message-ID: <4F85D53B.1070806@parallels.com> Date: Wed, 11 Apr 2012 16:02:19 -0300 From: Glauber Costa User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: Linus Torvalds CC: Michal Hocko , , , , , "Johannes Weiner" , , Greg Thelen , Suleiman Souhlal , Andrew Morton Subject: Re: [PATCH] remove BUG() in possible but rare condition References: <1334167824-19142-1-git-send-email-glommer@parallels.com> <20120411184845.GA24831@tiehlicka.suse.cz> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [201.82.19.44] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/11/2012 03:57 PM, Linus Torvalds wrote: > On Wed, Apr 11, 2012 at 11:48 AM, Michal Hocko wrote: >> >> I am not familiar with the code much but a trivial call chain walk up to >> write_dev_supers (in btrfs) shows that we do not check for the return value >> from __getblk so we would nullptr and there might be more. >> I guess these need some treat before the BUG might be removed, right? > > Well, realistically, isn't BUG() as bad as a NULL pointer dereference? > > Do you care about the exact message on the screen when your machine dies? Not particular, but I don't see why (I might be wrong) it would necessarily lead to a NULL pointer dereference. At least in my test cases, after turning this to a WARN (to make sure it was still being hit), the machine could go on just fine. I was running this in a container system, with restricted memory. After killing the container - at least in my ext4 system - everything seemed as happy as ever. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx191.postini.com [74.125.245.191]) by kanga.kvack.org (Postfix) with SMTP id C9E876B004D for ; Wed, 11 Apr 2012 15:04:26 -0400 (EDT) Message-ID: <4F85D53B.1070806@parallels.com> Date: Wed, 11 Apr 2012 16:02:19 -0300 From: Glauber Costa MIME-Version: 1.0 Subject: Re: [PATCH] remove BUG() in possible but rare condition References: <1334167824-19142-1-git-send-email-glommer@parallels.com> <20120411184845.GA24831@tiehlicka.suse.cz> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Linus Torvalds Cc: Michal Hocko , linux-kernel@vger.kernel.org, devel@openvz.org, linux-mm@kvack.org, cgroups@vger.kernel.org, Johannes Weiner , kamezawa.hiroyu@jp.fujitsu.com, Greg Thelen , Suleiman Souhlal , Andrew Morton On 04/11/2012 03:57 PM, Linus Torvalds wrote: > On Wed, Apr 11, 2012 at 11:48 AM, Michal Hocko wrote: >> >> I am not familiar with the code much but a trivial call chain walk up to >> write_dev_supers (in btrfs) shows that we do not check for the return value >> from __getblk so we would nullptr and there might be more. >> I guess these need some treat before the BUG might be removed, right? > > Well, realistically, isn't BUG() as bad as a NULL pointer dereference? > > Do you care about the exact message on the screen when your machine dies? Not particular, but I don't see why (I might be wrong) it would necessarily lead to a NULL pointer dereference. At least in my test cases, after turning this to a WARN (to make sure it was still being hit), the machine could go on just fine. I was running this in a container system, with restricted memory. After killing the container - at least in my ext4 system - everything seemed as happy as ever. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [PATCH] remove BUG() in possible but rare condition Date: Wed, 11 Apr 2012 16:02:19 -0300 Message-ID: <4F85D53B.1070806@parallels.com> References: <1334167824-19142-1-git-send-email-glommer@parallels.com> <20120411184845.GA24831@tiehlicka.suse.cz> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Linus Torvalds Cc: Michal Hocko , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Johannes Weiner , kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org, Greg Thelen , Suleiman Souhlal , Andrew Morton On 04/11/2012 03:57 PM, Linus Torvalds wrote: > On Wed, Apr 11, 2012 at 11:48 AM, Michal Hocko wrote: >> >> I am not familiar with the code much but a trivial call chain walk up to >> write_dev_supers (in btrfs) shows that we do not check for the return value >> from __getblk so we would nullptr and there might be more. >> I guess these need some treat before the BUG might be removed, right? > > Well, realistically, isn't BUG() as bad as a NULL pointer dereference? > > Do you care about the exact message on the screen when your machine dies? Not particular, but I don't see why (I might be wrong) it would necessarily lead to a NULL pointer dereference. At least in my test cases, after turning this to a WARN (to make sure it was still being hit), the machine could go on just fine. I was running this in a container system, with restricted memory. After killing the container - at least in my ext4 system - everything seemed as happy as ever.