Re: r263096 sparc64: casperd: Unable to receive message from cli

看板FB_current作者時間12年前 (2014/03/30 19:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
On Fri, Mar 14, 2014 at 02:54:43PM +0100, Jilles Tjoelker wrote: > On Thu, Mar 13, 2014 at 05:14:56AM -0700, Anton Shterenlikht wrote: > > Mar 13 12:08:48 casperd[1313]: [ERROR] (casperd) Unable to receive message from client: Cannot allocate memory. > > Mar 13 12:08:50 last message repeated 2 times > > Mar 13 12:09:57 casperd[1313]: [ERROR] (casperd) Unable to receive message from client: Cannot allocate memory. I'm seeing this as well on fresh -CURRENT/powerpc when trying to ping(8) something with casperd(8) enabled; albeit a bit different (s/Cannot allocate memory/Invalid argument/). > It looks like a bug causes the "big endian" flag to be lost. As a > result, the bits are interpreted as little endian and an extremely large > allocation is attempted. Try this patch: > > Index: lib/libnv/nvlist.c > =================================================================== > --- lib/libnv/nvlist.c (revision 262358) > +++ lib/libnv/nvlist.c (working copy) > @@ -582,7 +582,7 @@ nvlist_check_header(struct nvlist_header *nvlhdrp) > errno = EINVAL; > return (false); > } > - if ((nvlhdrp->nvlh_flags &= ~NV_FLAG_ALL_MASK) != 0) { > + if ((nvlhdrp->nvlh_flags & ~NV_FLAG_ALL_MASK) != 0) { > errno = EINVAL; > return (false); > } This patch alone (without touching lib/libnv/msgio.c) fixed it for me (applied, rebuilt/reinstalled libnv, restared casperd(8)), thank you! :) ../danfe _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1JD_blW5 (FB_current)
文章代碼(AID): #1JD_blW5 (FB_current)