Re: [PATCH 09/33] libceph: fix crush_decode() call site in osdmap_decode()

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

 



On Thu, Mar 27, 2014 at 9:45 PM, Alex Elder <elder@xxxxxxxx> wrote:
> On 03/27/2014 01:17 PM, Ilya Dryomov wrote:
>> The size of the memory area feeded to crush_decode() should be limited
>> not only by osdmap end, but also by the crush map length.  Also, drop
>
> You're also letting crush_decode() verify it has the buffer space
> it needs internally, rather than checking it before making the call,
> which is good.  (Though I guess you don't have to mention it.)

Yes.

>
>> unnecessary dout() (dout() in crush_decode() conveys the same info) and
>> step past crush map only if it is decoded successfully.
>
> I actually think crush_decode() should take a (void **)
> instead, as its first argument and advance the pointer
> by as much as it uses (like most of the other routines do).
> That's a suggestion, but I don't really care, this is fine.

Me too, and I considered it, but it's the only decode helper that takes
a (void *) and it even names it "pbyval", which suggests that it was
intentional, so I kept it the way it is.

Thanks,

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




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux