Re: [PATCH] bugfixes for PPP driver against 2.3.99p3

From: Tim Waugh (twaugh@redhat.com)
Date: Sat Mar 25 2000 - 04:53:10 EST

  • Next message: Ganesh Sittampalam: "2.3.99-pre3 ipv4 modules crash"

    On Sat, 25 Mar 2000, Paul Mackerras wrote:

    > @@ -213,26 +174,34 @@
    > ppp_sync_open(struct tty_struct *tty)
    > {
    > struct syncppp *ap;
    > + int err;
    >
    > ap = kmalloc(sizeof(*ap), GFP_KERNEL);
    > if (ap == 0)
    > return -ENOMEM;
    >
    > - MOD_INC_USE_COUNT;
    > -
    [...]
    > + MOD_INC_USE_COUNT;
    > return 0;
    > }

    Shouldn't the MOD_INC_USE_COUNT be before the kmalloc, with a
    MOD_DEC_USE_COUNT on failure cases, for race avoidance?

    Tim.
    */

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat Mar 25 2000 - 04:56:55 EST