Re: [BUGFIX][PATCH 2/3] kcore: fix vread/vwrite to be aware ofholes.

From: Amerigo Wang
Date: Tue Aug 04 2009 - 22:07:05 EST


On Tue, Aug 04, 2009 at 06:55:26PM +0900, KAMEZAWA Hiroyuki wrote:
>> >+
>> >+/**
>> >+ * vread() - read vmalloc area in a safe way.
>> >+ * @buf: buffer for reading data
>> >+ * @addr: vm address.
>> >+ * @count: number of bytes to be read.
>> >+ *
>> >+ * Returns # of bytes which addr and buf should be increased.
>> >+ * (same to count).
>> >+ * If [addr...addr+count) doesn't includes any valid area, returns 0.
>>
>>
>> If I read it correctly, your code doesn't do what you described here,
>> it doesn't return 0 when there is no valid area.
>>
>
>Hmm.. valid area is ambiguous, ok, how about this ?
>
>If [addr...addr+count) has no intersects with exisiting vm_struct, returns 0.

Ah, I see your points now, Ok then.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/