From owner-svn-src-head@freebsd.org Thu Nov 24 21:12:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DC77C53C58; Thu, 24 Nov 2016 21:12:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEEF587A; Thu, 24 Nov 2016 21:12:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOLCXnr039739; Thu, 24 Nov 2016 21:12:33 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOLCX2f039738; Thu, 24 Nov 2016 21:12:33 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611242112.uAOLCX2f039738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 24 Nov 2016 21:12:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309116 - head/sys/dev/virtio/console X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 21:12:34 -0000 Author: avg Date: Thu Nov 24 21:12:32 2016 New Revision: 309116 URL: https://svnweb.freebsd.org/changeset/base/309116 Log: virtio_console: correctly determine presense of payload and its length MFC after: 2 weeks Modified: head/sys/dev/virtio/console/virtio_console.c Modified: head/sys/dev/virtio/console/virtio_console.c ============================================================================== --- head/sys/dev/virtio/console/virtio_console.c Thu Nov 24 21:01:25 2016 (r309115) +++ head/sys/dev/virtio/console/virtio_console.c Thu Nov 24 21:12:32 2016 (r309116) @@ -888,9 +888,9 @@ vtcon_ctrl_task_cb(void *xsc, int pendin if (control == NULL) break; - if (len > sizeof(control)) { + if (len > sizeof(*control)) { payload = (void *)(control + 1); - plen = len - sizeof(control); + plen = len - sizeof(*control); } VTCON_UNLOCK(sc);