Gentoo Archives: gentoo-commits

From: "Samuli Suominen (ssuominen)" <ssuominen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/kmod/files: kmod-13-errno_syscall.patch
Date: Mon, 27 May 2013 15:38:56
Message-Id: 20130527153850.314752171E@flycatcher.gentoo.org
1 ssuominen 13/05/27 15:38:50
2
3 Added: kmod-13-errno_syscall.patch
4 Log:
5 Avoid calling syscall() with -1 patch from upstream for http://bugs.funtoo.org/browse/FL-534 as requested by lxnay
6
7 (Portage version: 2.2.0_alpha174/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
8
9 Revision Changes Path
10 1.1 sys-apps/kmod/files/kmod-13-errno_syscall.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kmod/files/kmod-13-errno_syscall.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kmod/files/kmod-13-errno_syscall.patch?rev=1.1&content-type=text/plain
14
15 Index: kmod-13-errno_syscall.patch
16 ===================================================================
17 From 5eac795b8b067842caec32f96d55a7554c3c67f9 Mon Sep 17 00:00:00 2001
18 From: Jan Luebbe <jlu@×××××××××××.de>
19 Date: Thu, 02 May 2013 14:47:12 +0000
20 Subject: libkmod: Avoid calling syscall() with -1
21
22 At least in qemu 1.4.1 for vexpress/arm-cortexa9, this resulted in an
23 illegal instruction error. Solve that by returning an error when
24 __NR_finit_module is -1.
25 ---
26 diff --git a/libkmod/missing.h b/libkmod/missing.h
27 index edb88b9..b45bbe2 100644
28 --- a/libkmod/missing.h
29 +++ b/libkmod/missing.h
30 @@ -20,8 +20,15 @@
31 #endif
32
33 #ifndef HAVE_FINIT_MODULE
34 +#include <errno.h>
35 +
36 static inline int finit_module(int fd, const char *uargs, int flags)
37 {
38 + if (__NR_finit_module == -1) {
39 + errno = ENOSYS;
40 + return -1;
41 + }
42 +
43 return syscall(__NR_finit_module, fd, uargs, flags);
44 }
45 #endif
46 --
47 cgit v0.9.1