On 11/09/2010 03:45 PM, Christoph Hellwig wrote: > On Tue, Nov 09, 2010 at 02:03:21AM -0800, Nicholas A. Bellinger wrote: >> <nod> thanks for the pointer here.. >> >> Btw, the kstrdup() is required because the configfs attribute store >> function will be passing a 'const char *page' that is propigated from >> target_core_configfs.c: target_core_store_dev_control() out to >> ->set_configfs_dev_params() backend code. > > strsep doesn't modify the data it points to, just the pointer itself. > We could get around this by casting the pointer, which at least avoids > the memory allocation. But it's probably not worth bothering. > If it is so, then the proper fix is to "const" the parameter to strsep() most certainly don't hide a const_cast like that. This is a landmine waiting to explode. Boaz -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html