- Oct 16, 2021
-
-
Jean Sacren authored
The last argument of device_create() call should be a template string. The tap_name variable should be the argument to the string, but not the argument of the call itself. We should add the template string and turn tap_name into its argument. Signed-off-by:
Jean Sacren <sakiwit@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- May 21, 2019
-
-
Thomas Gleixner authored
Add SPDX license identifiers to all files which: - Have no license information of any form - Have MODULE_LICENCE("GPL*") inside which was used in the initial scan/conversion to ignore the file These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- Oct 28, 2017
-
-
Girish Moodalbail authored
The commit 9a393b5d ("tap: tap as an independent module") created a separate tap module that implements tap functionality and exports interfaces that will be used by macvtap and ipvtap modules to create create respective tap devices. However, that patch introduced a regression wherein the modules macvtap and ipvtap can be removed (through modprobe -r) while there are applications using the respective /dev/tapX devices. These applications cause kernel to hold reference to /dev/tapX through 'struct cdev macvtap_cdev' and 'struct cdev ipvtap_dev' defined in macvtap and ipvtap modules respectively. So, when the application is later closed the kernel panics because we are referencing KVA that is present in the unloaded modules. ----------8<------- Example ----------8<---------- $ sudo ip li add name mv0 link enp7s0 type macvtap $ sudo ip li show mv0 |grep mv0| awk -e '{print $1 $2}' 14:mv0@enp7s0: $ cat /dev/tap14 & $ lsmod |egrep -i 'tap|vlan' macvtap 16384 0 macvlan 24576 1 macvtap tap 24576 3 macvtap $ sudo modprobe -r macvtap $ fg cat /dev/tap14 ^C <...system panics...> BUG: unable to handle kernel paging request at ffffffffa038c500 IP: cdev_put+0xf/0x30 ----------8<-----------------8<---------- The fix is to set cdev.owner to the module that creates the tap device (either macvtap or ipvtap). With this set, the operations (in fs/char_dev.c) on char device holds and releases the module through cdev_get() and cdev_put() and will not allow the module to unload prematurely. Fixes: 9a393b5d (tap: tap as an independent module) Signed-off-by:
Girish Moodalbail <girish.moodalbail@oracle.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Oct 05, 2017
-
-
David Ahern authored
Add extack arg to netdev_upper_dev_link and netdev_master_upper_dev_link Signed-off-by:
David Ahern <dsahern@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jul 17, 2017
-
-
David S. Miller authored
It is going away. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jun 27, 2017
-
-
Matthias Schiffer authored
Add support for extended error reporting. Signed-off-by:
Matthias Schiffer <mschiffer@universe-factory.net> Acked-by:
David Ahern <dsahern@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 02, 2017
-
-
Ingo Molnar authored
sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> Fix up affected files that include this signal functionality via sched.h. Acked-by:
Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by:
Ingo Molnar <mingo@kernel.org>
-
- Feb 12, 2017
-
-
Sainath Grandhi authored
This patch makes tap a separate module for other types of virtual interfaces, for example, ipvlan to use. Signed-off-by:
Sainath Grandhi <sainath.grandhi@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sainath Grandhi authored
Extending tap APIs get/free_minor and create/destroy_cdev to handle more than one type of virtual interface. Signed-off-by:
Sainath Grandhi <sainath.grandhi@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sainath Grandhi authored
macvlan object is re-structured to hold tap related elements in a separate entity, tap_dev. Upon NETDEV_REGISTER device_event, tap_dev is registered with idr and fetched again on tap_open. Few of the tap functions are modified to accepted tap_dev as argument. tap_dev object includes callbacks to be used by underlying virtual interface to take care of tx and rx accounting. Signed-off-by:
Sainath Grandhi <sainath.grandhi@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sainath Grandhi authored
This patch provides tap device create/destroy APIs in tap.c. Signed-off-by:
Sainath Grandhi <sainath.grandhi@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sainath Grandhi authored
Renaming tap related APIs, data structures and macros in tap.c from macvtap_.* to tap_.* Signed-off-by:
Sainath Grandhi <sainath.grandhi@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sainath Grandhi authored
macvtap module has code for tap/queue management and link management. This patch splits the code into macvtap_main.c for link management and tap.c for tap/queue management. Functionality in tap.c can be re-used for implementing tap on other virtual interfaces. Signed-off-by:
Sainath Grandhi <sainath.grandhi@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-