Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752121Ab3FZQUj (ORCPT ); Wed, 26 Jun 2013 12:20:39 -0400 Received: from mail-oa0-f41.google.com ([209.85.219.41]:59051 "EHLO mail-oa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751501Ab3FZQUh (ORCPT ); Wed, 26 Jun 2013 12:20:37 -0400 MIME-Version: 1.0 From: Lucas De Marchi Date: Wed, 26 Jun 2013 13:20:16 -0300 Message-ID: Subject: module refcnt underflow To: lkml , Rusty Russell , linux-modules Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1002 Lines: 30 Hi, While checking somethings for a next release of kmod I noticed this strange thing: cat /sys/module/acpi_cpufreq/refcnt 18446744073709551614 We outputs this as "-1" in lsmod because we treat the value as signed. I was just going to change it to unsigned to make it compatible with what module-init-tools does but... For me it looks like a bug in the kernel since in this file we just have the output of kernel/module.c:module_refcount() I have this behavior on 3.9.2 but judging by the missing commits in kernel/module.c, this would also happen in latest head. I've never seen such a value so I guess it might be difficult to reproduce it again. Any hints on what could cause decs to be greater than incs in module_refcount()? -- Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/