Date: Sat, 28 Sep 2019 02:49:46 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352831 - head/sys/contrib/ncsw/Peripherals/BM Message-ID: <201909280249.x8S2nkUs017567@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Sat Sep 28 02:49:46 2019 New Revision: 352831 URL: https://svnweb.freebsd.org/changeset/base/352831 Log: dpaa(4): Fix memcpy size for threshold copy in NCSW contrib On 64-bit platforms uintptr_t makes the copy twice as large as it should be. This code isn't actually used in FreeBSD, since it's for guest mode only, not hypervisor mode, but fixing it for completeness sake. Reported by: bdragon (clang9 build) Modified: head/sys/contrib/ncsw/Peripherals/BM/bm.c Modified: head/sys/contrib/ncsw/Peripherals/BM/bm.c ============================================================================== --- head/sys/contrib/ncsw/Peripherals/BM/bm.c Sat Sep 28 02:15:23 2019 (r352830) +++ head/sys/contrib/ncsw/Peripherals/BM/bm.c Sat Sep 28 02:49:46 2019 (r352831) @@ -258,7 +258,7 @@ t_Error BmSetPoolThresholds(t_Handle h_Bm, uint8_t bpi memset(&msg, 0, sizeof(t_BmIpcMsg)); ipcPoolThresh.bpid = bpid; - memcpy(ipcPoolThresh.thresholds, thresholds, sizeof(uintptr_t) * MAX_DEPLETION_THRESHOLDS); + memcpy(ipcPoolThresh.thresholds, thresholds, sizeof(uint32_t) * MAX_DEPLETION_THRESHOLDS); msg.msgId = BM_SET_POOL_THRESH; memcpy(msg.msgBody, &ipcPoolThresh, sizeof(t_BmIpcPoolThreshParams)); if ((errCode = XX_IpcSendMessage(p_Bm->h_Session,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909280249.x8S2nkUs017567>