[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[dm-devel] dm-table-rework-reference-counting.patch
- From: Kiyoshi Ueda <k-ueda ct jp nec com>
- To: Alasdair G Kergon <agk redhat com>, Mikulas Patocka <mpatocka redhat com>
- Cc: device-mapper development <dm-devel redhat com>
- Subject: [dm-devel] dm-table-rework-reference-counting.patch
- Date: Tue, 06 Jan 2009 16:16:50 +0900
Hi Alasdair, Mikulas,
Although I'm not sure this is correct, don't we need to convert
the following 2 dm_table_put()s to dm_table_destroy()?
Otherwise, the created table won't be destroyed and memory leak
will happen in such error cases?
drivers/md/dm-ioctl.c:table_load()
1060 r = dm_table_create(&t, get_mode(param), param->target_count, md);
1061 if (r)
1062 goto out;
1063
1064 r = populate_table(t, param, param_size);
1065 if (r) {
1066 dm_table_put(t);
1067 goto out;
1068 }
1069
1070 down_write(&_hash_lock);
1071 hc = dm_get_mdptr(md);
1072 if (!hc || hc->md != md) {
1073 DMWARN("device has been removed from the dev hash table.");
1074 dm_table_put(t);
1075 up_write(&_hash_lock);
1076 r = -ENXIO;
1077 goto out;
1078 }
Thanks,
Kiyoshi Ueda
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]