Re: virtio-rng only returns zeros with CONFIG_HW_RANDOM=m

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jens Axboe <axboe@xxxxxxxxx> writes:
> On Wed, Feb 27 2013, Rusty Russell wrote:
>> Subject: scatterlist: sg_set_buf() argument must be in linear mapping.
>> 
>> Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
>> 
>> diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
>> index 4bd6c06..9365375 100644
>> --- a/include/linux/scatterlist.h
>> +++ b/include/linux/scatterlist.h
>> @@ -111,6 +111,9 @@ static inline struct page *sg_page(struct scatterlist *sg)
>>  static inline void sg_set_buf(struct scatterlist *sg, const void *buf,
>>  			      unsigned int buflen)
>>  {
>> +#ifdef CONFIG_DEBUG_SG
>> +	BUG_ON(!virt_addr_valid(buf));
>> +#endif
>>  	sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf));
>>  }
>
> Looks good to me, in lieu of being able to return an error. Want me to
> queue it up?

Please... it'll catch me the next time I make the same mistake :)

(Though the static-definitions-in-modules-on-most-archs is a pretty
nasty corner case).

Thanks,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux