Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Jan 2016 16:29:51 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r293540 - in stable/10/sys: amd64/linux32 compat/linux i386/linux
Message-ID:  <201601091629.u09GTpaV038794@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Sat Jan  9 16:29:51 2016
New Revision: 293540
URL: https://svnweb.freebsd.org/changeset/base/293540

Log:
  MFC r283436:
  
  Use the BSD_TO_LINUX_SIGNAL() wherever there is no need
  to check the ABI as it is known.

Modified:
  stable/10/sys/amd64/linux32/linux32_sysvec.c
  stable/10/sys/compat/linux/linux_signal.c
  stable/10/sys/i386/linux/linux_sysvec.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/amd64/linux32/linux32_sysvec.c
==============================================================================
--- stable/10/sys/amd64/linux32/linux32_sysvec.c	Sat Jan  9 16:28:40 2016	(r293539)
+++ stable/10/sys/amd64/linux32/linux32_sysvec.c	Sat Jan  9 16:29:51 2016	(r293540)
@@ -344,9 +344,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo
 	/*
 	 * Build the argument list for the signal handler.
 	 */
-	if (p->p_sysent->sv_sigtbl)
-		if (sig <= p->p_sysent->sv_sigsize)
-			sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)];
+	sig = BSD_TO_LINUX_SIGNAL(sig);
 
 	bzero(&frame, sizeof(frame));
 
@@ -492,9 +490,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t 
 	/*
 	 * Build the argument list for the signal handler.
 	 */
-	if (p->p_sysent->sv_sigtbl)
-		if (sig <= p->p_sysent->sv_sigsize)
-			sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)];
+	sig = BSD_TO_LINUX_SIGNAL(sig);
 
 	bzero(&frame, sizeof(frame));
 

Modified: stable/10/sys/compat/linux/linux_signal.c
==============================================================================
--- stable/10/sys/compat/linux/linux_signal.c	Sat Jan  9 16:28:40 2016	(r293539)
+++ stable/10/sys/compat/linux/linux_signal.c	Sat Jan  9 16:29:51 2016	(r293540)
@@ -628,10 +628,8 @@ linux_tkill(struct thread *td, struct li
 	if (!LINUX_SIG_VALID(args->sig))
 		return (EINVAL);
 
-	if (args->sig > 0 && args->sig <= LINUX_SIGTBLSZ)
-		sig = linux_to_bsd_signal[_SIG_IDX(args->sig)];
-	else
-		sig = args->sig;
+
+	sig = BSD_TO_LINUX_SIGNAL(args->sig);
 
 	tdt = linux_tdfind(td, args->tid, -1);
 	if (tdt == NULL)
@@ -788,10 +786,7 @@ linux_rt_sigqueueinfo(struct thread *td,
 	if (linfo.lsi_code >= 0)
 		return (EPERM);
 
-	if (args->sig > 0 && args->sig <= LINUX_SIGTBLSZ)
-		sig = linux_to_bsd_signal[_SIG_IDX(args->sig)];
-	else
-		sig = args->sig;
+	sig = BSD_TO_LINUX_SIGNAL(args->sig);
 
 	error = ESRCH;
 	if ((p = pfind(args->pid)) != NULL ||

Modified: stable/10/sys/i386/linux/linux_sysvec.c
==============================================================================
--- stable/10/sys/i386/linux/linux_sysvec.c	Sat Jan  9 16:28:40 2016	(r293539)
+++ stable/10/sys/i386/linux/linux_sysvec.c	Sat Jan  9 16:29:51 2016	(r293540)
@@ -480,9 +480,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo
 	/*
 	 * Build the argument list for the signal handler.
 	 */
-	if (p->p_sysent->sv_sigtbl)
-		if (sig <= p->p_sysent->sv_sigsize)
-			sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)];
+	sig = BSD_TO_LINUX_SIGNAL(sig);
 
 	bzero(&frame, sizeof(frame));
 
@@ -623,9 +621,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t 
 	/*
 	 * Build the argument list for the signal handler.
 	 */
-	if (p->p_sysent->sv_sigtbl)
-		if (sig <= p->p_sysent->sv_sigsize)
-			sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)];
+	sig = BSD_TO_LINUX_SIGNAL(sig);
 
 	bzero(&frame, sizeof(frame));
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601091629.u09GTpaV038794>