Re: [PATCH] staging: comedi: ni_atmio: Handle return value of pnp_*

2017-11-16 Thread arvindY
hi, On Thursday 16 November 2017 07:27 PM, Ian Abbott wrote: On 16/11/17 04:32, Arvind Yadav wrote: pnp_irq() and pnp_port_start() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- drivers/staging/comedi/drivers/ni_atmio.c | 3 +++ 1 file changed, 3 insertio

Re: [PATCH 0/9] posix_clocks: Prepare syscalls for 64 bit time_t conversion

2017-11-16 Thread Arnd Bergmann
On Thu, Nov 16, 2017 at 10:04 AM, Thomas Gleixner wrote: > On Wed, 15 Nov 2017, Deepa Dinamani wrote: >> > I had on concern about x32, maybe we should check >> > for "COMPAT_USE_64BIT_TIME" before zeroing out the tv_nsec >> > bits. >> >> Thanks, I think you are right. I had the check conditional o

Re: [PATCH v2] binder: fix proc->files use-after-free

2017-11-16 Thread Todd Kjos
Sorry about that, do you want a v3 with correct annotations? On Thu, Nov 16, 2017 at 12:27 PM, Greg KH wrote: > On Thu, Nov 16, 2017 at 09:56:50AM -0800, Todd Kjos wrote: >> proc->files cleanup is initiated by binder_vma_close. Therefore >> a reference on the binder_proc is not enough to prevent

Re: [PATCH v2] binder: fix proc->files use-after-free

2017-11-16 Thread Greg KH
On Thu, Nov 16, 2017 at 09:56:50AM -0800, Todd Kjos wrote: > proc->files cleanup is initiated by binder_vma_close. Therefore > a reference on the binder_proc is not enough to prevent the > files_struct from being released while the binder_proc still has > a reference. This can lead to an attempt to

[PATCH] staging: pi433: fixed signedness of 4th argument to kfifo_from_user

2017-11-16 Thread Stefano Manni
sparse warning: incorrect type in initializer (different signedness) expected unsigned int *__copied, got int * Signed-off-by: Stefano Manni --- drivers/staging/pi433/pi433_if.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/stagi

[PATCH v2] binder: fix proc->files use-after-free

2017-11-16 Thread Todd Kjos
proc->files cleanup is initiated by binder_vma_close. Therefore a reference on the binder_proc is not enough to prevent the files_struct from being released while the binder_proc still has a reference. This can lead to an attempt to dereference the stale pointer obtained from proc->files prior to p

Re: [PATCH] binder: fix proc->files use-after-free

2017-11-16 Thread Todd Kjos
> @@ -875,22 +871,34 @@ static void binder_free_thread(struct binder_thread > *thread); > static void binder_free_proc(struct binder_proc *proc); > static void binder_inc_node_tmpref_ilocked(struct binder_node *node); > > +struct files_struct *binder_get_files_struct(struct binder_proc *proc) T

Re: [PATCH] binder: fix proc->files use-after-free

2017-11-16 Thread Greg KH
On Thu, Nov 16, 2017 at 09:48:13AM -0800, Todd Kjos wrote: > > @@ -875,22 +871,34 @@ static void binder_free_thread(struct binder_thread > > *thread); > > static void binder_free_proc(struct binder_proc *proc); > > static void binder_inc_node_tmpref_ilocked(struct binder_node *node); > > > > +st

Re: [PATCH v3 1/6] ANDROID: binder: add support for RT prio inheritance.

2017-11-16 Thread Peter Zijlstra
On Thu, Nov 16, 2017 at 02:03:13PM +0100, Martijn Coenen wrote: > On Thu, Nov 16, 2017 at 12:27 PM, Peter Zijlstra wrote: > > But that's exactly what you get!? How would it ever get below > > min_node_prio? PI only ever (temporarily) raises prio, it never lowers > > it. > > Ah I guess we have di

Re: [PATCH] staging: comedi: ni_atmio: Handle return value of pnp_*

