Linux 4.4.225
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.4.225 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/networking/l2tp.txt | 8 Makefile | 2 arch/arm/include/asm/futex.h | 9 drivers/hid/hid-ids.h | 1 drivers/hid/hid-multitouch.c | 3 drivers/i2c/i2c-dev.c | 60 +++-- drivers/media/media-device.c | 43 +++- drivers/media/media-devnode.c | 168 +++++++++------- drivers/media/usb/uvc/uvc_driver.c | 2 drivers/misc/mei/client.c | 2 drivers/net/ethernet/intel/igb/igb_main.c | 4 drivers/nvdimm/btt.c | 8 drivers/platform/x86/alienware-wmi.c | 17 - drivers/platform/x86/asus-nb-wmi.c | 24 ++ drivers/staging/iio/accel/sca3000_ring.c | 2 drivers/staging/iio/resolver/ad2s1210.c | 17 + drivers/usb/core/message.c | 4 fs/ceph/caps.c | 1 fs/ext4/xattr.c | 66 +++--- fs/file.c | 2 fs/gfs2/glock.c | 3 include/linux/cpumask.h | 19 + include/linux/net.h | 3 include/linux/padata.h | 13 - include/media/media-device.h | 5 include/media/media-devnode.h | 32 ++- include/net/ipv6.h | 2 include/uapi/linux/if_pppol2tp.h | 13 - include/uapi/linux/l2tp.h | 17 + kernel/padata.c | 88 +++----- lib/cpumask.c | 32 +++ net/ipv6/datagram.c | 4 net/l2tp/l2tp_core.c | 181 +++++------------ net/l2tp/l2tp_core.h | 47 ++-- net/l2tp/l2tp_eth.c | 216 ++++++++++++-------- net/l2tp/l2tp_ip.c | 68 +++--- net/l2tp/l2tp_ip6.c | 82 +++---- net/l2tp/l2tp_netlink.c | 124 +++++++----- net/l2tp/l2tp_ppp.c | 309 +++++++++++++++++------------- net/socket.c | 46 ++++ security/integrity/evm/evm_crypto.c | 2 sound/core/pcm_lib.c | 1 42 files changed, 1015 insertions(+), 735 deletions(-)
Al Viro (1):
fix multiplication overflow in copy_fdtable()
Alan Stern (1):
USB: core: Fix misleading driver bug report
Alexander Usyskin (1):
mei: release me_cl object reference
Asbjørn Sloth Tønnesen (3):
net: l2tp: export debug flags to UAPI
net: l2tp: deprecate PPPOL2TP_MSG_* in favour of L2TP_MSG_*
net: l2tp: ppp: change PPPOL2TP_MSG_* => L2TP_MSG_*
Bob Peterson (1):
Revert "gfs2: Don't demote a glock until its revokes are written"
Brent Lu (1):
ALSA: pcm: fix incorrect hw_base increase
Cao jin (1):
igb: use igb_adapter->io_addr instead of e1000_hw->hw_addr
Christophe JAILLET (1):
iio: sca3000: Remove an erroneous 'get_device()'
Colin Ian King (1):
platform/x86: alienware-wmi: fix kfree on potentially uninitialized pointer
Dan Carpenter (1):
i2c: dev: use after free in detach
Daniel Jordan (2):
padata: initialize pd->cpu with effective cpumask
padata: purge get_cpu and reorder_via_wq from padata_do_serial
Dragos Bogdan (1):
staging: iio: ad2s1210: Fix SPI reading
Erico Nunes (1):
i2c: dev: switch from register_chrdev to cdev API
Greg Kroah-Hartman (1):
Linux 4.4.225
Guillaume Nault (22):
l2tp: lock socket before checking flags in connect()
l2tp: fix racy socket lookup in l2tp_ip and l2tp_ip6 bind()
l2tp: hold session while sending creation notifications
l2tp: take a reference on sessions used in genetlink handlers
l2tp: don't use l2tp_tunnel_find() in l2tp_ip and l2tp_ip6
l2tp: remove useless duplicate session detection in l2tp_netlink
l2tp: remove l2tp_session_find()
l2tp: define parameters of l2tp_session_get*() as "const"
l2tp: define parameters of l2tp_tunnel_find*() as "const"
l2tp: initialise session's refcount before making it reachable
l2tp: hold tunnel while looking up sessions in l2tp_netlink
l2tp: hold tunnel while processing genl delete command
l2tp: hold tunnel while handling genl tunnel updates
l2tp: hold tunnel while handling genl TUNNEL_GET commands
l2tp: hold tunnel used while creating sessions with netlink
l2tp: prevent creation of sessions on terminated tunnels
l2tp: pass tunnel pointer to ->session_create()
l2tp: fix l2tp_eth module loading
l2tp: don't register sessions in l2tp_session_create()
l2tp: initialise l2tp_eth sessions before registering them
l2tp: protect sock pointer of struct pppol2tp_session with RCU
l2tp: initialise PPP sessions before registering them
Hans de Goede (1):
platform/x86: asus-nb-wmi: Do not load on Asus T100TA and T200TA
Herbert Xu (1):
padata: Replace delayed timer with immediate workqueue in padata_reorder
Jason A. Donenfeld (1):
padata: get_next is never NULL
Kevin Hao (1):
i2c: dev: Fix the race between the release of i2c_dev and cdev
Mathias Krause (3):
padata: ensure the reorder timer callback runs on the correct CPU
padata: ensure padata_do_serial() runs on the correct CPU
padata: set cpu_index of unused CPUs to -1
Mauro Carvalho Chehab (2):
media-devnode: fix namespace mess
media-device: dynamically allocate struct media_devnode
Max Kellermann (2):
drivers/media/media-devnode: clear private_data before put_device()
media-devnode: add missing mutex lock in error handler
Michael Kelley (1):
cpumask: Make for_each_cpu_wrap() available on UP as well
Peter Zijlstra (1):
sched/fair, cpumask: Export for_each_cpu_wrap()
R. Parameswaran (3):
New kernel function to get IP overhead on a socket. L2TP:Adjust intf MTU, add underlay L3, L2 hdrs.
l2tp: device MTU setup, tunnel socket needs a lock
Roberto Sassu (1):
evm: Check also if *tfm is an error pointer in init_desc()
Sebastian Reichel (1):
HID: multitouch: add eGalaxTouch P80H84 support
Shuah Khan (3):
media: Fix media_open() to clear filp->private_data in error leg
media: fix use-after-free in cdev_put() when app exits after driver unbind
media: fix media devnode ioctl/syscall and unregister race
Theodore Ts'o (1):
ext4: lock the xattr block before checksuming it
Thomas Gleixner (1):
ARM: futex: Address build warning
Tobias Klauser (1):
padata: Remove unused but set variables
Vishal Verma (1):
libnvdimm/btt: Remove unnecessary code in btt_freelist_init
Wolfram Sang (1):
i2c: dev: don't start function name with 'return'
Wu Bo (1):
ceph: fix double unlock in handle_cap_export()
viresh kumar (1):
i2c-dev: don't get i2c adapter via i2c_dev
Greg Kroah-Hartman
maintainerDocumentation/networking/l2tp.txt +4 -4
@@ -177,10 +177,10 @@ setsockopt on the PPPoX socket to set a debug mask. The following debug mask bits are available: -PPPOL2TP_MSG_DEBUG verbose debug (if compiled in) -PPPOL2TP_MSG_CONTROL userspace - kernel interface -PPPOL2TP_MSG_SEQ sequence numbers handling -PPPOL2TP_MSG_DATA data packets +L2TP_MSG_DEBUG verbose debug (if compiled in) +L2TP_MSG_CONTROL userspace - kernel interface +L2TP_MSG_SEQ sequence numbers handling +L2TP_MSG_DATA data packets If enabled, files under a l2tp debugfs directory can be used to dump kernel state about L2TP tunnels and sessions. To access it, the
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 224 +SUBLEVEL = 225 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arm/include/asm/futex.h +7 -2
@@ -162,8 +162,13 @@ arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr)preempt_enable ();#endif -if (!ret) - *oval = oldval; +/* +* Store unconditionally. If ret != 0 the extra store is the least +* of the worries but GCC cannot figure out that __futex_atomic_op() +* is either setting ret to -EFAULT or storing the old value in +* oldval which results in a uninitialized warning at the call site. +*/ + *oval = oldval;return ret; }
drivers/hid/hid-ids.h +1 -0
@@ -319,6 +319,7 @@#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349 0x7349#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_C002 0xc002#define USB_VENDOR_ID_ELAN 0x04f3
drivers/hid/hid-multitouch.c +3 -0
@@ -1300,6 +1300,9 @@ static const struct hid_device_id mt_devices[] = { { .driver_data = MT_CLS_EGALAX_SERIAL,MT_USB_DEVICE (USB_VENDOR_ID_DWAV , USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) }, + { .driver_data = MT_CLS_EGALAX, +MT_USB_DEVICE (USB_VENDOR_ID_DWAV , + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_C002) }, /* Elitegroup panel */ { .driver_data = MT_CLS_SERIAL,
drivers/i2c/i2c-dev.c +35 -25
132 lines not on this page · raw message
drivers/media/media-device.c +31 -12
92 lines not on this page · raw message
drivers/media/media-devnode.c +97 -71
318 lines not on this page · raw message
drivers/media/usb/uvc/uvc_driver.c +1 -1
@@ -1800,7 +1800,7 @@ static void uvc_delete(struct uvc_device *dev)if (dev->vdev.dev)v4l2_device_unregister (&dev->vdev);#ifdef CONFIG_MEDIA_CONTROLLER -if (media_devnode_is_registered (&dev->mdev.devnode)) +if (media_devnode_is_registered (dev->mdev.devnode))media_device_unregister (&dev->mdev);#endif
drivers/misc/mei/client.c +2 -0
@@ -276,6 +276,7 @@ void mei_me_cl_rm_by_uuid(struct mei_device *dev, const uuid_le *uuid)down_write (&dev->me_clients_rwsem); me_cl =__mei_me_cl_by_uuid (dev, uuid);__mei_me_cl_del (dev, me_cl); +mei_me_cl_put (me_cl);up_write (&dev->me_clients_rwsem); }
@@ -297,6 +298,7 @@ void mei_me_cl_rm_by_uuid_id(struct mei_device *dev, const uuid_le *uuid, u8 id)down_write (&dev->me_clients_rwsem); me_cl =__mei_me_cl_by_uuid_id (dev, uuid, id);__mei_me_cl_del (dev, me_cl); +mei_me_cl_put (me_cl);up_write (&dev->me_clients_rwsem); }
drivers/net/ethernet/intel/igb/igb_main.c +2 -2
@@ -3296,7 +3296,7 @@ void igb_configure_tx_ring(struct igb_adapter *adapter, tdba & 0x00000000ffffffffULL);wr32 (E1000_TDBAH (reg_idx), tdba >>32 ); - ring->tail = hw->hw_addr +E1000_TDT (reg_idx); + ring->tail = adapter->io_addr +E1000_TDT (reg_idx);wr32 (E1000_TDH (reg_idx),0 );writel (0 , ring->tail);
@@ -3652,7 +3652,7 @@ void igb_configure_rx_ring(struct igb_adapter *adapter, ring->count * sizeof(union e1000_adv_rx_desc));/* initialize head and tail */ - ring->tail = hw->hw_addr +E1000_RDT (reg_idx); + ring->tail = adapter->io_addr +E1000_RDT (reg_idx);wr32 (E1000_RDH (reg_idx),0 );writel (0 , ring->tail);
drivers/nvdimm/btt.c +2 -6
@@ -443,9 +443,9 @@ static int btt_log_init(struct arena_info *arena)static int btt_freelist_init (struct arena_info *arena) { -int old, new, ret; +int new, ret;u32 i, map_entry; -struct log_entry log_new, log_old; +struct log_entry log_new; arena->freelist =kcalloc (arena->nfree,sizeof (struct free_entry ),GFP_KERNEL );
@@ -453,10 +453,6 @@ static int btt_freelist_init(struct arena_info *arena)return -ENOMEM ;for (i =0 ; i < arena->nfree; i++) { - old =btt_log_read (arena, i, &log_old,LOG_OLD_ENT ); -if (old <0 ) -return old; - new =btt_log_read (arena, i, &log_new,LOG_NEW_ENT );if (new <0 )return new;
drivers/platform/x86/alienware-wmi.c +8 -9
@@ -449,23 +449,22 @@ static acpi_status alienware_hdmi_command(struct hdmi_args *in_args, input.length = (acpi_size )sizeof (*in_args); input.pointer = in_args; -if (out_data !=NULL ) { +if (out_data) { output.length =ACPI_ALLOCATE_BUFFER ; output.pointer =NULL ; status =wmi_evaluate_method (WMAX_CONTROL_GUID ,1 , command, &input, &output); - }else +if (ACPI_SUCCESS (status)) { + obj = (union acpi_object *)output.pointer; +if (obj && obj->type ==ACPI_TYPE_INTEGER ) + *out_data = (u32 )obj->integer.value; + } +kfree (output.pointer); + }else { status =wmi_evaluate_method (WMAX_CONTROL_GUID ,1 , command, &input,NULL ); - -if (ACPI_SUCCESS (status) && out_data !=NULL ) { - obj = (union acpi_object *)output.pointer; -if (obj && obj->type ==ACPI_TYPE_INTEGER ) - *out_data = (u32 ) obj->integer.value; } -kfree (output.pointer);return status; - } static ssize_t show_hdmi_cable(struct device *dev,
drivers/platform/x86/asus-nb-wmi.c +24 -0
@@ -551,9 +551,33 @@ static struct asus_wmi_driver asus_nb_wmi_driver = { .detect_quirks = asus_nb_wmi_quirks, }; +static const struct dmi_system_id asus_nb_wmi_blacklist[]__initconst = { + { +/* +* asus-nb-wm adds no functionality. The T100TA has a detachable +* USB kbd, so no hotkeys and it has no WMI rfkill; and loading +* asus-nb-wm causes the camera LED to turn and _stay_ on. +*/ + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), +DMI_EXACT_MATCH (DMI_PRODUCT_NAME ,"T100TA" ), + }, + }, + { +/* The Asus T200TA has the same issue as the T100TA */ + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), +DMI_EXACT_MATCH (DMI_PRODUCT_NAME ,"T200TA" ), + }, + }, + {}/* Terminating entry */ +};static int __init asus_nb_wmi_init (void ) { +if (dmi_check_system (asus_nb_wmi_blacklist)) +return -ENODEV ; +return asus_wmi_register_driver (&asus_nb_wmi_driver); }
drivers/staging/iio/accel/sca3000_ring.c +1 -1
@@ -56,7 +56,7 @@ static int sca3000_read_data(struct sca3000_state *st, st->tx[0 ] =SCA3000_READ_REG (reg_address_high); ret =spi_sync_transfer (st->us, xfer,ARRAY_SIZE (xfer));if (ret) { -dev_err (get_device (&st->us->dev),"problem reading register" ); +dev_err (&st->us->dev,"problem reading register" ); goto error_free_rx; }
drivers/staging/iio/resolver/ad2s1210.c +12 -5
@@ -125,17 +125,24 @@ static int ad2s1210_config_write(struct ad2s1210_state *st, u8 data)static int ad2s1210_config_read (struct ad2s1210_state *st,unsigned char address) { -struct spi_transfer xfer = { - .len =2 , - .rx_buf = st->rx, - .tx_buf = st->tx, +struct spi_transfer xfers[] = { + { + .len =1 , + .rx_buf = &st->rx[0 ], + .tx_buf = &st->tx[0 ], + .cs_change =1 , + }, { + .len =1 , + .rx_buf = &st->rx[1 ], + .tx_buf = &st->tx[1 ], + }, };int ret =0 ;ad2s1210_set_mode (MOD_CONFIG , st); st->tx[0 ] = address |AD2S1210_MSB_IS_HIGH ; st->tx[1 ] =AD2S1210_REG_FAULT ; - ret =spi_sync_transfer (st->sdev, &xfer,1 ); + ret =spi_sync_transfer (st->sdev, xfers,2 );if (ret <0 )return ret; st->old_data = true;
drivers/usb/core/message.c +2 -2
@@ -1080,11 +1080,11 @@ void usb_disable_endpoint(struct usb_device *dev, unsigned int epaddr,if (usb_endpoint_out (epaddr)) { ep = dev->ep_out[epnum]; -if (reset_hardware) +if (reset_hardware && epnum !=0 ) dev->ep_out[epnum] =NULL ; }else { ep = dev->ep_in[epnum]; -if (reset_hardware) +if (reset_hardware && epnum !=0 ) dev->ep_in[epnum] =NULL ; }if (ep) {
fs/ceph/caps.c +1 -0
@@ -3293,6 +3293,7 @@ retry:WARN_ON (1 ); tsession =NULL ; target =-1 ; +mutex_lock (&session->s_mutex); } goto retry;
fs/ext4/xattr.c +32 -34
127 lines not on this page · raw message
fs/file.c +1 -1
@@ -88,7 +88,7 @@ static void copy_fd_bitmaps(struct fdtable *nfdt, struct fdtable *ofdt,*/ static void copy_fdtable (struct fdtable *nfdt,struct fdtable *ofdt) { -unsigned int cpy, set; +size_t cpy, set;BUG_ON (nfdt->max_fds < ofdt->max_fds);
fs/gfs2/glock.c +0 -3
@@ -541,9 +541,6 @@ __acquires(&gl->gl_lockref.lock) goto out_unlock;if (nonblock) goto out_sched; -smp_mb (); -if (atomic_read (&gl->gl_revokes) !=0 ) - goto out_sched;set_bit (GLF_DEMOTE_IN_PROGRESS , &gl->gl_flags);GLOCK_BUG_ON (gl, gl->gl_demote_state ==LM_ST_EXCLUSIVE ); gl->gl_target = gl->gl_demote_state;
include/linux/cpumask.h +19 -0
@@ -160,6 +160,8 @@ static inline unsigned int cpumask_local_spread(unsigned int i, int node) for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)#define for_each_cpu_not (cpu, mask) \ for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) +#define for_each_cpu_wrap (cpu, mask, start) \ + for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)(start))#define for_each_cpu_and (cpu, mask, and) \ for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)and)#else
@@ -232,6 +234,23 @@ unsigned int cpumask_local_spread(unsigned int i, int node); (cpu) =cpumask_next_zero ((cpu), (mask)), \ (cpu) < nr_cpu_ids;) +extern int cpumask_next_wrap (int n,const struct cpumask *mask,int start,bool wrap); + +/** +* for_each_cpu_wrap - iterate over every cpu in a mask, starting at a specified location +* @cpu: the (optionally unsigned) integer iterator +* @mask: the cpumask poiter +* @start: the start location +* +* The implementation does not assume any bit in @mask is set (including @start). +* +* After the loop, cpu is >= nr_cpu_ids. +*/ +#define for_each_cpu_wrap (cpu, mask, start) \ + for ((cpu) = cpumask_next_wrap((start)-1, (mask), (start), false); \ + (cpu) < nr_cpumask_bits; \ + (cpu) = cpumask_next_wrap((cpu), (mask), (start), true)) +/** * for_each_cpu_and - iterate over every cpu in both masks * @cpu: the (optionally unsigned) integer iterator
include/linux/net.h +3 -0
@@ -291,6 +291,9 @@ int kernel_sendpage(struct socket *sock, struct page *page, int offset,int kernel_sock_ioctl (struct socket *sock,int cmd,unsigned long arg);int kernel_sock_shutdown (struct socket *sock,enum sock_shutdown_cmd how); +/* Routine returns the IP overhead imposed by a (caller-protected) socket. */ +u32 kernel_sock_ip_overhead (struct sock *sk); +#define MODULE_ALIAS_NETPROTO (proto) \ MODULE_ALIAS("net-pf-" __stringify(proto))
include/linux/padata.h +6 -7
@@ -24,7 +24,6 @@#include <linux/workqueue.h> #include <linux/spinlock.h> #include <linux/list.h> -#include <linux/timer.h> #include <linux/notifier.h> #include <linux/kobject.h>
@@ -37,6 +36,7 @@* @list: List entry, to attach to the padata lists. * @pd: Pointer to the internal control structure. * @cb_cpu: Callback cpu for serializatioon. +* @cpu: Cpu for parallelization. * @seq_nr: Sequence number of the parallelized data object. * @info: Used to pass information from the parallel to the serial function. * @parallel: Parallel execution function.
@@ -46,6 +46,7 @@ struct padata_priv {struct list_head list;struct parallel_data *pd;int cb_cpu; +int cpu;int info;void (*parallel)(struct padata_priv *padata);void (*serial)(struct padata_priv *padata);
@@ -83,7 +84,6 @@ struct padata_serial_queue {* @serial: List to wait for serialization after reordering. * @pwork: work struct for parallelization. * @swork: work struct for serialization. -* @pd: Backpointer to the internal control structure. * @work: work struct for parallelization. * @num_obj: Number of objects that are processed by this cpu. * @cpu_index: Index of the cpu.
@@ -91,7 +91,6 @@ struct padata_serial_queue {struct padata_parallel_queue {struct padata_list parallel;struct padata_list reorder; -struct parallel_data *pd;struct work_struct work;atomic_t num_obj;int cpu_index;
@@ -118,10 +117,10 @@ struct padata_cpumask {* @reorder_objects: Number of objects waiting in the reorder queues. * @refcnt: Number of objects holding a reference on this parallel_data. * @max_seq_nr: Maximal used sequence number. +* @cpu: Next CPU to be processed. * @cpumask: The cpumasks in use for parallel and serial workers. +* @reorder_work: work struct for reordering. * @lock: Reorder lock. -* @processed: Number of already processed objects. -* @timer: Reorder timer. */ struct parallel_data {struct padata_instance *pinst;
@@ -130,10 +129,10 @@ struct parallel_data {atomic_t reorder_objects;atomic_t refcnt;atomic_t seq_nr; +int cpu;struct padata_cpumask cpumask; +struct work_struct reorder_work;spinlock_t lock____cacheline_aligned ; -unsigned int processed; -struct timer_list timer; };/**
include/media/media-device.h +1 -4
@@ -60,7 +60,7 @@ struct device;struct media_device {/* dev->driver_data points to this struct. */ struct device *dev; -struct media_devnode devnode; +struct media_devnode *devnode;char model[32 ];char serial[40 ];
@@ -84,9 +84,6 @@ struct media_device {#define MEDIA_DEV_NOTIFY_PRE_LINK_CH 0#define MEDIA_DEV_NOTIFY_POST_LINK_CH 1 -/* media_devnode to media_device */ -#define to_media_device (node) container_of(node, struct media_device, devnode) -int __must_check __media_device_register (struct media_device *mdev,struct module *owner);#define media_device_register (mdev) __media_device_register(mdev, THIS_MODULE)
include/media/media-devnode.h +27 -5
@@ -33,6 +33,8 @@#include <linux/device.h> #include <linux/cdev.h> +struct media_device ; +/* * Flag to mark the media_devnode struct as registered. Drivers must not touch * this flag directly, it will be set and cleared by media_devnode_register and
@@ -67,6 +69,8 @@ struct media_file_operations {* before registering the node. */ struct media_devnode { +struct media_device *media_dev; +/* device ops */ const struct media_file_operations *fops;
@@ -80,24 +84,42 @@ struct media_devnode {unsigned long flags;/* Use bitops to access flags */ /* callbacks */ - void (*release)(struct media_devnode *mdev); + void (*release)(struct media_devnode *devnode); };/* dev to media_devnode */ #define to_media_devnode (cd) container_of(cd, struct media_devnode, dev) -int __must_check media_devnode_register (struct media_devnode *mdev, +int __must_check media_devnode_register (struct media_device *mdev, +struct media_devnode *devnode,struct module *owner); -void media_devnode_unregister (struct media_devnode *mdev); + +/** +* media_devnode_unregister_prepare - clear the media device node register bit +* @devnode: the device node to prepare for unregister +* +* This clears the passed device register bit. Future open calls will be met +* with errors. Should be called before media_devnode_unregister() to avoid +* races with unregister and device file open calls. +* +* This function can safely be called if the device node has never been +* registered or has already been unregistered. +*/ +void media_devnode_unregister_prepare (struct media_devnode *devnode); + +void media_devnode_unregister (struct media_devnode *devnode);static inline struct media_devnode *media_devnode_data (struct file *filp) {return filp->private_data; } -static inline int media_devnode_is_registered (struct media_devnode *mdev) +static inline int media_devnode_is_registered (struct media_devnode *devnode) { -return test_bit (MEDIA_FLAG_REGISTERED , &mdev->flags); +if (!devnode) +return false; + +return test_bit (MEDIA_FLAG_REGISTERED , &devnode->flags); }#endif /* _MEDIA_DEVNODE_H */
include/net/ipv6.h +2 -0
@@ -915,6 +915,8 @@ int compat_ipv6_setsockopt(struct sock *sk, int level, int optname,int compat_ipv6_getsockopt (struct sock *sk,int level,int optname,char __user *optval,int __user *optlen); +int __ip6_datagram_connect (struct sock *sk,struct sockaddr *addr, +int addr_len);int ip6_datagram_connect (struct sock *sk,struct sockaddr *addr,int addr_len);int ip6_datagram_connect_v6_only (struct sock *sk,struct sockaddr *addr,int addr_len);
include/uapi/linux/if_pppol2tp.h +6 -7
@@ -17,6 +17,7 @@#include <linux/types.h> +#include <linux/l2tp.h> /* Structure used to connect() the socket to a particular tunnel UDP * socket over IPv4.
@@ -89,14 +90,12 @@ enum { PPPOL2TP_SO_REORDERTO = 5, }; -/* Debug message categories for the DEBUG socket option */ +/* Debug message categories for the DEBUG socket option (deprecated) */ enum { -PPPOL2TP_MSG_DEBUG = (1 <<0 ),/* verbose debug (if -* compiled in) */ -PPPOL2TP_MSG_CONTROL = (1 <<1 ),/* userspace - kernel -* interface */ -PPPOL2TP_MSG_SEQ = (1 <<2 ),/* sequence numbers */ -PPPOL2TP_MSG_DATA = (1 <<3 ),/* data packets */ +PPPOL2TP_MSG_DEBUG =L2TP_MSG_DEBUG , +PPPOL2TP_MSG_CONTROL =L2TP_MSG_CONTROL , +PPPOL2TP_MSG_SEQ =L2TP_MSG_SEQ , +PPPOL2TP_MSG_DATA =L2TP_MSG_DATA , };
include/uapi/linux/l2tp.h +16 -1
@@ -108,7 +108,7 @@ enum {L2TP_ATTR_VLAN_ID ,/* u16 */ L2TP_ATTR_COOKIE ,/* 0, 4 or 8 bytes */ L2TP_ATTR_PEER_COOKIE ,/* 0, 4 or 8 bytes */ -L2TP_ATTR_DEBUG ,/* u32 */ +L2TP_ATTR_DEBUG ,/* u32, enum l2tp_debug_flags */ L2TP_ATTR_RECV_SEQ ,/* u8 */ L2TP_ATTR_SEND_SEQ ,/* u8 */ L2TP_ATTR_LNS_MODE, /* u8 */
@@ -173,6 +173,21 @@ enum l2tp_seqmode { L2TP_SEQ_ALL = 2, }; +/** +* enum l2tp_debug_flags - debug message categories for L2TP tunnels/sessions +* +* @L2TP_MSG_DEBUG: verbose debug (if compiled in) +* @L2TP_MSG_CONTROL: userspace - kernel interface +* @L2TP_MSG_SEQ: sequence numbers +* @L2TP_MSG_DATA: data packets +*/ +enum l2tp_debug_flags { +L2TP_MSG_DEBUG = (1 <<0 ), +L2TP_MSG_CONTROL = (1 <<1 ), +L2TP_MSG_SEQ = (1 <<2 ), +L2TP_MSG_DATA = (1 <<3 ), +}; +/* * NETLINK_GENERIC related info */
kernel/padata.c +34 -54
198 lines not on this page · raw message
lib/cpumask.c +32 -0
@@ -42,6 +42,38 @@ int cpumask_any_but(const struct cpumask *mask, unsigned int cpu)return i; } +/** +* cpumask_next_wrap - helper to implement for_each_cpu_wrap +* @n: the cpu prior to the place to search +* @mask: the cpumask pointer +* @start: the start point of the iteration +* @wrap: assume @n crossing @start terminates the iteration +* +* Returns >= nr_cpu_ids on completion +* +* Note: the @wrap argument is required for the start condition when +* we cannot assume @start is set in @mask. +*/ +int cpumask_next_wrap (int n,const struct cpumask *mask,int start,bool wrap) +{ +int next; + +again: + next =cpumask_next (n, mask); + +if (wrap && n < start && next >= start) { +return nr_cpumask_bits; + + }else if (next >= nr_cpumask_bits) { + wrap = true; + n =-1 ; + goto again; + } + +return next; +} +EXPORT_SYMBOL (cpumask_next_wrap); +/* These are not inline because of header tangles. */ #ifdef CONFIG_CPUMASK_OFFSTACK /**
net/ipv6/datagram.c +3 -1
@@ -40,7 +40,8 @@ static bool ipv6_mapped_addr_any(const struct in6_addr *a)return ipv6_addr_v4mapped (a) && (a->s6_addr32[3 ] ==0 ); } -static int __ip6_datagram_connect (struct sock *sk,struct sockaddr *uaddr,int addr_len) +int __ip6_datagram_connect (struct sock *sk,struct sockaddr *uaddr, +int addr_len) {struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;struct inet_sock *inet =inet_sk (sk);
@@ -213,6 +214,7 @@ out:fl6_sock_release (flowlabel);return err; } +EXPORT_SYMBOL_GPL (__ip6_datagram_connect);int ip6_datagram_connect (struct sock *sk,struct sockaddr *uaddr,int addr_len) {
net/l2tp/l2tp_core.c +60 -121
325 lines not on this page · raw message
net/l2tp/l2tp_core.h +29 -18
87 lines not on this page · raw message
net/l2tp/l2tp_eth.c +133 -83
347 lines not on this page · raw message
net/l2tp/l2tp_ip.c +32 -36
129 lines not on this page · raw message
net/l2tp/l2tp_ip6.c +39 -43
164 lines not on this page · raw message
net/l2tp/l2tp_netlink.c +73 -51
294 lines not on this page · raw message
net/l2tp/l2tp_ppp.c +185 -124
242 lines not on this page · raw message
net/socket.c +46 -0
46 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.