NetBSD Problem Report #48298

From t-hash@abox3.so-net.ne.jp  Thu Oct 10 12:42:58 2013
Return-Path: <t-hash@abox3.so-net.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 87CCC711A7
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 10 Oct 2013 12:42:58 +0000 (UTC)
Message-Id: <201310101242.r9ACgrDP030633@ms-omx12.plus.so-net.ne.jp>
Date: Thu, 10 Oct 2013 21:42:53 +0900
From: Takahiro HAYASHI <t-hash@abox3.so-net.ne.jp>
To: gnats-bugs@gnats.NetBSD.org
Subject: panic when attaching vcaudio on raspberry pi

>Number:         48298
>Category:       port-evbarm
>Synopsis:       panic when attaching vcaudio on raspberry pi
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-evbarm-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 10 12:45:00 +0000 2013
>Closed-Date:    Sun Oct 13 04:42:41 +0000 2013
>Last-Modified:  Sun Oct 13 04:42:41 +0000 2013
>Originator:     Takahiro HAYASHI
>Release:        NetBSD 6.99.24
>Organization:
>Environment:
System: NetBSD rpi 6.99.24 NetBSD 6.99.24 (MYRPI) #13: Mon Oct  7 16:00:16 JST 2013  root@halt:/usr/build2/obj.evbarm/sys/arch/evbarm/compile/MYRPI evbarm
Architecture: arm
Machine: evbarm
>Description:
	Kernel panics when attaching vcaudio at boot on Raspberry Pi.

	The vchiq code uses curlwp pointer as client_id instead of pid,
	then client_id is now expressed as 11 digits in signed decimal
	(e.g. -1045735424 in my rpi).
	In function vchiq_use_internal() this client_id is sprintf'ed
	into slightly short buffer. The buffer is enough large to put
	5 digits pid number but is not for 11 digits lwp pointer.
	This may break other variable on stack.

>How-To-Repeat:
	install recent (after 2013.09.19.15.13.43) kernel.img and boot
>Fix:
	In functions vchiq_use_internal and vchiq_release_internal
	- enlarge buffer entity[] enough to store whole strings
	- use snprintf


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: gnats-admin->port-evbarm-maintainer
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Sat, 12 Oct 2013 17:48:39 +0000
Responsible-Changed-Why:
came in as "port-ebvarm" instead of "port-evbarm" so gnats got confused


From: Takahiro HAYASHI <t-hash@abox3.so-net.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: port-evbarm-maintainer@netbsd.org, gnats-admin@netbsd.org,
        netbsd-bugs@netbsd.org, dholland@NetBSD.org
Subject: Re: port-evbarm/48298 (panic when attaching vcaudio on raspberry pi)
Date: Sun, 13 Oct 2013 04:26:39 +0900

 On Sat, 12 Oct 2013 17:48:39 +0000 (UTC)
 dholland@NetBSD.org wrote:

 > Synopsis: panic when attaching vcaudio on raspberry pi
 > 
 > Responsible-Changed-From-To: gnats-admin->port-evbarm-maintainer
 > Responsible-Changed-By: dholland@NetBSD.org
 > Responsible-Changed-When: Sat, 12 Oct 2013 17:48:39 +0000
 > Responsible-Changed-Why:
 > came in as "port-ebvarm" instead of "port-evbarm" so gnats got confused

 Thank you for pointing out and fixing.

 This is dup of PR 48287, please close this.

 --
 t-hash

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 13 Oct 2013 04:42:41 +0000
State-Changed-Why:
Oops, I should have noticed this was a duplicate.

(as for the typo, don't worry about it. These things happen. gnats
reacts badly, but that can't be helped...)


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.