All of lore.kernel.org
 help / color / mirror / Atom feed
* dm-table-rework-reference-counting.patch
@ 2009-01-06  7:16 Kiyoshi Ueda
  2009-01-06 21:27 ` dm-table-rework-reference-counting.patch Mikulas Patocka
  0 siblings, 1 reply; 3+ messages in thread
From: Kiyoshi Ueda @ 2009-01-06  7:16 UTC (permalink / raw)
  To: Alasdair G Kergon, Mikulas Patocka; +Cc: device-mapper development

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-07  5:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-06  7:16 dm-table-rework-reference-counting.patch Kiyoshi Ueda
2009-01-06 21:27 ` dm-table-rework-reference-counting.patch Mikulas Patocka
2009-01-07  5:23   ` self deadlock possibility during device deletion (Was: dm-table-rework-reference-counting.patch) Kiyoshi Ueda

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.