On 09/01/2015 11:48 PM, Christoph Hellwig wrote:
> On Tue, Sep 01, 2015 at 05:03:28PM -0700, Lee Duncan wrote:
>> +static int host_get_index(int *index)
>> +{
>> +int error = -ENOMEM;
>> +
>> +do {
>> +if (!ida_pre_get(&host_index_ida, GFP_KERNEL))
>> +break;
On Tue, Sep 01, 2015 at 05:03:28PM -0700, Lee Duncan wrote:
> +static int host_get_index(int *index)
> +{
> + int error = -ENOMEM;
> +
> + do {
> + if (!ida_pre_get(&host_index_ida, GFP_KERNEL))
> + break;
> + spin_lock(&host_index_lock);
> +
Each Scsi_host instance gets a host number starting
at 0, but this is implemented with an atomic integer,
and rollover doesn't seem to have been considered.
Another side-effect of this design is that scsi host
numbers used by iscsi are never reused, thereby making
rollover more likely. This patch
3 matches
Mail list logo