Re: [PATCH] IPMI driver for Linux, version 6

From: Kai Germaschewski (kai-germaschewski@uiowa.edu)
Date: Mon Oct 14 2002 - 16:52:28 EST


On Mon, 14 Oct 2002, Corey Minyard wrote:

> Arjan van de Ven wrote:
>
> >On Mon, 2002-10-14 at 03:06, Corey Minyard wrote:
> >
> >
> >>Yet one more update, mostly fixes for stylistic things that Randy Dunlap
> >>pointed out, and a bug fix that lets the KCS state machine get out of
> >>the "hosed" state on the next message (buggy hardware can sometimes be
> >>useful :-). As usual, on my home page at http://home.attbi.com/~minyard.
> >>
> >>-Corey
> >>
> >>
> >+static int ipmi_open(struct inode *inode, struct file *file)
> >..
> >+ priv = kmalloc(sizeof(*priv), GFP_KERNEL);
> >..
> >+ MOD_INC_USE_COUNT;
> >
> >hmm. Ok so you either need the MOD_INC_USE_COUNT or you don't, but if
> >you do it should go before the sleeping kmalloc ;)
> >
> Ok, it will be fixed in the next release.

Admittedly I haven't looked at this code at all, but most likely you want
to set .owner = THIS_MODULE in your struct file_operations, no additional
MOD_INC_USE_COUNT in ::open() is necessary, then.

--Kai

-
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/



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:52 EST