Merge branch 'master' of github.com:OpenELEC/OpenELEC.tv into openelec-6.0

This commit is contained in:
Stephan Raue 2015-10-14 22:08:17 +02:00
commit 59360d917d
7 changed files with 231 additions and 2 deletions

View File

@ -146,7 +146,7 @@
# LCD driver to Use - Possible drivers are ( Comma seperated:
# bayrad,CFontz,CFontz633,CFontzPacket,curses,CwLnx,dm140,
# ea65,EyeboxOne,g15,glcdlib,glk,hd44780,i2500vfd,
# ea65,EyeboxOne,g15,glcd,glcdlib,glk,hd44780,i2500vfd,
# icp_a106,imon,imonlcd,IOWarrior,irman,irtrans,
# joy,lb216,lcdm001,lcterm,lirc,lis,MD8800,mdm166a,
# ms6931,mtc_s16209x,MtxOrb,mx5000,NoritakeVFD,

View File

@ -17,7 +17,7 @@
################################################################################
PKG_NAME="glib"
PKG_VERSION="2.46.0"
PKG_VERSION="2.46.1"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="LGPL"

View File

@ -0,0 +1,63 @@
From 8f6a05588928ef61e751ca3cb008b9847fb6b83d Mon Sep 17 00:00:00 2001
From: Eric Dumazet <edumazet@google.com>
Date: Thu, 1 Oct 2015 05:39:26 -0700
Subject: [PATCH] inet: fix race in reqsk_queue_unlink()
reqsk_timer_handler() tests if icsk_accept_queue.listen_opt
is NULL at its beginning.
By the time it calls inet_csk_reqsk_queue_drop() and
reqsk_queue_unlink(), listener might have been closed and
inet_csk_listen_stop() had called reqsk_queue_yank_acceptq()
which sets icsk_accept_queue.listen_opt to NULL
We therefore need to correctly check listen_opt being NULL
after holding syn_wait_lock for proper synchronization.
Fixes: fa76ce7328b2 ("inet: get rid of central tcp/dccp listener timer")
Fixes: b357a364c57c ("inet: fix possible panic in reqsk_queue_unlink()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
---
net/ipv4/inet_connection_sock.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index e664706b350c..37c8b45af44b 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -568,21 +568,22 @@ EXPORT_SYMBOL(inet_rtx_syn_ack);
static bool reqsk_queue_unlink(struct request_sock_queue *queue,
struct request_sock *req)
{
- struct listen_sock *lopt = queue->listen_opt;
struct request_sock **prev;
+ struct listen_sock *lopt;
bool found = false;
spin_lock(&queue->syn_wait_lock);
-
- for (prev = &lopt->syn_table[req->rsk_hash]; *prev != NULL;
- prev = &(*prev)->dl_next) {
- if (*prev == req) {
- *prev = req->dl_next;
- found = true;
- break;
+ lopt = queue->listen_opt;
+ if (lopt) {
+ for (prev = &lopt->syn_table[req->rsk_hash]; *prev != NULL;
+ prev = &(*prev)->dl_next) {
+ if (*prev == req) {
+ *prev = req->dl_next;
+ found = true;
+ break;
+ }
}
}
-
spin_unlock(&queue->syn_wait_lock);
if (timer_pending(&req->rsk_timer) && del_timer_sync(&req->rsk_timer))
reqsk_put(req);
--
2.4.3

View File

@ -0,0 +1,40 @@
From 05676fe53c9f26fe703c57b14bdd0807e23cc33b Mon Sep 17 00:00:00 2001
From: Eric Dumazet <edumazet@google.com>
Date: Thu, 13 Aug 2015 15:44:51 -0700
Subject: [PATCH 1/2] inet: fix potential deadlock in reqsk_queue_unlink()
When replacing del_timer() with del_timer_sync(), I introduced
a deadlock condition :
reqsk_queue_unlink() is called from inet_csk_reqsk_queue_drop()
inet_csk_reqsk_queue_drop() can be called from many contexts,
one being the timer handler itself (reqsk_timer_handler()).
In this case, del_timer_sync() loops forever.
Simple fix is to test if timer is pending.
Fixes: 2235f2ac75fd ("inet: fix races with reqsk timers")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/ipv4/inet_connection_sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index b27fc401c6a9..e664706b350c 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -584,7 +584,7 @@ static bool reqsk_queue_unlink(struct request_sock_queue *queue,
}
spin_unlock(&queue->syn_wait_lock);
- if (del_timer_sync(&req->rsk_timer))
+ if (timer_pending(&req->rsk_timer) && del_timer_sync(&req->rsk_timer))
reqsk_put(req);
return found;
}
--
2.4.3

View File

@ -37,6 +37,16 @@ if [ "$IRSERVER_SUPPORT" = yes ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET irserver"
fi
IFS=$','
for i in $LCD_DRIVER; do
case $i in
glcd) PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET serdisplib"
;;
*)
esac
done
unset IFS
PKG_CONFIGURE_OPTS_TARGET="--enable-libusb --enable-drivers=$LCD_DRIVER,!curses,!svga --enable-seamless-hbars"
pre_make_target() {
@ -59,6 +69,7 @@ post_makeinstall_target() {
-e "s|^#Hello=\" LCDproc!\"|Hello=\"$DISTRONAME\"|" \
-e "s|^#GoodBye=\"Thanks for using\"|GoodBye=\"Thanks for using\"|" \
-e "s|^#GoodBye=\" LCDproc!\"|GoodBye=\"$DISTRONAME\"|" \
-e "s|^#normal_font=.*$|normal_font=/usr/share/fonts/liberation/LiberationMono-Bold.ttf|" \
-i $INSTALL/etc/LCDd.conf
mkdir -p $INSTALL/usr/lib/openelec

View File

@ -0,0 +1,58 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="serdisplib"
PKG_VERSION="1.97.9"
PKG_REV="0"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://serdisplib.sourceforge.net/"
PKG_URL="$SOURCEFORGE_SRC/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain libusb-compat"
PKG_PRIORITY="optional"
PKG_SECTION="sysutils"
PKG_SHORTDESC="serdisplib: a lcd control library"
PKG_LONGDESC="Library to drive serial/parallel/usb displays with built-in controllers"
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
PKG_CONFIGURE_OPTS_TARGET="--prefix=$SYSROOT_PREFIX/usr \
--bindir=$SYSROOT_PREFIX/usr/bin \
--enable-libusb \
--disable-libSDL \
--with-drivers=all"
pre_configure_target() {
# serdisplib fails to build in subdirs (found this in packages/devel/attr/package.mk)
cd $ROOT/$PKG_BUILD
rmdir .$TARGET_NAME
}
post_make_target() {
# copy necessary libs and headers to build the driver glcd from lcdproc
mkdir -p $SYSROOT_PREFIX/usr/include/serdisplib
cp include/serdisplib/*.h $SYSROOT_PREFIX/usr/include/serdisplib
mkdir -p $SYSROOT_PREFIX/usr/lib
cp lib/libserdisp.so* $SYSROOT_PREFIX/usr/lib
}
makeinstall_target() {
mkdir -p $INSTALL/usr/lib
cp lib/libserdisp.so* $INSTALL/usr/lib
}

View File

@ -0,0 +1,57 @@
diff -Naur serdisplib-1.97.9/configure serdisplib-1.97.9-b/configure
--- serdisplib-1.97.9/configure 2010-02-21 20:49:29.000000000 +0100
+++ serdisplib-1.97.9-b/configure 2015-06-10 17:49:18.780035766 +0200
@@ -4347,6 +4347,11 @@
# HAVE_SDL_H
# HAVE_SDL_SDL_H
# HAVE_LIBSDL
+
+has_libSDL="false" # pre-init
+
+# SDL only if not cross compiling (until better solution has been found)
+if test "$ac_cv_build" == "$ac_cv_host" ; then
# Extract the first word of "sdl-config", so it can be a program name with args.
set dummy sdl-config; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -4387,7 +4392,6 @@
fi
-has_libSDL="false" # pre-init
if test ! -z "${LIBSDL_CONFIG}"; then
LIBSDL_CFLAGS=`${LIBSDL_CONFIG} --cflags`
CFLAGS="${CFLAGS} ${LIBSDL_CFLAGS}"
@@ -4761,6 +4765,7 @@
fi
fi
fi
+fi
diff -Naur serdisplib-1.97.9/configure.in serdisplib-1.97.9-b/configure.in
--- serdisplib-1.97.9/configure.in 2010-02-21 20:49:29.000000000 +0100
+++ serdisplib-1.97.9-b/configure.in 2015-06-10 17:46:33.986014606 +0200
@@ -143,9 +143,13 @@
# HAVE_SDL_H
# HAVE_SDL_SDL_H
# HAVE_LIBSDL
-AC_PATH_PROG(LIBSDL_CONFIG, sdl-config)
has_libSDL="false" # pre-init
+
+# SDL only if not cross compiling (until better solution has been found)
+if test "$ac_cv_build" == "$ac_cv_host" ; then
+AC_PATH_PROG(LIBSDL_CONFIG, sdl-config)
+
if test ! -z "${LIBSDL_CONFIG}"; then
LIBSDL_CFLAGS=`${LIBSDL_CONFIG} --cflags`
CFLAGS="${CFLAGS} ${LIBSDL_CFLAGS}"
@@ -183,6 +187,7 @@
fi
fi
fi
+fi
AC_SUBST(has_libSDL)
AC_SUBST(HAVE_LIBSDL)