看板 FB_bugs 關於我們 聯絡資訊
>Number: 189845 >Category: misc >Synopsis: UnNecessary Copy of Error Buffer in _kvm_open >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu May 15 22:50:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Myron Walker >Release: >Organization: EMC >Environment: mwwsoftcluster0# uname -a FreeBSD mwwsoftcluster0 11.0-CURRENT FreeBSD 11.0-CURRENT #0: Mon May 5 10:30:09 PDT 2014 root@bsd10build01.west.isilon.com:/build/mnt/obj/build/mnt/src/sys/IQ.amd64.debug amd64 >Description: _kvm_open in libkvm always returns 0 on a failure. So writing a message to kd is pointless because it is immediately passed to kvm_close() and the memory is freed. Se the code snippet below from _kvm_open. /* * Copy out the error if doing sane error semantics. */ if (errout != 0) strlcpy(errout, kd->errbuf, _POSIX2_LINE_MAX); (void)kvm_close(kd); return (0); >How-To-Repeat: >Fix: All error message code can be removed from _kvm_open because none of it is used anyway. >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"