From ec809bd817dfa1905283468e4c813684ed4efe78 Mon Sep 17 00:00:00 2001 From: Krzysztof Mazur Date: Tue, 6 Nov 2012 23:16:57 +0100 Subject: 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 Signed-off-by: David Woodhouse Acked-by: Chas Williams --- include/linux/atmdev.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/atmdev.h') 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 { 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; -- cgit v1.2.3