mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
ae088d663b
commit
ec809bd817
2 changed files with 3 additions and 0 deletions
|
@ -106,6 +106,7 @@ struct atm_vcc {
|
|||
void *dev_data; /* per-device data */
|
||||
void *proto_data; /* per-protocol data */
|
||||
struct k_atm_aal_stats *stats; /* pointer to AAL stats group */
|
||||
struct module *owner; /* owner of ->push function */
|
||||
/* SVC part --- may move later ------------------------------------- */
|
||||
short itf; /* interface number */
|
||||
struct sockaddr_atmsvc local;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue