From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932611AbcGEBAZ (ORCPT ); Mon, 4 Jul 2016 21:00:25 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:35737 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753708AbcGEBAY (ORCPT ); Mon, 4 Jul 2016 21:00:24 -0400 Date: Tue, 5 Jul 2016 10:00:28 +0900 From: Sergey Senozhatsky To: Ganesh Mahendran Cc: Sergey Senozhatsky , linux-kernel , Linux-MM , Andrew Morton , Minchan Kim , Nitin Gupta , rostedt@goodmis.org, mingo@redhat.com Subject: Re: [PATCH v2 7/8] mm/zsmalloc: add __init,__exit attribute Message-ID: <20160705010028.GA459@swordfish> References: <1467614999-4326-1-git-send-email-opensource.ganesh@gmail.com> <1467614999-4326-7-git-send-email-opensource.ganesh@gmail.com> <20160704084347.GG898@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Ganesh, On (07/04/16 17:21), Ganesh Mahendran wrote: > > On (07/04/16 14:49), Ganesh Mahendran wrote: > > [..] > >> -static void zs_unregister_cpu_notifier(void) > >> +static void __exit zs_unregister_cpu_notifier(void) > >> { > > > > this __exit symbol is called from `__init zs_init()' and thus is > > free to crash. > > I change code to force the code goto notifier_fail where the > zs_unregister_cpu_notifier will be called. > I tested with zsmalloc module buildin and built as a module. sorry, not sure I understand what do you mean by this. > Please correct me, if I miss something. you have an __exit section function being called from __init section: static void __exit zs_unregister_cpu_notifier(void) { } static int __init zs_init(void) { zs_unregister_cpu_notifier(); } it's no good. -ss