2017-11-16 Thread Ian Abbott
On 16/11/17 04:32, Arvind Yadav wrote: pnp_irq() and pnp_port_start() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- drivers/staging/comedi/drivers/ni_atmio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/comedi/drivers/ni_atmio.c

Re: [PATCH v3 1/6] ANDROID: binder: add support for RT prio inheritance.

2017-11-16 Thread Martijn Coenen
On Thu, Nov 16, 2017 at 12:27 PM, Peter Zijlstra wrote: >> On Wed, Nov 15, 2017 at 2:01 PM, Peter Zijlstra wrote: >> >> + * 1) binder supports a "minimum node priority", meaning that all >> >> transactions >> >> + *into a node must run at this priority at a minimum. This means >> >> that th

Re: [PATCH v3 1/6] ANDROID: binder: add support for RT prio inheritance.

2017-11-16 Thread Peter Zijlstra
On Thu, Nov 16, 2017 at 10:18:00AM +0100, Martijn Coenen wrote: > Thanks Peter for looking at this, more inline. So I think I'm having a very hard time understanding things because I've no idea how android works. I've made a number of assumptions below; please bear with me. > On Wed, Nov 15, 2017

Re: [PATCH] staging: wilc1000: Fix bssid buffer offset in Txq

2017-11-16 Thread Claudiu Beznea
Hi Aditya, My problem is fixed with this patch. WILC1000 connects to AP, IP is retrieved from DHCP server and ping works. You can add my Tested-by: Claudiu Beznea Thanks, Claudiu On 03.11.2017 10:56, Aditya Shankar wrote: > Commit 46949b48568b ("staging: wilc1000: New cfg packet > format in ha

Re: [PATCH v3 2/6] ANDROID: binder: add min sched_policy to node.

2017-11-16 Thread Martijn Coenen
On Wed, Nov 15, 2017 at 2:02 PM, Peter Zijlstra wrote: >> Internally, we use the priority map that the kernel >> uses, e.g. [0..99] for real-time policies and [100..139] >> for the SCHED_NORMAL/SCHED_BATCH policies. > > I will break that without consideration if I have to. That really isn't > some

Re: [PATCH v3 4/6] ANDROID: binder: add RT inheritance flag to node.

2017-11-16 Thread Martijn Coenen
On Wed, Nov 15, 2017 at 2:05 PM, Peter Zijlstra wrote: > On Thu, Oct 26, 2017 at 04:07:48PM +0200, Martijn Coenen wrote: >> Allows a binder node to specify whether it wants to >> inherit real-time scheduling policy from a caller. This >> inheritance may not always be desirable, for example in >> c

Re: [PATCH v3 3/6] ANDROID: binder: improve priority inheritance.

2017-11-16 Thread Martijn Coenen
On Wed, Nov 15, 2017 at 2:03 PM, Peter Zijlstra wrote: > On Thu, Oct 26, 2017 at 04:07:47PM +0200, Martijn Coenen wrote: >> By raising the priority of a thread selected for >> a transaction *before* we wake it up. >> >> Delay restoring the priority when doing a reply >> until after we wake-up the

Re: [PATCH 0/9] posix_clocks: Prepare syscalls for 64 bit time_t conversion

2017-11-16 Thread Thomas Gleixner
On Wed, 15 Nov 2017, Deepa Dinamani wrote: > > I had on concern about x32, maybe we should check > > for "COMPAT_USE_64BIT_TIME" before zeroing out the tv_nsec > > bits. > > Thanks, I think you are right. I had the check conditional on > CONFIG_64BIT_TIME and then removed as I forgot why I added i

Re: [PATCH v3 1/6] ANDROID: binder: add support for RT prio inheritance.

2017-11-16 Thread Martijn Coenen
Thanks Peter for looking at this, more inline. On Wed, Nov 15, 2017 at 2:01 PM, Peter Zijlstra wrote: >> + * 1) binder supports a "minimum node priority", meaning that all >> transactions >> + *into a node must run at this priority at a minimum. This means that >> the >> + *desired prio