From owner-freebsd-bugs@FreeBSD.ORG Thu Aug 8 08:50:00 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E4A19FC1 for ; Thu, 8 Aug 2013 08:50:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ABCF82049 for ; Thu, 8 Aug 2013 08:50:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r788o0Ai029642 for ; Thu, 8 Aug 2013 08:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r788o0X1029641; Thu, 8 Aug 2013 08:50:00 GMT (envelope-from gnats) Resent-Date: Thu, 8 Aug 2013 08:50:00 GMT Resent-Message-Id: <201308080850.r788o0X1029641@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alexander Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A09E9F6A for ; Thu, 8 Aug 2013 08:47:42 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8EE162FFE for ; Thu, 8 Aug 2013 08:47:42 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r788lfbj043715 for ; Thu, 8 Aug 2013 08:47:42 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r788lfgf043714; Thu, 8 Aug 2013 08:47:41 GMT (envelope-from nobody) Message-Id: <201308080847.r788lfgf043714@oldred.freebsd.org> Date: Thu, 8 Aug 2013 08:47:41 GMT From: Alexander To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: misc/181135: sys/dev/netmap patch for Linux compatibility X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Aug 2013 08:50:01 -0000 >Number: 181135 >Category: misc >Synopsis: sys/dev/netmap patch for Linux compatibility >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Aug 08 08:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Alexander >Release: >Organization: www.billing.ru >Environment: >Description: Linux contain more precise way to locate lock free version of "ioctl" function. Current implementation is based on kernel version, and does not detect proper "ioctl" version on old kernels (RedHat 6.3, kernel 2.6.32). Patch is attached. >How-To-Repeat: >Fix: Patch attached with submission follows: --- netmap/sys/dev/netmap/netmap.c 2013-08-07 13:17:25.000000000 +0400 +++ netmap.ioctl/sys/dev/netmap/netmap.c 2013-08-08 12:39:05.939206484 +0400 @@ -2027,7 +2027,7 @@ } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) // XXX was 38 +#if !defined(HAVE_UNLOCKED_IOCTL) #define LIN_IOCTL_NAME .ioctl int linux_netmap_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long data /* arg */) >Release-Note: >Audit-Trail: >Unformatted: