From owner-svn-src-head@freebsd.org Thu Jun 1 09:53:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BD69BF84D1; Thu, 1 Jun 2017 09:53:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C209723CF; Thu, 1 Jun 2017 09:53:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v519ruA8059270; Thu, 1 Jun 2017 09:53:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v519rud7059269; Thu, 1 Jun 2017 09:53:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706010953.v519rud7059269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 1 Jun 2017 09:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319410 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 09:53:57 -0000 Author: hselasky Date: Thu Jun 1 09:53:55 2017 New Revision: 319410 URL: https://svnweb.freebsd.org/changeset/base/319410 Log: Translate the ERESTARTSYS error code into ERESTART in the LinuxKPI ioctl(), read() and write() system call handlers. This error code is internal to the kernel and should not be seen by user-space programs according to Linux. Submitted by: Yanko Yankulov MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Jun 1 09:34:51 2017 (r319409) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Jun 1 09:53:55 2017 (r319410) @@ -854,6 +854,8 @@ linux_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t if (error == EWOULDBLOCK) linux_dev_kqfilter_poll(filp); + else if (error == ERESTARTSYS) + error = ERESTART; return (error); } @@ -889,6 +891,8 @@ linux_dev_read(struct cdev *dev, struct uio *uio, int error = -bytes; if (error == EWOULDBLOCK) linux_dev_kqfilter_poll(filp); + else if (error == ERESTARTSYS) + error = ERESTART; } } else error = ENXIO; @@ -928,6 +932,8 @@ linux_dev_write(struct cdev *dev, struct uio *uio, int error = -bytes; if (error == EWOULDBLOCK) linux_dev_kqfilter_poll(filp); + else if (error == ERESTARTSYS) + error = ERESTART; } } else error = ENXIO;