[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] pfinet: check return value of mmap() in S_io_read() and S_so
Carl Fredrik Hammar
Re: [PATCH] pfinet: check return value of mmap() in S_io_read() and S_socket_recv()
Thu, 22 Jul 2010 20:24:05 +0200
On Thu, Jul 22, 2010 at 12:16:08PM +0200, olafBuddenhagen@gmx.net wrote:
> I realized that my problems with pfinet crashing after apt-get fetching
> ~90 MB of packages, are due to a gaping virtual memory leak in pfinet.
> (Probably the same one Samuel fixed recently; but I haven't tested his
> patches yet...)
> The result of the memory leak is that after all virtual memory space has
> been exhausted, mmap() fails. However, the return status of mmap() isn't
> checked, and pfinet tries to use the invalid pointer later on.
> This patch fixes this, and makes pfinet return an error to the caller of
> the respective RPC, when mmap() fails.
Looks good to me, though I'd keep the comments a bit terser myself, and
there's no ChangeLog but I guess the commiter could do this for such a
BTW did you sign over copyright to FSF? I don't remember.
Though again this patch is probably small enough regardless.