From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1UYJJg-0002y1-Sd for ptxdist@pengutronix.de; Fri, 03 May 2013 18:58:40 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1UYJJe-0001Y8-Of for ptxdist@pengutronix.de; Fri, 03 May 2013 18:58:38 +0200 Date: Fri, 3 May 2013 18:58:38 +0200 From: Michael Olbrich Message-ID: <20130503165838.GD1194@pengutronix.de> References: <20130502195341.GA22668@pengutronix.de> <1367525115-24143-1-git-send-email-jlu@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1367525115-24143-1-git-send-email-jlu@pengutronix.de> Subject: Re: [ptxdist] [PATCH] libkmod: avoid calling syscall() with -1 Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Thu, May 02, 2013 at 10:05:15PM +0200, Jan Luebbe wrote: > This fixes an illegal instruction error on qemu ARM. Thanks, applied. Michael > Signed-off-by: Jan Luebbe > --- > > It seems this patch has been applied upstream: > http://thread.gmane.org/gmane.linux.kernel.modules/1061/focus=1064 > > ...ssing-Don-t-call-syscall-with-syscallno-1.patch | 40 ++++++++++++++++++++ > patches/kmod-13/series | 4 ++ > 2 files changed, 44 insertions(+) > create mode 100644 patches/kmod-13/0001-missing-Don-t-call-syscall-with-syscallno-1.patch > create mode 100644 patches/kmod-13/series > > diff --git a/patches/kmod-13/0001-missing-Don-t-call-syscall-with-syscallno-1.patch b/patches/kmod-13/0001-missing-Don-t-call-syscall-with-syscallno-1.patch > new file mode 100644 > index 0000000..a385d63 > --- /dev/null > +++ b/patches/kmod-13/0001-missing-Don-t-call-syscall-with-syscallno-1.patch > @@ -0,0 +1,40 @@ > +From: Lucas De Marchi > +Date: Thu, 2 May 2013 13:22:57 -0300 > +Subject: [PATCH] missing: Don't call syscall() with syscallno == -1 > + > +Reported-by: Jean-Francis Roy > +Reported-by: Jan Luebbe > +--- > + libkmod/missing.h | 10 ++++++---- > + 1 file changed, 6 insertions(+), 4 deletions(-) > + > +diff --git a/libkmod/missing.h b/libkmod/missing.h > +index edb88b9..b31af84 100644 > +--- a/libkmod/missing.h > ++++ b/libkmod/missing.h > +@@ -1,5 +1,6 @@ > + #pragma once > + > ++#include > + #include > + #include > + > +@@ -15,13 +16,14 @@ > + # define MODULE_INIT_IGNORE_VERMAGIC 2 > + #endif > + > +-#ifndef __NR_finit_module > +-# define __NR_finit_module -1 > +-#endif > +- > + #ifndef HAVE_FINIT_MODULE > + static inline int finit_module(int fd, const char *uargs, int flags) > + { > ++#ifndef __NR_finit_module > ++ errno = ENOSYS; > ++ return -1; > ++#else > + return syscall(__NR_finit_module, fd, uargs, flags); > ++#endif > + } > + #endif > diff --git a/patches/kmod-13/series b/patches/kmod-13/series > new file mode 100644 > index 0000000..3fc301f > --- /dev/null > +++ b/patches/kmod-13/series > @@ -0,0 +1,4 @@ > +# generated by git-ptx-patches > +#tag:base --start-number 1 > +0001-missing-Don-t-call-syscall-with-syscallno-1.patch > +# 0b7413dd7632441bc24225859a7d1866 - git-ptx-patches magic > -- > 1.7.10.4 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de