diff options
author | Krzysztof Mazur <krzysiek@podlesie.net> | 2012-11-06 17:16:57 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-11-27 19:36:48 -0500 |
commit | ec809bd817dfa1905283468e4c813684ed4efe78 (patch) | |
tree | 6e13787ae7a88c73316e91f02b8116cc93309752 /include/linux/atmdev.h | |
parent | ae088d663beebb3cad0e7abaac67ee61a7c578d5 (diff) |
atm: add owner of push() callback to atmvcc
The atm is using atmvcc->push(vcc, NULL) callback to notify protocol
that vcc will be closed and protocol must detach from it. This callback
is usually used by protocol to decrement module usage count by module_put(),
but it leaves small window then module is still used after module_put().
Now the owner of push() callback is kept in atmvcc and
module_put(atmvcc->owner) is called after the protocol is detached from vcc.
Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Acked-by: Chas Williams <chas@cmf.nrl.navy.mil>
Diffstat (limited to 'include/linux/atmdev.h')
-rw-r--r-- | include/linux/atmdev.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 22ef21c33d0c..72db2af902a8 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
@@ -106,6 +106,7 @@ struct atm_vcc { | |||
106 | void *dev_data; /* per-device data */ | 106 | void *dev_data; /* per-device data */ |
107 | void *proto_data; /* per-protocol data */ | 107 | void *proto_data; /* per-protocol data */ |
108 | struct k_atm_aal_stats *stats; /* pointer to AAL stats group */ | 108 | struct k_atm_aal_stats *stats; /* pointer to AAL stats group */ |
109 | struct module *owner; /* owner of ->push function */ | ||
109 | /* SVC part --- may move later ------------------------------------- */ | 110 | /* SVC part --- may move later ------------------------------------- */ |
110 | short itf; /* interface number */ | 111 | short itf; /* interface number */ |
111 | struct sockaddr_atmsvc local; | 112 | struct sockaddr_atmsvc local; |