Linux 4.15.6
Greg KH
maintainerI'm announcing the release of the 4.15.6 kernel.
All users of the 4.15 kernel series must upgrade.
The updated 4.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.15.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/common/bL_switcher_dummy_if.c | 4 arch/arm64/boot/dts/mediatek/mt8173.dtsi | 2 arch/x86/crypto/twofish-x86_64-asm_64-3way.S | 112 ++++++++++++------------ arch/x86/kvm/x86.c | 6 + block/blk-map.c | 4 drivers/android/binder.c | 29 ++++-- drivers/crypto/s5p-sss.c | 12 +- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 12 ++ drivers/misc/mei/hw-me-regs.h | 5 + drivers/misc/mei/pci-me.c | 5 + drivers/net/tun.c | 16 +-- drivers/soc/qcom/rmtfs_mem.c | 4 drivers/staging/android/ashmem.c | 19 ++-- drivers/staging/android/ion/ion-ioctl.c | 4 drivers/staging/android/ion/ion_system_heap.c | 2 drivers/staging/fsl-mc/bus/Kconfig | 2 drivers/staging/iio/adc/ad7192.c | 27 ++++- drivers/staging/iio/impedance-analyzer/ad5933.c | 4 drivers/usb/host/xhci-debugfs.c | 4 drivers/usb/host/xhci.c | 10 -- drivers/usb/usbip/stub_dev.c | 3 drivers/usb/usbip/vhci_hcd.c | 2 drivers/video/fbdev/mmp/core.c | 5 + include/linux/ptr_ring.h | 15 ++- kernel/kcov.c | 4 mm/vmalloc.c | 10 +- net/core/dev.c | 2 net/core/gen_estimator.c | 4 net/decnet/af_decnet.c | 62 +++++++------ net/ipv4/ip_sockglue.c | 14 --- net/ipv4/netfilter/ipt_CLUSTERIP.c | 16 ++- net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 6 + net/ipv6/ipv6_sockglue.c | 17 +-- net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 18 ++- net/netfilter/x_tables.c | 9 + net/netfilter/xt_RATEEST.c | 22 +++- net/netfilter/xt_cgroup.c | 1 net/rds/connection.c | 3 net/rds/rds.h | 6 - net/rds/tcp.c | 13 +- net/rds/tcp.h | 1 security/selinux/ss/services.c | 21 ++-- sound/soc/ux500/mop500.c | 4 sound/soc/ux500/ux500_pcm.c | 5 + 45 files changed, 347 insertions(+), 201 deletions(-)
Alexander Usyskin (1):
mei: me: add cannon point device ids
Alexandru Ardelean (2):
staging: iio: adc: ad7192: fix external frequency setting
staging: iio: ad5933: switch buffer mode to software
Andrey Konovalov (1):
media: pvrusb2: properly check endpoint types
Arnd Bergmann (5):
ASoC: ux500: add MODULE_LICENSE tag
video: fbdev/mmp: add MODULE_LICENSE
ARM: 8743/1: bL_switcher: add MODULE_LICENSE tag
arm64: dts: add #cooling-cells to CPU nodes
staging: fsl-mc: fix build testing on x86
Ben Hutchings (1):
staging: android: ashmem: Fix a race condition in pin ioctls
Cong Wang (2):
netfilter: xt_cgroup: initialize info->priv in cgroup_mt_check_v1()
netfilter: xt_RATEEST: acquire xt_rateest_mutex for hash insert
Dmitry Vyukov (3):
kcov: detect double association with a single task
netfilter: x_tables: fix int overflow in xt_alloc_table_info()
netfilter: ipt_CLUSTERIP: fix out-of-bounds accesses in clusterip_tg_check()
Douglas Gilbert (1):
blk_rq_map_user_iov: fix error override
Eric Biggers (2):
crypto: x86/twofish-3way - Fix %rbp usage
binder: check for binder_thread allocation failure in binder_poll()
Eric Dumazet (3):
tun: fix tun_napi_alloc_frags() frag allocator
netfilter: x_tables: avoid out-of-bounds reads in xt_request_find_{match|target}
net_sched: gen_estimator: fix lockdep splat
Greg Kroah-Hartman (1):
Linux 4.15.6
Jason Wang (2):
ptr_ring: fail early if queue occupies more than KMALLOC_MAX_SIZE
ptr_ring: try vmalloc() when kmalloc() fails
Jesse Chan (1):
soc: qcom: rmtfs_mem: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE
Kamil Konieczny (1):
crypto: s5p-sss - Fix kernel Oops in AES-ECB mode
Laura Abbott (2):
staging: android: ion: Add __GFP_NOWARN for system contig heap
staging: android: ion: Switch from WARN to pr_warn
Martijn Coenen (1):
ANDROID: binder: synchronize_rcu() when using POLLFREE.
Michal Hocko (1):
vmalloc: fix __GFP_HIGHMEM usage for vmalloc_32 on 32b systems
Paolo Abeni (2):
netfilter: on sockopt() acquire sock lock only in the required scope
dn_getsockoptdecnet: move nf_{get/set}sockopt outside sock lock
Paul Moore (2):
selinux: ensure the context is NUL terminated in security_context_to_sid_core()
selinux: skip bounded transition processing if the policy isn't loaded
Shuah Khan (1):
usbip: keep usbip_device sockfd state in sync with tcp_socket
Sowmini Varadhan (2):
rds: tcp: correctly sequence cleanup on netns deletion.
rds: tcp: atomically purge entries from rds_tcp_conn_list during netns delete
Todd Kjos (2):
ANDROID: binder: remove WARN() for redundant txn error
binder: replace "%p" with "%pK"
Tomas Winkler (1):
mei: me: add cannon point device ids for 4th device
Wanpeng Li (1):
KVM: x86: fix escape of guest dr6 to the host
Willem de Bruijn (1):
net: avoid skb_warn_bad_offload on IS_ERR
Zhengjun Xing (4):
xhci: Fix NULL pointer in xhci debugfs
xhci: Fix xhci debugfs devices node disappearance after hibernation
xhci: xhci debugfs device nodes weren't removed after device plugged out
xhci: fix xhci debugfs errors in xhci_stop
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 15 -SUBLEVEL = 5 +SUBLEVEL = 6 EXTRAVERSION = NAME = Fearless Coyote
arch/arm/common/bL_switcher_dummy_if.c +4 -0
@@ -57,3 +57,7 @@ static struct miscdevice bL_switcher_device = { &bL_switcher_fops };module_misc_device (bL_switcher_device); + +MODULE_AUTHOR ("Nicolas Pitre <[email protected]>" ); +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("big.LITTLE switcher dummy user interface" );
arch/arm64/boot/dts/mediatek/mt8173.dtsi +2 -0
@@ -81,6 +81,7 @@ reg = <0x000>; enable-method = "psci"; cpu-idle-states = <&CPU_SLEEP_0>; + #cooling-cells = <2>; }; cpu1: cpu@1 {
@@ -97,6 +98,7 @@ reg = <0x100>; enable-method = "psci"; cpu-idle-states = <&CPU_SLEEP_0>; + #cooling-cells = <2>; }; cpu3: cpu@101 {
arch/x86/crypto/twofish-x86_64-asm_64-3way.S +60 -52
208 lines not on this page · raw message
arch/x86/kvm/x86.c +6 -0
@@ -2939,6 +2939,12 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)pagefault_enable (); kvm_x86_ops->vcpu_put (vcpu); vcpu->arch.last_host_tsc =rdtsc (); +/* +* If userspace has set any breakpoints or watchpoints, dr6 is restored +* on every vmexit, but if not, we might have a stale dr6 from the +* guest. do_debug expects dr6 to be cleared after it runs, do the same. +*/ +set_debugreg (0 ,6 ); } static int kvm_vcpu_ioctl_get_lapic(struct kvm_vcpu *vcpu,
block/blk-map.c +2 -2
@@ -119,7 +119,7 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,unsigned long align = q->dma_pad_mask |queue_dma_alignment (q);struct bio *bio =NULL ;struct iov_iter i; -int ret; +int ret = -EINVAL ;if (!iter_is_iovec (iter)) goto fail;
@@ -148,7 +148,7 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,__blk_rq_unmap_user (bio); fail: rq->bio =NULL ; -return -EINVAL ; +return ret; }EXPORT_SYMBOL (blk_rq_map_user_iov);
drivers/android/binder.c +23 -6
@@ -1933,8 +1933,14 @@ static void binder_send_failed_reply(struct binder_transaction *t, &target_thread->todo);wake_up_interruptible (&target_thread->wait); }else { -WARN (1 ,"Unexpected reply error: %u\n" , - target_thread->reply_error.cmd); +/* +* Cannot get here for normal operation, but +* we can if multiple synchronous transactions +* are sent without blocking for responses. +* Just ignore the 2nd error in this case. +*/ +pr_warn ("Unexpected reply error: %u\n" , + target_thread->reply_error.cmd); }binder_inner_proc_unlock (target_thread->proc);binder_thread_dec_tmpref (target_thread);
@@ -2135,7 +2141,7 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,int debug_id = buffer->debug_id;binder_debug (BINDER_DEBUG_TRANSACTION , -"%d buffer release %d, size %zd-%zd, failed at %p\n" , +"%d buffer release %d, size %zd-%zd, failed at %pK\n" , proc->pid, buffer->debug_id, buffer->data_size, buffer->offsets_size, failed_at);
@@ -3647,7 +3653,7 @@ static int binder_thread_write(struct binder_proc *proc, } }binder_debug (BINDER_DEBUG_DEAD_BINDER , -"%d:%d BC_DEAD_BINDER_DONE %016llx found %p\n" , +"%d:%d BC_DEAD_BINDER_DONE %016llx found %pK\n" , proc->pid, thread->pid, (u64 )cookie, death);if (death ==NULL ) {
@@ -4316,6 +4322,15 @@ static int binder_thread_release(struct binder_proc *proc,binder_inner_proc_unlock (thread->proc); +/* +* This is needed to avoid races between wake_up_poll() above and +* and ep_remove_waitqueue() called for other reasons (eg the epoll file +* descriptor being closed); ep_remove_waitqueue() holds an RCU read +* lock, so we can be sure it's done after calling synchronize_rcu(). +*/ +if (thread->looper &BINDER_LOOPER_STATE_POLL ) +synchronize_rcu (); +if (send_reply)binder_send_failed_reply (send_reply,BR_DEAD_REPLY );binder_release_work (proc, &thread->todo);
@@ -4331,6 +4346,8 @@ static unsigned int binder_poll(struct file *filp,bool wait_for_proc_work; thread =binder_get_thread (proc); +if (!thread) +return POLLERR ;binder_inner_proc_lock (thread->proc); thread->looper |=BINDER_LOOPER_STATE_POLL ;
@@ -4974,7 +4991,7 @@ static void print_binder_transaction_ilocked(struct seq_file *m,spin_lock (&t->lock); to_proc = t->to_proc; seq_printf(m, - "%s %d: %p from %d:%d to %d:%d code %x flags %x pri %ld r%d", + "%s %d: %pK from %d:%d to %d:%d code %x flags %x pri %ld r%d", prefix, t->debug_id, t, t->from ? t->from->proc->pid : 0, t->from ? t->from->pid : 0,
@@ -4998,7 +5015,7 @@ static void print_binder_transaction_ilocked(struct seq_file *m, }if (buffer->target_node)seq_printf (m," node %d" , buffer->target_node->debug_id); -seq_printf (m," size %zd:%zd data %p\n" , +seq_printf (m," size %zd:%zd data %pK\n" , buffer->data_size, buffer->offsets_size, buffer->data); }
drivers/crypto/s5p-sss.c +9 -3
@@ -1926,15 +1926,21 @@ static void s5p_aes_crypt_start(struct s5p_aes_dev *dev, unsigned long mode)uint32_t aes_control;unsigned long flags;int err; +u8 *iv; aes_control =SSS_AES_KEY_CHANGE_MODE ;if (mode &FLAGS_AES_DECRYPT ) aes_control |=SSS_AES_MODE_DECRYPT ; -if ((mode &FLAGS_AES_MODE_MASK ) ==FLAGS_AES_CBC ) +if ((mode &FLAGS_AES_MODE_MASK ) ==FLAGS_AES_CBC ) { aes_control |=SSS_AES_CHAIN_MODE_CBC ; -else if ((mode &FLAGS_AES_MODE_MASK ) ==FLAGS_AES_CTR ) + iv = req->info; + }else if ((mode &FLAGS_AES_MODE_MASK ) ==FLAGS_AES_CTR ) { aes_control |=SSS_AES_CHAIN_MODE_CTR ; + iv = req->info; + }else { + iv =NULL ;/* AES_ECB */ + }if (dev->ctx->keylen ==AES_KEYSIZE_192 ) aes_control |=SSS_AES_KEY_SIZE_192 ;
@@ -1965,7 +1971,7 @@ static void s5p_aes_crypt_start(struct s5p_aes_dev *dev, unsigned long mode) goto outdata_error;SSS_AES_WRITE (dev,AES_CONTROL , aes_control); -s5p_set_aes (dev, dev->ctx->aes_key, req->info, dev->ctx->keylen); +s5p_set_aes (dev, dev->ctx->aes_key, iv, dev->ctx->keylen);s5p_set_dma_indata (dev, dev->sg_src);s5p_set_dma_outdata (dev, dev->sg_dst);
drivers/media/usb/pvrusb2/pvrusb2-hdw.c +12 -0
@@ -3648,6 +3648,12 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw, hdw); hdw->ctl_write_urb->actual_length =0 ; hdw->ctl_write_pend_flag = !0 ; +if (usb_urb_ep_type_check (hdw->ctl_write_urb)) { +pvr2_trace ( +PVR2_TRACE_ERROR_LEGS , +"Invalid write control endpoint" ); +return -EINVAL ; + } status =usb_submit_urb (hdw->ctl_write_urb,GFP_KERNEL );if (status <0 ) { pvr2_trace(PVR2_TRACE_ERROR_LEGS,
@@ -3672,6 +3678,12 @@ status); hdw); hdw->ctl_read_urb->actual_length =0 ; hdw->ctl_read_pend_flag = !0 ; +if (usb_urb_ep_type_check (hdw->ctl_read_urb)) { +pvr2_trace ( +PVR2_TRACE_ERROR_LEGS , +"Invalid read control endpoint" ); +return -EINVAL ; + } status =usb_submit_urb (hdw->ctl_read_urb,GFP_KERNEL );if (status <0 ) { pvr2_trace(PVR2_TRACE_ERROR_LEGS,
drivers/misc/mei/hw-me-regs.h +5 -0
@@ -132,6 +132,11 @@#define MEI_DEV_ID_KBP 0xA2BA/* Kaby Point */ #define MEI_DEV_ID_KBP_2 0xA2BB/* Kaby Point 2 */ +#define MEI_DEV_ID_CNP_LP 0x9DE0/* Cannon Point LP */ +#define MEI_DEV_ID_CNP_LP_4 0x9DE4/* Cannon Point LP 4 (iTouch) */ +#define MEI_DEV_ID_CNP_H 0xA360/* Cannon Point H */ +#define MEI_DEV_ID_CNP_H_4 0xA364/* Cannon Point H 4 (iTouch) */ +/* * MEI HW Section */
drivers/misc/mei/pci-me.c +5 -0
@@ -98,6 +98,11 @@ static const struct pci_device_id mei_me_pci_tbl[] = { {MEI_PCI_DEVICE(MEI_DEV_ID_KBP, MEI_ME_PCH8_CFG)}, {MEI_PCI_DEVICE(MEI_DEV_ID_KBP_2, MEI_ME_PCH8_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_CNP_LP, MEI_ME_PCH8_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_CNP_LP_4, MEI_ME_PCH8_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_CNP_H, MEI_ME_PCH8_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_CNP_H_4, MEI_ME_PCH8_CFG)}, +/* required last entry */ {0, } };
drivers/net/tun.c +6 -10
@@ -1317,27 +1317,23 @@ static struct sk_buff *tun_napi_alloc_frags(struct tun_file *tfile, skb->truesize += skb->data_len;for (i =1 ; i < it->nr_segs; i++) { +struct page_frag *pfrag = ¤t->task_frag;size_t fragsz = it->iov[i].iov_len; -unsigned long offset; -struct page *page; -void *data;if (fragsz ==0 || fragsz >PAGE_SIZE ) { err = -EINVAL ; goto free; } -local_bh_disable (); - data =napi_alloc_frag (fragsz); -local_bh_enable (); -if (!data) { +if (!skb_page_frag_refill (fragsz, pfrag,GFP_KERNEL )) { err = -ENOMEM ; goto free; } - page =virt_to_head_page (data); - offset = data -page_address (page); -skb_fill_page_desc (skb, i -1 , page, offset, fragsz); +skb_fill_page_desc (skb, i -1 , pfrag->page, + pfrag->offset, fragsz); +page_ref_inc (pfrag->page); + pfrag->offset += fragsz; }return skb;
drivers/soc/qcom/rmtfs_mem.c +4 -0
@@ -267,3 +267,7 @@ static void qcom_rmtfs_mem_exit(void)unregister_chrdev_region (qcom_rmtfs_mem_major,QCOM_RMTFS_MEM_DEV_MAX ); }module_exit (qcom_rmtfs_mem_exit); + +MODULE_AUTHOR ("Linaro Ltd" ); +MODULE_DESCRIPTION ("Qualcomm Remote Filesystem memory driver" ); +MODULE_LICENSE ("GPL v2" );
drivers/staging/android/ashmem.c +11 -8
@@ -710,30 +710,32 @@ static int ashmem_pin_unpin(struct ashmem_area *asma, unsigned long cmd,size_t pgstart, pgend;int ret = -EINVAL ; +mutex_lock (&ashmem_mutex); +if (unlikely (!asma->file)) -return -EINVAL ; + goto out_unlock; -if (unlikely (copy_from_user (&pin, p,sizeof (pin)))) -return -EFAULT ; +if (unlikely (copy_from_user (&pin, p,sizeof (pin)))) { + ret = -EFAULT ; + goto out_unlock; + }/* per custom, you can pass zero for len to mean "everything onward" */ if (!pin.len) pin.len =PAGE_ALIGN (asma->size) - pin.offset;if (unlikely ((pin.offset | pin.len) & ~PAGE_MASK )) -return -EINVAL ; + goto out_unlock;if (unlikely (((__u32)-1 ) - pin.offset < pin.len)) -return -EINVAL ; + goto out_unlock;if (unlikely (PAGE_ALIGN (asma->size) < pin.offset + pin.len)) -return -EINVAL ; + goto out_unlock; pgstart = pin.offset /PAGE_SIZE ; pgend = pgstart + (pin.len /PAGE_SIZE ) -1 ; -mutex_lock (&ashmem_mutex); -switch (cmd) {case ASHMEM_PIN : ret =ashmem_pin (asma, pgstart, pgend);
@@ -746,6 +748,7 @@ static int ashmem_pin_unpin(struct ashmem_area *asma, unsigned long cmd,break ; } +out_unlock:mutex_unlock (&ashmem_mutex);return ret;
drivers/staging/android/ion/ion-ioctl.c +3 -1
@@ -70,8 +70,10 @@ long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)return -EFAULT ; ret =validate_ioctl_arg (cmd, &data); -if (WARN_ON_ONCE (ret)) +if (ret) { +pr_warn_once ("%s: ioctl validate failed\n" , __func__);return ret; + }if (!(dir & _IOC_WRITE))memset (&data,0 ,sizeof (data));
drivers/staging/android/ion/ion_system_heap.c +1 -1
@@ -371,7 +371,7 @@ static int ion_system_contig_heap_allocate(struct ion_heap *heap,unsigned long i;int ret; - page =alloc_pages (low_order_gfp_flags, order); + page =alloc_pages (low_order_gfp_flags | __GFP_NOWARN, order);if (!page)return -ENOMEM ;
drivers/staging/fsl-mc/bus/Kconfig +1 -1
@@ -8,7 +8,7 @@ config FSL_MC_BUS bool "QorIQ DPAA2 fsl-mc bus driver" - depends on OF && (ARCH_LAYERSCAPE || (COMPILE_TEST && (ARM || ARM64 || X86 || PPC))) + depends on OF && (ARCH_LAYERSCAPE || (COMPILE_TEST && (ARM || ARM64 || X86_LOCAL_APIC || PPC))) select GENERIC_MSI_IRQ_DOMAIN help Driver to enable the bus infrastructure for the QorIQ DPAA2
drivers/staging/iio/adc/ad7192.c +19 -8
@@ -141,6 +141,8 @@#define AD7192_GPOCON_P1DAT BIT(1)/* P1 state */ #define AD7192_GPOCON_P0DAT BIT(0)/* P0 state */ +#define AD7192_EXT_FREQ_MHZ_MIN 2457600 +#define AD7192_EXT_FREQ_MHZ_MAX 5120000#define AD7192_INT_FREQ_MHZ 4915200/* NOTE:
@@ -218,6 +220,12 @@ static int ad7192_calibrate_all(struct ad7192_state *st) ARRAY_SIZE(ad7192_calib_arr)); } +static inline bool ad7192_valid_external_frequency (u32 freq) +{ +return (freq >=AD7192_EXT_FREQ_MHZ_MIN && + freq <=AD7192_EXT_FREQ_MHZ_MAX ); +} +static int ad7192_setup (struct ad7192_state *st,const struct ad7192_platform_data *pdata) {
@@ -243,17 +251,20 @@ static int ad7192_setup(struct ad7192_state *st, id);switch (pdata->clock_source_sel) { -case AD7192_CLK_EXT_MCLK1_2 : -case AD7192_CLK_EXT_MCLK2 : - st->mclk =AD7192_INT_FREQ_MHZ ; -break ;case AD7192_CLK_INT :case AD7192_CLK_INT_CO : -if (pdata->ext_clk_hz) - st->mclk = pdata->ext_clk_hz; -else - st->mclk =AD7192_INT_FREQ_MHZ ; + st->mclk =AD7192_INT_FREQ_MHZ ;break ; +case AD7192_CLK_EXT_MCLK1_2 : +case AD7192_CLK_EXT_MCLK2 : +if (ad7192_valid_external_frequency (pdata->ext_clk_hz)) { + st->mclk = pdata->ext_clk_hz; +break ; + } +dev_err (&st->sd.spi->dev,"Invalid frequency setting %u\n" , + pdata->ext_clk_hz); + ret = -EINVAL ; + goto out;default : ret = -EINVAL ; goto out;
drivers/staging/iio/impedance-analyzer/ad5933.c +1 -3
@@ -648,8 +648,6 @@ static int ad5933_register_ring_funcs_and_init(struct iio_dev *indio_dev)/* Ring buffer functions - here trigger setup related */ indio_dev->setup_ops = &ad5933_ring_setup_ops; - indio_dev->modes |=INDIO_BUFFER_HARDWARE ; -return 0 ; }
@@ -762,7 +760,7 @@ static int ad5933_probe(struct i2c_client *client, indio_dev->dev.parent = &client->dev; indio_dev->info = &ad5933_info; indio_dev->name = id->name; - indio_dev->modes =INDIO_DIRECT_MODE ; + indio_dev->modes = (INDIO_BUFFER_SOFTWARE |INDIO_DIRECT_MODE ); indio_dev->channels = ad5933_channels; indio_dev->num_channels =ARRAY_SIZE (ad5933_channels);
drivers/usb/host/xhci-debugfs.c +2 -2
@@ -211,7 +211,7 @@ static void xhci_ring_dump_segment(struct seq_file *s,static int xhci_ring_trb_show (struct seq_file *s,void *unused) {int i; -struct xhci_ring *ring = s->private; +struct xhci_ring *ring = *(struct xhci_ring **)s->private;struct xhci_segment *seg = ring->first_seg;for (i =0 ; i < ring->num_segs; i++) {
@@ -387,7 +387,7 @@ void xhci_debugfs_create_endpoint(struct xhci_hcd *xhci,snprintf (epriv->name,sizeof (epriv->name),"ep%02d" , ep_index); epriv->root =xhci_debugfs_create_ring_dir (xhci, - &dev->eps[ep_index].new_ring, + &dev->eps[ep_index].ring, epriv->name, spriv->root); spriv->eps[ep_index] = epriv;
drivers/usb/host/xhci.c +4 -6
@@ -652,8 +652,6 @@ static void xhci_stop(struct usb_hcd *hcd)return ; } -xhci_debugfs_exit (xhci); -spin_lock_irq (&xhci->lock); xhci->xhc_state |=XHCI_STATE_HALTED ; xhci->cmd_ring_state =CMD_RING_STATE_STOPPED ;
@@ -685,6 +683,7 @@ static void xhci_stop(struct usb_hcd *hcd)xhci_dbg_trace (xhci, trace_xhci_dbg_init,"cleaning up memory" );xhci_mem_cleanup (xhci); +xhci_debugfs_exit (xhci);xhci_dbg_trace (xhci, trace_xhci_dbg_init,"xhci_stop completed - status = %x" ,readl (&xhci->op_regs->status));
@@ -1018,6 +1017,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)xhci_dbg (xhci,"cleaning up memory\n" );xhci_mem_cleanup (xhci); +xhci_debugfs_exit (xhci);xhci_dbg (xhci,"xhci_stop completed - status = %x\n" ,readl (&xhci->op_regs->status));
@@ -3551,12 +3551,10 @@ static void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev) virt_dev->eps[i].ep_state &= ~EP_STOP_CMD_PENDING ;del_timer_sync (&virt_dev->eps[i].stop_cmd_timer); } - +xhci_debugfs_remove_slot (xhci, udev->slot_id); ret =xhci_disable_slot (xhci, udev->slot_id); -if (ret) { -xhci_debugfs_remove_slot (xhci, udev->slot_id); +if (ret)xhci_free_virt_device (xhci, udev->slot_id); - } }int xhci_disable_slot (struct xhci_hcd *xhci,u32 slot_id)
drivers/usb/usbip/stub_dev.c +3 -0
@@ -73,6 +73,7 @@ static ssize_t store_sockfd(struct device *dev, struct device_attribute *attr, goto err; sdev->ud.tcp_socket = socket; + sdev->ud.sockfd = sockfd;spin_unlock_irq (&sdev->ud.lock);
@@ -172,6 +173,7 @@ static void stub_shutdown_connection(struct usbip_device *ud)if (ud->tcp_socket) {sockfd_put (ud->tcp_socket); ud->tcp_socket =NULL ; + ud->sockfd =-1 ; }/* 3. free used data */
@@ -266,6 +268,7 @@ static struct stub_device *stub_device_alloc(struct usb_device *udev) sdev->ud.status =SDEV_ST_AVAILABLE ;spin_lock_init (&sdev->ud.lock); sdev->ud.tcp_socket =NULL ; + sdev->ud.sockfd =-1 ;INIT_LIST_HEAD (&sdev->priv_init);INIT_LIST_HEAD (&sdev->priv_tx);
drivers/usb/usbip/vhci_hcd.c +2 -0
@@ -984,6 +984,7 @@ static void vhci_shutdown_connection(struct usbip_device *ud)if (vdev->ud.tcp_socket) {sockfd_put (vdev->ud.tcp_socket); vdev->ud.tcp_socket =NULL ; + vdev->ud.sockfd =-1 ; }pr_info ("release socket\n" );
@@ -1030,6 +1031,7 @@ static void vhci_device_reset(struct usbip_device *ud)if (ud->tcp_socket) {sockfd_put (ud->tcp_socket); ud->tcp_socket =NULL ; + ud->sockfd =-1 ; } ud->status =VDEV_ST_NULL ;
drivers/video/fbdev/mmp/core.c +5 -0
@@ -23,6 +23,7 @@#include <linux/slab.h> #include <linux/dma-mapping.h> #include <linux/export.h> +#include <linux/module.h> #include <video/mmp_disp.h> static struct mmp_overlay *path_get_overlay(struct mmp_path *path,
@@ -249,3 +250,7 @@ void mmp_unregister_path(struct mmp_path *path)mutex_unlock (&disp_lock); }EXPORT_SYMBOL_GPL (mmp_unregister_path); + +MODULE_AUTHOR ("Zhou Zhu <[email protected]>" ); +MODULE_DESCRIPTION ("Marvell MMP display framework" ); +MODULE_LICENSE ("GPL" );
include/linux/ptr_ring.h +10 -5
@@ -451,9 +451,14 @@ static inline int ptr_ring_consume_batched_bh(struct ptr_ring *r, __PTR_RING_PEEK_CALL_v; \ }) +/* Not all gfp_t flags (besides GFP_KERNEL) are allowed. See +* documentation for vmalloc for which of them are legal. +*/ static inline void **__ptr_ring_init_queue_alloc (unsigned int size,gfp_t gfp) { -return kcalloc (size,sizeof (void *), gfp); +if (size *sizeof (void *) >KMALLOC_MAX_SIZE ) +return NULL ; +return kvmalloc_array (size,sizeof (void *), gfp | __GFP_ZERO); }static inline void __ptr_ring_set_size (struct ptr_ring *r,int size)
@@ -586,7 +591,7 @@ static inline int ptr_ring_resize(struct ptr_ring *r, int size, gfp_t gfp,spin_unlock (&(r)->producer_lock);spin_unlock_irqrestore (&(r)->consumer_lock, flags); -kfree (old); +kvfree (old);return 0 ; }
@@ -626,7 +631,7 @@ static inline int ptr_ring_resize_multiple(struct ptr_ring **rings, }for (i =0 ; i < nrings; ++i) -kfree (queues[i]); +kvfree (queues[i]);kfree (queues);
@@ -634,7 +639,7 @@ static inline int ptr_ring_resize_multiple(struct ptr_ring **rings, nomem:while (--i >=0 ) -kfree (queues[i]); +kvfree (queues[i]);kfree (queues);
@@ -649,7 +654,7 @@ static inline void ptr_ring_cleanup(struct ptr_ring *r, void (*destroy)(void *))if (destroy)while ((ptr =ptr_ring_consume (r)))destroy (ptr); - kfree(r->queue); + kvfree(r->queue); }#endif /* _LINUX_PTR_RING_H */
kernel/kcov.c +2 -2
@@ -358,7 +358,8 @@ static int kcov_ioctl_locked(struct kcov *kcov, unsigned int cmd,*/ if (kcov->mode !=KCOV_MODE_INIT || !kcov->area)return -EINVAL ; -if (kcov->t !=NULL ) + t = current; +if (kcov->t !=NULL || t->kcov !=NULL )return -EBUSY ;if (arg ==KCOV_TRACE_PC ) kcov->mode =KCOV_MODE_TRACE_PC ;
@@ -370,7 +371,6 @@ static int kcov_ioctl_locked(struct kcov *kcov, unsigned int cmd,#endif else return -EINVAL; - t = current;/* Cache in task struct for performance. */ t->kcov_size = kcov->size; t->kcov_area = kcov->area;
mm/vmalloc.c +7 -3
@@ -1943,11 +1943,15 @@ void *vmalloc_exec(unsigned long size) }#if defined(CONFIG_64BIT ) && defined(CONFIG_ZONE_DMA32 ) -#define GFP_VMALLOC32 GFP_DMA32 | GFP_KERNEL +#define GFP_VMALLOC32 (GFP_DMA32 | GFP_KERNEL)#elif defined(CONFIG_64BIT ) && defined(CONFIG_ZONE_DMA ) -#define GFP_VMALLOC32 GFP_DMA | GFP_KERNEL +#define GFP_VMALLOC32 (GFP_DMA | GFP_KERNEL)#else -#define GFP_VMALLOC32 GFP_KERNEL +/* +* 64b systems should always have either DMA or DMA32 zones. For others +* GFP_DMA32 should do the right thing and use the normal zone. +*/ +#define GFP_VMALLOC32 GFP_DMA32 | GFP_KERNEL#endif /**
net/core/dev.c +1 -1
@@ -2815,7 +2815,7 @@ struct sk_buff *__skb_gso_segment(struct sk_buff *skb, segs =skb_mac_gso_segment (skb, features); -if (unlikely (skb_needs_check (skb, tx_path))) +if (unlikely (skb_needs_check (skb, tx_path) && !IS_ERR (segs)))skb_warn_bad_offload (skb);return segs;
net/core/gen_estimator.c +4 -0
@@ -159,7 +159,11 @@ int gen_new_estimator(struct gnet_stats_basic_packed *bstats, est->intvl_log = intvl_log; est->cpu_bstats = cpu_bstats; +if (stats_lock) +local_bh_disable ();est_fetch_counters (est, &b); +if (stats_lock) +local_bh_enable (); est->last_bytes = b.bytes; est->last_packets = b.packets; old =rcu_dereference_protected (*rate_est,1 );
net/decnet/af_decnet.c +33 -29
98 lines not on this page · raw message
net/ipv4/ip_sockglue.c +4 -10
@@ -1251,11 +1251,8 @@ int ip_setsockopt(struct sock *sk, int level,if (err == -ENOPROTOOPT && optname !=IP_HDRINCL && optname !=IP_IPSEC_POLICY && optname !=IP_XFRM_POLICY && - !ip_mroute_opt (optname)) { -lock_sock (sk); + !ip_mroute_opt (optname)) err =nf_setsockopt (sk,PF_INET , optname, optval, optlen); -release_sock (sk); - }#endif return err; }
@@ -1280,12 +1277,9 @@ int compat_ip_setsockopt(struct sock *sk, int level, int optname,if (err == -ENOPROTOOPT && optname !=IP_HDRINCL && optname !=IP_IPSEC_POLICY && optname !=IP_XFRM_POLICY && - !ip_mroute_opt (optname)) { -lock_sock (sk); - err =compat_nf_setsockopt (sk,PF_INET , optname, - optval, optlen); -release_sock (sk); - } + !ip_mroute_opt (optname)) + err =compat_nf_setsockopt (sk,PF_INET , optname, optval, + optlen);#endif return err; }
net/ipv4/netfilter/ipt_CLUSTERIP.c +13 -3
@@ -431,7 +431,7 @@ static int clusterip_tg_check(const struct xt_tgchk_param *par)struct ipt_clusterip_tgt_info *cipinfo = par->targinfo;const struct ipt_entry *e = par->entryinfo;struct clusterip_config *config; -int ret; +int ret, i;if (par->nft_compat) {pr_err ("cannot use CLUSTERIP target from nftables compat\n" );
@@ -450,8 +450,18 @@ static int clusterip_tg_check(const struct xt_tgchk_param *par)pr_info ("Please specify destination IP\n" );return -EINVAL ; } - -/* FIXME: further sanity checks */ +if (cipinfo->num_local_nodes >ARRAY_SIZE (cipinfo->local_nodes)) { +pr_info ("bad num_local_nodes %u\n" , cipinfo->num_local_nodes); +return -EINVAL ; + } +for (i =0 ; i < cipinfo->num_local_nodes; i++) { +if (cipinfo->local_nodes[i] -1 >= +sizeof (config->local_nodes) *8 ) { +pr_info ("bad local_nodes[%d] %u\n" , + i, cipinfo->local_nodes[i]); +return -EINVAL ; + } + } config =clusterip_config_find_get (par->net, e->ip.dst.s_addr,1 );if (!config) {
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +5 -1
@@ -218,15 +218,19 @@ getorigdst(struct sock *sk, int optval, void __user *user, int *len)struct nf_conntrack_tuple tuple;memset (&tuple,0 ,sizeof (tuple)); + +lock_sock (sk); tuple.src.u3.ip = inet->inet_rcv_saddr; tuple.src.u.tcp.port = inet->inet_sport; tuple.dst.u3.ip = inet->inet_daddr; tuple.dst.u.tcp.port = inet->inet_dport; tuple.src.l3num =PF_INET ; tuple.dst.protonum = sk->sk_protocol; +release_sock (sk);/* We only do TCP and SCTP at the moment: is there a better way? */ -if (sk->sk_protocol !=IPPROTO_TCP && sk->sk_protocol !=IPPROTO_SCTP ) { +if (tuple.dst.protonum !=IPPROTO_TCP && + tuple.dst.protonum !=IPPROTO_SCTP ) {pr_debug ("SO_ORIGINAL_DST: Not a TCP/SCTP socket\n" );return -ENOPROTOOPT ; }
net/ipv6/ipv6_sockglue.c +5 -12
@@ -923,12 +923,8 @@ int ipv6_setsockopt(struct sock *sk, int level, int optname,#ifdef CONFIG_NETFILTER /* we need to exclude all possible ENOPROTOOPTs except default case */ if (err == -ENOPROTOOPT && optname !=IPV6_IPSEC_POLICY && - optname !=IPV6_XFRM_POLICY ) { -lock_sock (sk); - err =nf_setsockopt (sk,PF_INET6 , optname, optval, - optlen); -release_sock (sk); - } + optname !=IPV6_XFRM_POLICY ) + err =nf_setsockopt (sk,PF_INET6 , optname, optval, optlen);#endif return err; }
@@ -958,12 +954,9 @@ int compat_ipv6_setsockopt(struct sock *sk, int level, int optname,#ifdef CONFIG_NETFILTER /* we need to exclude all possible ENOPROTOOPTs except default case */ if (err == -ENOPROTOOPT && optname !=IPV6_IPSEC_POLICY && - optname !=IPV6_XFRM_POLICY ) { -lock_sock (sk); - err =compat_nf_setsockopt (sk,PF_INET6 , optname, - optval, optlen); -release_sock (sk); - } + optname !=IPV6_XFRM_POLICY ) + err =compat_nf_setsockopt (sk,PF_INET6 , optname, optval, + optlen);#endif return err; }
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c +12 -6
@@ -226,20 +226,27 @@ static const struct nf_hook_ops ipv6_conntrack_ops[] = {static int ipv6_getorigdst (struct sock *sk,int optval,void __user *user,int *len) { -const struct inet_sock *inet =inet_sk (sk); +struct nf_conntrack_tuple tuple = { .src.l3num =NFPROTO_IPV6 };const struct ipv6_pinfo *inet6 =inet6_sk (sk); +const struct inet_sock *inet =inet_sk (sk);const struct nf_conntrack_tuple_hash *h;struct sockaddr_in6 sin6; -struct nf_conntrack_tuple tuple = { .src.l3num =NFPROTO_IPV6 };struct nf_conn *ct; +__be32 flow_label; +int bound_dev_if; +lock_sock (sk); tuple.src.u3.in6 = sk->sk_v6_rcv_saddr; tuple.src.u.tcp.port = inet->inet_sport; tuple.dst.u3.in6 = sk->sk_v6_daddr; tuple.dst.u.tcp.port = inet->inet_dport; tuple.dst.protonum = sk->sk_protocol; + bound_dev_if = sk->sk_bound_dev_if; + flow_label = inet6->flow_label; +release_sock (sk); -if (sk->sk_protocol !=IPPROTO_TCP && sk->sk_protocol !=IPPROTO_SCTP ) +if (tuple.dst.protonum !=IPPROTO_TCP && + tuple.dst.protonum !=IPPROTO_SCTP )return -ENOPROTOOPT ;if (*len <0 || (unsigned int ) *len <sizeof (sin6))
@@ -257,14 +264,13 @@ ipv6_getorigdst(struct sock *sk, int optval, void __user *user, int *len) sin6.sin6_family =AF_INET6 ; sin6.sin6_port = ct->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.dst.u.tcp.port; - sin6.sin6_flowinfo = inet6->flow_label &IPV6_FLOWINFO_MASK ; + sin6.sin6_flowinfo = flow_label &IPV6_FLOWINFO_MASK ;memcpy (&sin6.sin6_addr, &ct->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.dst.u3.in6,sizeof (sin6.sin6_addr));nf_ct_put (ct); - sin6.sin6_scope_id =ipv6_iface_scope_id (&sin6.sin6_addr, - sk->sk_bound_dev_if); + sin6.sin6_scope_id =ipv6_iface_scope_id (&sin6.sin6_addr, bound_dev_if);return copy_to_user (user, &sin6,sizeof (sin6)) ? -EFAULT :0 ; }
net/netfilter/x_tables.c +7 -2
@@ -39,7 +39,6 @@ MODULE_LICENSE("GPL");MODULE_AUTHOR ("Harald Welte <[email protected]>" );MODULE_DESCRIPTION ("{ip,ip6,arp,eb}_tables backend module" ); -#define SMP_ALIGN (x) (((x) + SMP_CACHE_BYTES-1) & ~(SMP_CACHE_BYTES-1))#define XT_PCPU_BLOCK_SIZE 4096struct compat_delta {
@@ -210,6 +209,9 @@ xt_request_find_match(uint8_t nfproto, const char *name, uint8_t revision) {struct xt_match *match; +if (strnlen (name,XT_EXTENSION_MAXNAMELEN ) ==XT_EXTENSION_MAXNAMELEN ) +return ERR_PTR (-EINVAL ); + match =xt_find_match (nfproto, name, revision);if (IS_ERR (match)) {request_module ("%st_%s" , xt_prefix[nfproto], name);
@@ -252,6 +254,9 @@ struct xt_target *xt_request_find_target(u8 af, const char *name, u8 revision) {struct xt_target *target; +if (strnlen (name,XT_EXTENSION_MAXNAMELEN ) ==XT_EXTENSION_MAXNAMELEN ) +return ERR_PTR (-EINVAL ); + target =xt_find_target (af, name, revision);if (IS_ERR (target)) {request_module ("%st_%s" , xt_prefix[af], name);
@@ -1000,7 +1005,7 @@ struct xt_table_info *xt_alloc_table_info(unsigned int size)return NULL ;/* Pedantry: prevent them from hitting BUG() in vmalloc.c --RR */ -if ((SMP_ALIGN (size) >>PAGE_SHIFT ) +2 > totalram_pages) +if ((size >>PAGE_SHIFT ) +2 > totalram_pages)return NULL ; info =kvmalloc (sz,GFP_KERNEL );
net/netfilter/xt_RATEEST.c +17 -5
@@ -39,23 +39,31 @@ static void xt_rateest_hash_insert(struct xt_rateest *est)hlist_add_head (&est->list, &rateest_hash[h]); } -struct xt_rateest *xt_rateest_lookup (const char *name) +static struct xt_rateest *__xt_rateest_lookup (const char *name) {struct xt_rateest *est;unsigned int h; h =xt_rateest_hash (name); -mutex_lock (&xt_rateest_mutex);hlist_for_each_entry (est, &rateest_hash[h], list) {if (strcmp (est->name, name) ==0 ) { est->refcnt++; -mutex_unlock (&xt_rateest_mutex);return est; } } -mutex_unlock (&xt_rateest_mutex); +return NULL ; } + +struct xt_rateest *xt_rateest_lookup (const char *name) +{ +struct xt_rateest *est; + +mutex_lock (&xt_rateest_mutex); + est =__xt_rateest_lookup (name); +mutex_unlock (&xt_rateest_mutex); +return est; +}EXPORT_SYMBOL_GPL (xt_rateest_lookup);void xt_rateest_put (struct xt_rateest *est)
@@ -100,8 +108,10 @@ static int xt_rateest_tg_checkentry(const struct xt_tgchk_param *par)net_get_random_once (&jhash_rnd,sizeof (jhash_rnd)); - est =xt_rateest_lookup (info->name); +mutex_lock (&xt_rateest_mutex); + est =__xt_rateest_lookup (info->name);if (est) { +mutex_unlock (&xt_rateest_mutex);/* * If estimator parameters are specified, they must match the * existing estimator.
@@ -139,11 +149,13 @@ static int xt_rateest_tg_checkentry(const struct xt_tgchk_param *par) info->est = est;xt_rateest_hash_insert (est); +mutex_unlock (&xt_rateest_mutex);return 0 ; err2:kfree (est); err1: +mutex_unlock (&xt_rateest_mutex);return ret; }
net/netfilter/xt_cgroup.c +1 -0
@@ -52,6 +52,7 @@ static int cgroup_mt_check_v1(const struct xt_mtchk_param *par)return -EINVAL ; } + info->priv =NULL ;if (info->has_path) { cgrp =cgroup_get_from_path (info->path);if (IS_ERR (cgrp)) {
net/rds/connection.c +2 -1
@@ -366,6 +366,8 @@ void rds_conn_shutdown(struct rds_conn_path *cp)* to the conn hash, so we never trigger a reconnect on this * conn - the reconnect is always triggered by the active peer. */ cancel_delayed_work_sync (&cp->cp_conn_w); +if (conn->c_destroy_in_prog) +return ;rcu_read_lock ();if (!hlist_unhashed (&conn->c_hash_node)) {rcu_read_unlock ();
@@ -445,7 +447,6 @@ void rds_conn_destroy(struct rds_connection *conn)*/ rds_cong_remove_conn (conn); -put_net (conn->c_net);kfree (conn->c_path);kmem_cache_free (rds_conn_slab, conn);
net/rds/rds.h +3 -3
@@ -150,7 +150,7 @@ struct rds_connection {/* Protocol version */ unsigned int c_version; -struct net *c_net; +possible_net_t c_net;struct list_head c_map_item;unsigned long c_map_queued;
@@ -165,13 +165,13 @@ struct rds_connection {static inline struct net *rds_conn_net (struct rds_connection *conn) { -return conn->c_net; +return read_pnet (&conn->c_net); }static inline void rds_conn_net_set (struct rds_connection *conn,struct net *net) { - conn->c_net =get_net (net); +write_pnet (&conn->c_net, net); }#define RDS_FLAG_CONG_BITMAP 0x01
net/rds/tcp.c +9 -4
@@ -307,7 +307,8 @@ static void rds_tcp_conn_free(void *arg)rdsdebug ("freeing tc %p\n" , tc);spin_lock_irqsave (&rds_tcp_conn_lock, flags); -list_del (&tc->t_tcp_node); +if (!tc->t_tcp_node_detached) +list_del (&tc->t_tcp_node);spin_unlock_irqrestore (&rds_tcp_conn_lock, flags);kmem_cache_free (rds_tcp_conn_slab, tc);
@@ -528,12 +529,16 @@ static void rds_tcp_kill_sock(struct net *net)rds_tcp_listen_stop (lsock, &rtn->rds_tcp_accept_w);spin_lock_irq (&rds_tcp_conn_lock);list_for_each_entry_safe (tc, _tc, &rds_tcp_conn_list, t_tcp_node) { -struct net *c_net = tc->t_cpath->cp_conn->c_net; +struct net *c_net =read_pnet (&tc->t_cpath->cp_conn->c_net);if (net != c_net || !tc->t_sock)continue ; -if (!list_has_conn (&tmp_list, tc->t_cpath->cp_conn)) +if (!list_has_conn (&tmp_list, tc->t_cpath->cp_conn)) {list_move_tail (&tc->t_tcp_node, &tmp_list); + }else { +list_del (&tc->t_tcp_node); + tc->t_tcp_node_detached = true; + } }spin_unlock_irq (&rds_tcp_conn_lock);list_for_each_entry_safe (tc, _tc, &tmp_list, t_tcp_node) {
@@ -587,7 +592,7 @@ static void rds_tcp_sysctl_reset(struct net *net)spin_lock_irq (&rds_tcp_conn_lock);list_for_each_entry_safe (tc, _tc, &rds_tcp_conn_list, t_tcp_node) { -struct net *c_net = tc->t_cpath->cp_conn->c_net; +struct net *c_net =read_pnet (&tc->t_cpath->cp_conn->c_net);if (net != c_net || !tc->t_sock)continue ;
net/rds/tcp.h +1 -0
@@ -12,6 +12,7 @@ struct rds_tcp_incoming {struct rds_tcp_connection {struct list_head t_tcp_node; +bool t_tcp_node_detached;struct rds_conn_path *t_cpath;/* t_conn_path_lock synchronizes the connection establishment between * rds_tcp_accept_one and rds_tcp_conn_path_connect
security/selinux/ss/services.c +11 -10
@@ -867,6 +867,9 @@ int security_bounded_transition(u32 old_sid, u32 new_sid)int index;int rc; +if (!ss_initialized) +return 0 ; +read_lock (&policy_rwlock); rc = -EINVAL ;
@@ -1413,27 +1416,25 @@ static int security_context_to_sid_core(const char *scontext, u32 scontext_len,if (!scontext_len)return -EINVAL ; +/* Copy the string to allow changes and ensure a NUL terminator */ + scontext2 =kmemdup_nul (scontext, scontext_len, gfp_flags); +if (!scontext2) +return -ENOMEM ; +if (!ss_initialized) {int i;for (i =1 ; i <SECINITSID_NUM ; i++) { -if (!strcmp (initial_sid_to_string[i], scontext)) { +if (!strcmp (initial_sid_to_string[i], scontext2)) { *sid = i; -return 0 ; + goto out; } } *sid =SECINITSID_KERNEL ; -return 0 ; + goto out; } *sid =SECSID_NULL ; -/* Copy the string so that we can modify the copy as we parse it. */ - scontext2 =kmalloc (scontext_len +1 , gfp_flags); -if (!scontext2) -return -ENOMEM ; -memcpy (scontext2, scontext, scontext_len); - scontext2[scontext_len] =0 ; -if (force) {/* Save another copy for storing in uninterpreted form */ rc = -ENOMEM ;
sound/soc/ux500/mop500.c +4 -0
@@ -163,3 +163,7 @@ static struct platform_driver snd_soc_mop500_driver = { };module_platform_driver (snd_soc_mop500_driver); + +MODULE_LICENSE ("GPL v2" ); +MODULE_DESCRIPTION ("ASoC MOP500 board driver" ); +MODULE_AUTHOR ("Ola Lilja" );
sound/soc/ux500/ux500_pcm.c +5 -0
@@ -165,3 +165,8 @@ int ux500_pcm_unregister_platform(struct platform_device *pdev)return 0 ; }EXPORT_SYMBOL_GPL (ux500_pcm_unregister_platform); + +MODULE_AUTHOR ("Ola Lilja" ); +MODULE_AUTHOR ("Roger Nilsson" ); +MODULE_DESCRIPTION ("ASoC UX500 driver" ); +MODULE_LICENSE ("GPL v2" );