Messages in this thread | | | Date | Sat, 25 Mar 2000 04:53:10 -0500 (EST) | From | Tim Waugh <> | Subject | Re: [PATCH] bugfixes for PPP driver against 2.3.99p3 |
| |
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/
| |