]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rds: srq initialization and cleanup
authorWengang Wang <wen.gang.wang@oracle.com>
Mon, 7 Sep 2015 06:12:42 +0000 (14:12 +0800)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Thu, 17 Sep 2015 00:06:50 +0000 (17:06 -0700)
commit23f63dbf2dbc153937b34d60e2e37740ca2ec8dc
treef78dcf3547215be1b84ad926ef953d4b6e353075
parent969bb4e57b68e5fe7f1155762f631aee7b3dc4bb
rds: srq initialization and cleanup

RDS has the following two problem related to shared receive queues

1) srq initialization:
  When a new IB dev is registered to device_list, the .add methods
of clients in client_list are called to do some initialization work.

For RDS, rds_ib_add_one() is called. srq related things should be
well initialized here since this is the last change before using srq.

However, code only allocates memory and seems hope rds_ib_srqs_init()
to initialize it later. But infact, rds_ib_srqs_init()
is not called if the call path is not insmod of rds_rdma.

2) srq cleanup:
  When removing rds_rdma module, srqs for all rds_ib_device should
be cleaned up. However, code only frees the rds_ib_device.srq memory
and is not cleaning up memory pointed to by pointers embedded inside.
This lead to resource leak.

This patch fixes the above two problems.

Orabug: 21795815

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Reviewed-by: Chien Yen <chien.yen@oracle.com>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
net/rds/ib.c
net/rds/ib.h
net/rds/ib_recv.c