[PATCH 2/3] staging: android: ion: Remove ION_FLAG_CACHED_NEEDS_SYNC
The flag ION_FLAG_CACHED_NEEDS_SYNC isn't used anymore. Remove it. Signed-off-by: Archit Taneja --- drivers/staging/android/uapi/ion.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/android/uapi/ion.h b/drivers/staging/android/uapi/ion.h index b76db1b2e197..d415589757e7 100644 --- a/drivers/staging/android/uapi/ion.h +++ b/drivers/staging/android/uapi/ion.h @@ -57,12 +57,6 @@ enum ion_heap_type { */ #define ION_FLAG_CACHED 1 -/* - * mappings of this buffer will created at mmap time, if this is set - * caches must be managed manually - */ -#define ION_FLAG_CACHED_NEEDS_SYNC 2 - /** * DOC: Ion Userspace API * -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/3] staging: android: ion: Minor clean ups and fixes
The recent ION clean ups introduced some leftover code that can be removed, and a bug that comes up if the call to dma_buf_map_attachment() from an importer fails. Fix these. Archit Taneja (3): staging: android: ion: Remove unused members from ion_buffer staging: android: ion: Remove ION_FLAG_CACHED_NEEDS_SYNC staging: android: ion: Avoid calling free_duped_table() twice drivers/staging/android/ion/ion.c | 14 +++--- drivers/staging/android/ion/ion.h | 14 -- drivers/staging/android/uapi/ion.h | 6 -- 3 files changed, 3 insertions(+), 31 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/3] staging: android: ion: Avoid calling free_duped_table() twice
Currently, the duplicated sg table is freed in the detach() and the error path of map_dma_buf() ion's dma_buf_ops. If a call to dma_buf_map_attachment() fails, the importer is expected to call dma_buf_detach() to remove the attachment. This will result in us trying to free the duped sg table twice. Don't call free_duped_table() in ion_map_dma_buf() to avoid this. Signed-off-by: Archit Taneja --- drivers/staging/android/ion/ion.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 90ae6ce466ed..b483e1081309 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -268,20 +268,14 @@ static struct sg_table *ion_map_dma_buf(struct dma_buf_attachment *attachment, { struct ion_dma_buf_attachment *a = attachment->priv; struct sg_table *table; - int ret; table = a->table; if (!dma_map_sg(attachment->dev, table->sgl, table->nents, - direction)){ - ret = -ENOMEM; - goto err; - } - return table; + direction)) + return ERR_PTR(-ENOMEM); -err: - free_duped_table(table); - return ERR_PTR(ret); + return table; } static void ion_unmap_dma_buf(struct dma_buf_attachment *attachment, -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/3] staging: android: ion: Remove unused members from ion_buffer
A few members in ion_buffer struct are unused after features like page faulting, ion_handle and ion_client were removed. Remove these members and the leftover references to them. Signed-off-by: Archit Taneja --- drivers/staging/android/ion/ion.c | 2 -- drivers/staging/android/ion/ion.h | 14 -- 2 files changed, 16 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 03d3a4fce0e2..90ae6ce466ed 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -115,7 +115,6 @@ static struct ion_buffer *ion_buffer_create(struct ion_heap *heap, buffer->dev = dev; buffer->size = len; - INIT_LIST_HEAD(&buffer->vmas); INIT_LIST_HEAD(&buffer->attachments); mutex_init(&buffer->lock); mutex_lock(&dev->buffer_lock); @@ -135,7 +134,6 @@ void ion_buffer_destroy(struct ion_buffer *buffer) if (WARN_ON(buffer->kmap_cnt > 0)) buffer->heap->ops->unmap_kernel(buffer->heap, buffer); buffer->heap->ops->free(buffer); - vfree(buffer->pages); kfree(buffer); } diff --git a/drivers/staging/android/ion/ion.h b/drivers/staging/android/ion/ion.h index ace8416bd509..fa9ed81ab972 100644 --- a/drivers/staging/android/ion/ion.h +++ b/drivers/staging/android/ion/ion.h @@ -68,14 +68,6 @@ struct ion_platform_heap { * @kmap_cnt: number of times the buffer is mapped to the kernel * @vaddr: the kernel mapping if kmap_cnt is not zero * @sg_table: the sg table for the buffer if dmap_cnt is not zero - * @pages: flat array of pages in the buffer -- used by fault - * handler and only valid for buffers that are faulted in - * @vmas: list of vma's mapping this buffer - * @handle_count: count of handles referencing this buffer - * @task_comm: taskcomm of last client to reference this buffer in a - * handle, used for debugging - * @pid: pid of last client to reference this buffer in a - * handle, used for debugging */ struct ion_buffer { union { @@ -92,13 +84,7 @@ struct ion_buffer { int kmap_cnt; void *vaddr; struct sg_table *sg_table; - struct page **pages; - struct list_head vmas; struct list_head attachments; - /* used to track orphaned buffers */ - int handle_count; - char task_comm[TASK_COMM_LEN]; - pid_t pid; }; void ion_buffer_destroy(struct ion_buffer *buffer); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] powerpc: booke: fix boot crash due to null hugepd
On Tue, May 16, 2017 at 09:47:52AM -0500, laurentiu.tu...@nxp.com wrote: > From: Laurentiu Tudor > > On 32-bit book-e machines, hugepd_ok() does not take > into account null hugepd values, causing this crash at boot: > > Unable to handle kernel paging request for data at address 0x8000 > Faulting instruction address: 0xc00182a8 > Oops: Kernel access of bad area, sig: 11 [#1] > SMP NR_CPUS=24 > CoreNet Generic > Modules linked in: > CPU: 1 PID: 1 Comm: swapper/0 Tainted: GW > 4.10.0-rc8-00016-g69b1f87 #11 > task: e505 task.stack: e5058000 > NIP: c00182a8 LR: c001829c CTR: 7ffe > REGS: e5059c50 TRAP: 0300 Tainted: GW > (4.10.0-rc8-00016-g69b1f87) > MSR: 00021002 > CR: 88428e82 XER: > DEAR: 8000 ESR: > GPR00: c0107510 e5059d00 e505 8000 bff1 e5059d0c e5059d08 2017 > GPR08: 28428e82 c00027d0 > GPR16: 88a28e82 2000 48422e82 88a28e84 dd004000 > GPR24: e5059e38 bff1 dd004000 0001 00029002 bff1 > NIP [c00182a8] follow_huge_addr+0x38/0xf0 > LR [c001829c] follow_huge_addr+0x2c/0xf0 > Call Trace: > [e5059d00] [e5059d00] 0xe5059d00 (unreliable) > [e5059d20] [c0107510] follow_page_mask+0x40/0x3c0 > [e5059d80] [c0107958] __get_user_pages+0xc8/0x420 > [e5059de0] [c010817c] get_user_pages_remote+0x8c/0x230 > [e5059e30] [c013f170] copy_strings+0x110/0x3a0 > [e5059ea0] [c013f42c] copy_strings_kernel+0x2c/0x50 > [e5059ec0] [c0141324] do_execveat_common+0x474/0x620 > [e5059f10] [c01414fc] do_execve+0x2c/0x40 > [e5059f20] [c0001f68] try_to_run_init_process+0x18/0x60 > [e5059f30] [c000289c] kernel_init+0xcc/0x120 > [e5059f40] [c000f1e8] ret_from_kernel_thread+0x5c/0x64 > Instruction dump: > bfc10018 7c9f2378 90010024 7fc000a6 7c000146 80630020 38a1000c 38c10008 > 4bfff869 2c03 41c20090 81210008 <8143> 81630004 3860ffea 2f89 > ---[ end trace 4bf94e15fd9fa824 ]--- > > This impacts all nxp (ex-freescale) 32-bit booke platforms. > > Fixes: 20717e1ff526 ("powerpc/mm: Fix little-endian 4K hugetlb") > > Reported-by: Madalin-Cristian Bucur > Signed-off-by: Laurentiu Tudor > --- > arch/powerpc/include/asm/nohash/pgtable.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/include/asm/nohash/pgtable.h > b/arch/powerpc/include/asm/nohash/pgtable.h > index 0cd8a38..e5805ad 100644 > --- a/arch/powerpc/include/asm/nohash/pgtable.h > +++ b/arch/powerpc/include/asm/nohash/pgtable.h > @@ -230,7 +230,7 @@ static inline int hugepd_ok(hugepd_t hpd) > return ((hpd_val(hpd) & 0x4) != 0); > #else > /* We clear the top bit to indicate hugepd */ > - return ((hpd_val(hpd) & PD_HUGE) == 0); > + return (hpd_val(hpd) && (hpd_val(hpd) & PD_HUGE) == 0); > #endif > } > $ ./scripts/get_maintainer.pl --file arch/powerpc/include/asm/nohash/pgtable.h Benjamin Herrenschmidt (supporter:LINUX FOR POWERPC (32-BIT AND 64-BIT)) Paul Mackerras (supporter:LINUX FOR POWERPC (32-BIT AND 64-BIT)) Michael Ellerman (supporter:LINUX FOR POWERPC (32-BIT AND 64-BIT),commit_signer:2/3=67%) "Aneesh Kumar K.V" (commit_signer:2/3=67%,authored:1/3=33%,added_lines:3/8=38%,removed_lines:2/3=67%) Scott Wood (commit_signer:1/3=33%) Laurentiu Tudor (commit_signer:1/3=33%,authored:1/3=33%,added_lines:1/8=12%,removed_lines:1/3=33%) Christophe Leroy (commit_signer:1/3=33%,authored:1/3=33%,added_lines:4/8=50%) linuxppc-...@lists.ozlabs.org (open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)) linux-ker...@vger.kernel.org (open list) I'm not listed there at all, any specific reason you sent this to me? Nothing I can do with it... greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: lustre: lnet: specify address space
On Tue, May 16, 2017 at 10:56:10PM +0200, Paolo Cretaro wrote: > Fix warning issued by sparse: > incorrect type in assignment (different address spaces). > > Signed-off-by: Paolo Cretaro > --- > drivers/staging/lustre/lnet/lnet/lib-socket.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/lustre/lnet/lnet/lib-socket.c > b/drivers/staging/lustre/lnet/lnet/lib-socket.c > index 9fca8d225ee0..e5e5213b4da0 100644 > --- a/drivers/staging/lustre/lnet/lnet/lib-socket.c > +++ b/drivers/staging/lustre/lnet/lnet/lib-socket.c > @@ -181,7 +181,7 @@ lnet_ipif_enumerate(char ***namesp) > goto out0; > } > > - ifc.ifc_buf = (char *)ifr; > + ifc.ifc_buf = (char __user *)ifr; But it's not a __user pointer so this is wrong. You have deleted a valuable warning message which is there to inform us about important bugs. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] powerpc: booke: fix boot crash due to null hugepd
Hi Greg, On 05/17/2017 12:15 PM, Greg KH wrote: > On Tue, May 16, 2017 at 09:47:52AM -0500, laurentiu.tu...@nxp.com wrote: >> From: Laurentiu Tudor >> >> On 32-bit book-e machines, hugepd_ok() does not take >> into account null hugepd values, causing this crash at boot: >> > > $ ./scripts/get_maintainer.pl --file arch/powerpc/include/asm/nohash/pgtable.h > Benjamin Herrenschmidt (supporter:LINUX FOR > POWERPC (32-BIT AND 64-BIT)) > Paul Mackerras (supporter:LINUX FOR POWERPC (32-BIT AND > 64-BIT)) > Michael Ellerman (supporter:LINUX FOR POWERPC (32-BIT > AND 64-BIT),commit_signer:2/3=67%) > "Aneesh Kumar K.V" > (commit_signer:2/3=67%,authored:1/3=33%,added_lines:3/8=38%,removed_lines:2/3=67%) > Scott Wood (commit_signer:1/3=33%) > Laurentiu Tudor > (commit_signer:1/3=33%,authored:1/3=33%,added_lines:1/8=12%,removed_lines:1/3=33%) > Christophe Leroy > (commit_signer:1/3=33%,authored:1/3=33%,added_lines:4/8=50%) > linuxppc-...@lists.ozlabs.org (open list:LINUX FOR POWERPC (32-BIT AND > 64-BIT)) > linux-ker...@vger.kernel.org (open list) > > I'm not listed there at all, any specific reason you sent this to me? > Nothing I can do with it... > Just some finger trouble on my side. Please disregard and sorry for the noise. --- Best Regards, Laurentiu ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH] staging: fsl-dpaa2/eth: add ETHERNET dependency
> -Original Message- > From: Arnd Bergmann [mailto:a...@arndb.de] > Sent: Tuesday, May 16, 2017 2:30 PM > To: Greg Kroah-Hartman ; Arnd Bergmann > > Cc: Ruxandra Ioana Radulescu ; > de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org > Subject: [PATCH] staging: fsl-dpaa2/eth: add ETHERNET dependency > > The new driver cannot link correctly when the netdevice infrastructure > is disabled: > > ERROR: "netdev_info" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2-eth.ko] > undefined! > ERROR: "skb_to_sgvec" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2- > eth.ko] undefined! > ERROR: "napi_disable" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2- > eth.ko] undefined! > ERROR: "napi_schedule_prep" [drivers/staging/fsl-dpaa2/ethernet/fsl- > dpaa2-eth.ko] undefined! > ERROR: "__napi_schedule_irqoff" [drivers/staging/fsl-dpaa2/ethernet/fsl- > dpaa2-eth.ko] undefined! > ERROR: "netif_carrier_on" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2- > eth.ko] undefined! > > This adds a dependency on NETDEVICES and ETHERNET. > > Fixes: 0352d1d85201 ("staging: fsl-dpaa2/eth: Add APIs for DPNI objects") > Signed-off-by: Arnd Bergmann > --- > drivers/staging/fsl-dpaa2/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/fsl-dpaa2/Kconfig b/drivers/staging/fsl- > dpaa2/Kconfig > index 2e325cb747ae..730fd6d4db33 100644 > --- a/drivers/staging/fsl-dpaa2/Kconfig > +++ b/drivers/staging/fsl-dpaa2/Kconfig > @@ -12,6 +12,7 @@ config FSL_DPAA2 > config FSL_DPAA2_ETH > tristate "Freescale DPAA2 Ethernet" > depends on FSL_DPAA2 && FSL_MC_DPIO > + depends on NETDEVICES && ETHERNET > ---help--- > Ethernet driver for Freescale DPAA2 SoCs, using the > Freescale MC bus driver > -- > 2.9.0 Thanks! Acked-by: Ioana Radulescu ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/3] staging: android: ion: Minor clean ups and fixes
On 05/17/2017 01:15 AM, Archit Taneja wrote: > The recent ION clean ups introduced some leftover code that can be > removed, and a bug that comes up if the call to dma_buf_map_attachment() > from an importer fails. Fix these. > > Archit Taneja (3): > staging: android: ion: Remove unused members from ion_buffer > staging: android: ion: Remove ION_FLAG_CACHED_NEEDS_SYNC > staging: android: ion: Avoid calling free_duped_table() twice > > drivers/staging/android/ion/ion.c | 14 +++--- > drivers/staging/android/ion/ion.h | 14 -- > drivers/staging/android/uapi/ion.h | 6 -- > 3 files changed, 3 insertions(+), 31 deletions(-) > Acked-by: Laura Abbott ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: netlogic: Delete an error message for a failed memory allocation in xlr_config_spill()
From: Markus Elfring Date: Wed, 17 May 2017 19:01:10 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- drivers/staging/netlogic/xlr_net.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index 781ef623233e..864304eb5f36 100644 --- a/drivers/staging/netlogic/xlr_net.c +++ b/drivers/staging/netlogic/xlr_net.c @@ -420,10 +420,8 @@ static void *xlr_config_spill(struct xlr_net_priv *priv, int reg_start_0, base = priv->base_addr; spill_size = size; spill = kmalloc(spill_size + SMP_CACHE_BYTES, GFP_ATOMIC); - if (!spill) { - pr_err("Unable to allocate memory for spill area!\n"); + if (!spill) return ZERO_SIZE_PTR; - } spill = PTR_ALIGN(spill, SMP_CACHE_BYTES); phys_addr = virt_to_phys(spill); -- 2.13.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: wilc1000: Delete an error message for a failed memory allocation in Handle_Key()
From: Markus Elfring Date: Wed, 17 May 2017 22:26:07 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- drivers/staging/wilc1000/host_interface.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index c3a8af081880..17a31bbd3665 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -1688,7 +1688,6 @@ static int Handle_Key(struct wilc_vif *vif, } else if (pstrHostIFkeyAttr->action & ADDKEY) { pu8keybuf = kmalloc(PTK_KEY_MSG_LEN, GFP_KERNEL); if (!pu8keybuf) { - netdev_err(vif->ndev, "No buffer send PTK\n"); ret = -ENOMEM; goto _WPAPtk_end_case_; } -- 2.13.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] Drivers: hv: vmbus: Close timing hole that can corrupt per-cpu page Extend the disabling of preemption to include the hypercall so that another thread can't get the CPU and corrupt the per
From: Michael Kelley Signed-off-by: Michael Kelley --- drivers/hv/hv.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 12e7bae..47ed538 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -82,9 +82,14 @@ int hv_post_message(union hv_connection_id connection_id, aligned_msg->message_type = message_type; aligned_msg->payload_size = payload_size; memcpy((void *)aligned_msg->payload, payload, payload_size); - put_cpu_ptr(hv_cpu); status = hv_do_hypercall(HVCALL_POST_MESSAGE, aligned_msg, NULL); + + /* Preemption must remain disabled until after the hypercall +* so some other thread can't get scheduled onto this cpu and +* corrupt the per-cpu post_msg_page +*/ + put_cpu_ptr(hv_cpu); return status & 0x; } -- 1.7.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] Drivers: hv: vmbus: Close timing hole that can corrupt per-cpu page Extend the disabling of preemption to include the hypercall so that another thread can't get the CPU and corrupt the
On Wed, 17 May 2017 14:40:55 -0700 mikel...@exchange.microsoft.com wrote: > From: Michael Kelley > > Signed-off-by: Michael Kelley > --- > drivers/hv/hv.c |7 ++- > 1 files changed, 6 insertions(+), 1 deletions(-) > > diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c > index 12e7bae..47ed538 100644 > --- a/drivers/hv/hv.c > +++ b/drivers/hv/hv.c > @@ -82,9 +82,14 @@ int hv_post_message(union hv_connection_id connection_id, > aligned_msg->message_type = message_type; > aligned_msg->payload_size = payload_size; > memcpy((void *)aligned_msg->payload, payload, payload_size); > - put_cpu_ptr(hv_cpu); > > status = hv_do_hypercall(HVCALL_POST_MESSAGE, aligned_msg, NULL); > + > + /* Preemption must remain disabled until after the hypercall > + * so some other thread can't get scheduled onto this cpu and > + * corrupt the per-cpu post_msg_page > + */ > + put_cpu_ptr(hv_cpu); > > return status & 0x; > } Since Subject line becomes the git log description, it is best practice to keep it short. On git commit man page: Though not required, it’s a good idea to begin the commit message with a single short (less than 50 character) line summarizing the change, followed by a blank line and then a more thorough description. If you need to provide more description put it in the message body. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] Drivers: hv: vmbus: Close timing hole that can corrupt per-cpu page Extend the disabling of preemption to include the hypercall so that another thread can't get the CPU and corrupt the
This looks like a bugfix that should be included in stable. On Wed, May 17, 2017 at 3:00 PM, Stephen Hemminger wrote: > On Wed, 17 May 2017 14:40:55 -0700 > mikel...@exchange.microsoft.com wrote: > >> From: Michael Kelley >> >> Signed-off-by: Michael Kelley >> --- >> drivers/hv/hv.c |7 ++- >> 1 files changed, 6 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c >> index 12e7bae..47ed538 100644 >> --- a/drivers/hv/hv.c >> +++ b/drivers/hv/hv.c >> @@ -82,9 +82,14 @@ int hv_post_message(union hv_connection_id connection_id, >> aligned_msg->message_type = message_type; >> aligned_msg->payload_size = payload_size; >> memcpy((void *)aligned_msg->payload, payload, payload_size); >> - put_cpu_ptr(hv_cpu); >> >> status = hv_do_hypercall(HVCALL_POST_MESSAGE, aligned_msg, NULL); >> + >> + /* Preemption must remain disabled until after the hypercall >> + * so some other thread can't get scheduled onto this cpu and >> + * corrupt the per-cpu post_msg_page >> + */ >> + put_cpu_ptr(hv_cpu); >> >> return status & 0x; >> } > > Since Subject line becomes the git log description, it is best practice to > keep it short. > On git commit man page: > >Though not required, it’s a good idea to begin the commit message with >a single short (less than 50 character) line summarizing the change, >followed by a blank line and then a more thorough description. > > If you need to provide more description put it in the message body. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 1/1] Drivers: hv: vmbus: Close timing hole that can corrupt per-cpu page
From: Michael Kelley Extend the disabling of preemption to include the hypercall so that another thread can't get the CPU and corrupt the per-cpu page used for hypercall arguments. Signed-off-by: Michael Kelley --- drivers/hv/hv.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 12e7bae..47ed538 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -82,9 +82,14 @@ int hv_post_message(union hv_connection_id connection_id, aligned_msg->message_type = message_type; aligned_msg->payload_size = payload_size; memcpy((void *)aligned_msg->payload, payload, payload_size); - put_cpu_ptr(hv_cpu); status = hv_do_hypercall(HVCALL_POST_MESSAGE, aligned_msg, NULL); + + /* Preemption must remain disabled until after the hypercall +* so some other thread can't get scheduled onto this cpu and +* corrupt the per-cpu post_msg_page +*/ + put_cpu_ptr(hv_cpu); return status & 0x; } -- 1.7.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: media: fix missing blank line coding style issue in atomisp_tpg.c
This is a patch to the atomisp_tpg.c file that fixes up a missing blank line warning found by the checkpatch.pl tool Signed-off-by: Manny Vindiola --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c index 996d1bd..48b9604 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c @@ -56,6 +56,7 @@ static int tpg_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_format *format) { struct v4l2_mbus_framefmt *fmt = &format->format; + if (format->pad) return -EINVAL; /* only raw8 grbg is supported by TPG */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/3] staging: android: ion: Minor clean ups and fixes
Hi Archit, On 17 May 2017 at 13:45, Archit Taneja wrote: > The recent ION clean ups introduced some leftover code that can be > removed, and a bug that comes up if the call to dma_buf_map_attachment() > from an importer fails. Fix these. > > Archit Taneja (3): > staging: android: ion: Remove unused members from ion_buffer > staging: android: ion: Remove ION_FLAG_CACHED_NEEDS_SYNC > staging: android: ion: Avoid calling free_duped_table() twice > Thanks for these patches! Please feel free to add my Reviewed-by: Sumit Semwal > drivers/staging/android/ion/ion.c | 14 +++--- > drivers/staging/android/ion/ion.h | 14 -- > drivers/staging/android/uapi/ion.h | 6 -- > 3 files changed, 3 insertions(+), 31 deletions(-) > > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > hosted by The Linux Foundation > Best, Sumit. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel