lkml.org 
[lkml]   [2003]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH][ATM] make clip modular
From
   From: chas williams <chas@cmf.nrl.navy.mil>
Date: Mon, 12 May 2003 15:33:22 -0400

this patch lets one build clip as a module.

This doesn't work and is quite racey.

+ if (!atm_clip_ops || !try_module_get(atm_clip_ops->owner)) {

Q: What prevents atm_clip_ops from going NULL between the
!atm_clip_ops test and the atm_clip_ops->owner dereference?

A: Nothing.

Therefore you have to protect these things some how, I would
suggest using a semaphore, put it right next to atm_clip_ops
and hold it around register, derferegister, and code sequence
like this one trying to get a reference to it.

The various ioctl hooks in net/socket.c are good models to
work from.

MPOA/LEC/MPC probably have nearly identical bugs and it would
be great if you could fix them up too.
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.167 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site