From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751594AbdISKib (ORCPT ); Tue, 19 Sep 2017 06:38:31 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:54219 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751306AbdISKia (ORCPT ); Tue, 19 Sep 2017 06:38:30 -0400 X-Google-Smtp-Source: AOwi7QA29SINXaQ/Z27UPlj2zdjSzglX4/oUki5d2XQnPk77UQd9+FAwhBK+1bmUYuPe7aZSfJetWg== Date: Tue, 19 Sep 2017 19:38:25 +0900 From: Sergey Senozhatsky To: Sergey Senozhatsky Cc: Minchan Kim , Andrew Morton , linux-kernel@vger.kernel.org, kernel-team , Sergey Senozhatsky Subject: BUG_ON when zsmalloc from IRQ (was zram: fix null dereference of handle) Message-ID: <20170919103825.GD401@jagdpanzerIV.localdomain> References: <20170919102125.GB401@jagdpanzerIV.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170919102125.GB401@jagdpanzerIV.localdomain> User-Agent: Mutt/1.9.0 (2017-09-02) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ah... this should have had another Subject line.... sorry. -ss On (09/19/17 19:21), Sergey Senozhatsky wrote: > Minchan, > > I just ran across it [because I had a bug to analize where this > part was involved]. I'd really prefer the kernel to BUG_ON immediately > instead of dying in agony. > > can we, please, return BUG_ON() back? > > there is no point in trying to save the kernel once it did that type > of violation. > > --- > > diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c > index 7c38e850a8fc..685049a9048d 100644 > --- a/mm/zsmalloc.c > +++ b/mm/zsmalloc.c > @@ -1349,7 +1349,7 @@ void *zs_map_object(struct zs_pool *pool, unsigned long handle, > * pools/users, we can't allow mapping in interrupt context > * because it can corrupt another users mappings. > */ > - WARN_ON_ONCE(in_interrupt()); > + BUG_ON(in_interrupt()); > > /* From now on, migration cannot move the object */ > pin_tag(handle); >