Date: Mon, 7 Jun 2010 15:50:54 GMT From: Garrett Cooper <gcooper@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/147654: [patch] fix unitialized mfi_unit value passed to mfiutil(8) / mptutil(8) Message-ID: <201006071550.o57Fosb9039014@www.freebsd.org> Resent-Message-ID: <201006071600.o57G0Hae062539@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 147654 >Category: bin >Synopsis: [patch] fix unitialized mfi_unit value passed to mfiutil(8) / mptutil(8) >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: Mon Jun 07 16:00:17 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: 9-CURRENT >Organization: Cisco Systems, Inc. >Environment: FreeBSD bayonetta.local 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r206173M: Mon Apr 26 22:45:06 PDT 2010 root@bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA.ata amd64 >Description: The value of mpt_unit can be undefined (depending on how the stack is allocated) if -u isn't passed to the command. This patch explicitly notes that the default mpt_unit is unit 0 in both mfiutil(8) and mptutil(8). >How-To-Repeat: >Fix: Patch attached with submission follows: Index: mfiutil/mfiutil.c =================================================================== --- mfiutil/mfiutil.c (revision 206173) +++ mfiutil/mfiutil.c (working copy) @@ -43,7 +43,7 @@ MFI_TABLE(top, stop); MFI_TABLE(top, abort); -int mfi_unit; +int mfi_unit = 0; static void usage(void) Index: mptutil/mptutil.c =================================================================== --- mptutil/mptutil.c (revision 206173) +++ mptutil/mptutil.c (working copy) @@ -42,7 +42,7 @@ SET_DECLARE(MPT_DATASET(top), struct mptutil_command); -int mpt_unit; +int mpt_unit = 0; static void usage(void) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006071550.o57Fosb9039014>