From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753123AbbAUXeb (ORCPT ); Wed, 21 Jan 2015 18:34:31 -0500 Received: from ozlabs.org ([103.22.144.67]:47293 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751924AbbAUXeL (ORCPT ); Wed, 21 Jan 2015 18:34:11 -0500 From: Rusty Russell To: James Bottomley Cc: Masami Hiramatsu , linux-kernel , linux-scsi Subject: Re: module: fix module_refcount() return when running in a module exit routine In-Reply-To: <1421774615.2080.88.camel@HansenPartnership.com> References: <1421600146.2080.8.camel@HansenPartnership.com> <54BC93C3.7010808@hitachi.com> <878ugzco8c.fsf@rustcorp.com.au> <1421683701.2080.25.camel@HansenPartnership.com> <871tmqcmau.fsf@rustcorp.com.au> <1421774615.2080.88.camel@HansenPartnership.com> User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Wed, 21 Jan 2015 16:00:29 +1030 Message-ID: <877fwgbszu.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org James Bottomley writes: > Actually, I don't think this is enough. Some Australian once came up > with a guide to APIs, and lectured on it at length, one of which was > that the name should be the obvious use and it is unexpected that a > refcount would go negative. I think we could raise it from -6 on the > API scale to +3 if we add some documentation like below. Thanks, applied! Cheers, Rusty.