From owner-svn-src-stable-7@FreeBSD.ORG Mon May 31 22:07:19 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 471661065673; Mon, 31 May 2010 22:07:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35F268FC12; Mon, 31 May 2010 22:07:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4VM7Jjv036476; Mon, 31 May 2010 22:07:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4VM7Jer036474; Mon, 31 May 2010 22:07:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005312207.o4VM7Jer036474@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 31 May 2010 22:07:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208678 - stable/7/sys/dev/sge X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 May 2010 22:07:19 -0000 Author: yongari Date: Mon May 31 22:07:18 2010 New Revision: 208678 URL: http://svn.freebsd.org/changeset/base/208678 Log: MFC r208512: sge_encap() can sometimes return an error with m_head set to NULL. Make sure not to requeue freed mbuf in sge_start_locked(). This should fix NULL pointer dereference panic. Reported by: Nikolay Denev gmail dot com> Submitted by: jhb Modified: stable/7/sys/dev/sge/if_sge.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/sge/if_sge.c ============================================================================== --- stable/7/sys/dev/sge/if_sge.c Mon May 31 22:03:56 2010 (r208677) +++ stable/7/sys/dev/sge/if_sge.c Mon May 31 22:07:18 2010 (r208678) @@ -1588,7 +1588,8 @@ sge_start_locked(struct ifnet *ifp) if (m_head == NULL) break; if (sge_encap(sc, &m_head)) { - IFQ_DRV_PREPEND(&ifp->if_snd, m_head); + if (m_head != NULL) + IFQ_DRV_PREPEND(&ifp->if_snd, m_head); ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } From owner-svn-src-stable-7@FreeBSD.ORG Tue Jun 1 19:39:28 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AF1B1065676; Tue, 1 Jun 2010 19:39:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E56F8FC2F; Tue, 1 Jun 2010 19:39:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o51JdS9u026006; Tue, 1 Jun 2010 19:39:28 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o51JdSxo026004; Tue, 1 Jun 2010 19:39:28 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201006011939.o51JdSxo026004@svn.freebsd.org> From: John Baldwin Date: Tue, 1 Jun 2010 19:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208719 - stable/7/sys/kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2010 19:39:28 -0000 Author: jhb Date: Tue Jun 1 19:39:27 2010 New Revision: 208719 URL: http://svn.freebsd.org/changeset/base/208719 Log: MFC 208555: Ignore the 'addr' argument passed to PT_STEP (it is required to be '1' for PT_STEP which means "ignore") and PT_DETACH. Modified: stable/7/sys/kern/sys_process.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/sys_process.c ============================================================================== --- stable/7/sys/kern/sys_process.c Tue Jun 1 19:38:46 2010 (r208718) +++ stable/7/sys/kern/sys_process.c Tue Jun 1 19:39:27 2010 (r208719) @@ -731,24 +731,29 @@ kern_ptrace(struct thread *td, int req, if (error) goto out; break; + case PT_CONTINUE: case PT_TO_SCE: - p->p_stops |= S_PT_SCE; - break; case PT_TO_SCX: - p->p_stops |= S_PT_SCX; - break; case PT_SYSCALL: - p->p_stops |= S_PT_SCE | S_PT_SCX; - break; - } - - if (addr != (void *)1) { - error = ptrace_set_pc(td2, (u_long)(uintfptr_t)addr); - if (error) + if (addr != (void *)1) { + error = ptrace_set_pc(td2, + (u_long)(uintfptr_t)addr); + if (error) + goto out; + } + switch (req) { + case PT_TO_SCE: + p->p_stops |= S_PT_SCE; break; - } - - if (req == PT_DETACH) { + case PT_TO_SCX: + p->p_stops |= S_PT_SCX; + break; + case PT_SYSCALL: + p->p_stops |= S_PT_SCE | S_PT_SCX; + break; + } + break; + case PT_DETACH: /* reset process parent */ if (p->p_oppid != p->p_pptr->p_pid) { struct proc *pp; @@ -773,6 +778,7 @@ kern_ptrace(struct thread *td, int req, /* should we send SIGCHLD? */ /* childproc_continued(p); */ + break; } sendsig: