linux/drivers/infiniband/hw/ocrdma
Johannes Thumshirn d8b2ba7c59 IB/core: Destroy ocrdma_dev_id IDR on module exit
Destroy ocrdma_dev_id IDR on module exit, reclaiming the allocated memory.

This was detected by the following semantic patch (written by Luis Rodriguez
<mcgrof@suse.com>)
<SmPL>
@ defines_module_init @
declarer name module_init, module_exit;
declarer name DEFINE_IDR;
identifier init;
@@

module_init(init);

@ defines_module_exit @
identifier exit;
@@

module_exit(exit);

@ declares_idr depends on defines_module_init && defines_module_exit @
identifier idr;
@@

DEFINE_IDR(idr);

@ on_exit_calls_destroy depends on declares_idr && defines_module_exit @
identifier declares_idr.idr, defines_module_exit.exit;
@@

exit(void)
{
 ...
 idr_destroy(&idr);
 ...
}

@ missing_module_idr_destroy depends on declares_idr && defines_module_exit && !on_exit_calls_destroy @
identifier declares_idr.idr, defines_module_exit.exit;
@@

exit(void)
{
 ...
 +idr_destroy(&idr);
 }

</SmPL>

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2015-07-14 13:20:16 -04:00
..
Kconfig RDMA/ocrdma: Add dependency on INET 2014-01-19 15:16:23 -08:00
Makefile RDMA/ocrdma: Query controller information 2014-04-03 08:30:05 -07:00
ocrdma_abi.h RDMA/ocrdma: Code clean-up 2014-04-03 08:30:06 -07:00
ocrdma_ah.c IB/mad: Remove improper use of BUG_ON 2015-07-14 13:20:08 -04:00
ocrdma_ah.h IB/mad: Add support for additional MAD info to/from drivers 2015-06-12 14:49:17 -04:00
ocrdma_hw.c RDMA/ocrdma: Fail connection for MTU lesser than 512 2015-05-18 10:25:24 -04:00
ocrdma_hw.h RDMA/ocrdma: Move PD resource management to driver. 2015-02-18 08:30:59 -08:00
ocrdma_main.c IB/core: Destroy ocrdma_dev_id IDR on module exit 2015-07-14 13:20:16 -04:00
ocrdma_sli.h RDMA/ocrdma: Fix the request length for RDMA_QUERY_QP mailbox command to FW. 2015-05-18 10:25:24 -04:00
ocrdma_stats.c RDMA/ocrdma: Debugfs enhancments for ocrdma driver 2015-02-18 08:31:02 -08:00
ocrdma_stats.h RDMA/ocrdma: Debugfs enhancments for ocrdma driver 2015-02-18 08:31:02 -08:00
ocrdma_verbs.c Changes for 4.2 2015-06-23 15:53:26 -07:00
ocrdma_verbs.h IB/core: Pass hardware specific data in query_device 2015-06-12 14:49:10 -04:00
ocrdma.h RDMA/ocrdma: Update ocrdma version number 2015-05-18 10:25:24 -04:00