public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] *** SUBJECT HERE ***
@ 2013-05-22 12:07 yizhang.mrvl
  2013-05-22 14:06 ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: yizhang.mrvl @ 2013-05-22 12:07 UTC (permalink / raw)
  To: sameo, gregkh, yizhang.mrvl; +Cc: cxie4, arnd, yizhang, linux-kernel

From: Yi Zhang <yizhang@marvell.com>

These patches fix 88pm800 bugs and add regulator support

Yi Zhang (3):
  mfd: 88pm800: remove "IRQF_TRIGGER_FALLING" flag
  mfd: 88pm800: fix probe bug
  mfd: 88pm800: add regulator support

 drivers/mfd/88pm800.c       |  139 ++++++++++++++++++++++++++++++++++++++++---
 include/linux/mfd/88pm80x.h |   48 +++++++++++++++
 2 files changed, 178 insertions(+), 9 deletions(-)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] *** SUBJECT HERE ***
  2013-05-22 12:07 yizhang.mrvl
@ 2013-05-22 14:06 ` Greg KH
  2013-05-23 11:04   ` yi zhang
  0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2013-05-22 14:06 UTC (permalink / raw)
  To: yizhang.mrvl; +Cc: sameo, cxie4, arnd, yizhang, linux-kernel

On Wed, May 22, 2013 at 08:07:05PM +0800, yizhang.mrvl@gmail.com wrote:
> From: Yi Zhang <yizhang@marvell.com>
> 
> These patches fix 88pm800 bugs and add regulator support

What's with the Subject:?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] *** SUBJECT HERE ***
  2013-05-22 14:06 ` Greg KH
@ 2013-05-23 11:04   ` yi zhang
  0 siblings, 0 replies; 9+ messages in thread
From: yi zhang @ 2013-05-23 11:04 UTC (permalink / raw)
  To: Greg KH; +Cc: sameo, cxie4, arnd, Yi Zhang, linux-kernel

2013/5/22 Greg KH <gregkh@linuxfoundation.org>:
> On Wed, May 22, 2013 at 08:07:05PM +0800, yizhang.mrvl@gmail.com wrote:
>> From: Yi Zhang <yizhang@marvell.com>
>>
>> These patches fix 88pm800 bugs and add regulator support
>
> What's with the Subject:?
>

Sorry for my mistake, I'll fix it and send patches again;
thanks;

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 0/3] *** SUBJECT HERE ***
@ 2014-06-13 21:24 Benjamin LaHaise
  2014-06-13 21:24 ` [PATCH 1/3] fs/aio.c: Remove ctx parameter in kiocb_cancel Fabian Frederick
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Benjamin LaHaise @ 2014-06-13 21:24 UTC (permalink / raw)
  To: torvalds; +Cc: linux-aio, linux-fsdevel, linux-kernel

Hello Linus,

Please pull the following 3 changes from git://git.kvack.org/~bcrl/aio-next.git
.  They consist of a couple of code cleanups plus a minor bug fix.  Thanks!

		-ben

Benjamin LaHaise (2):
  aio: report error from io_destroy() when threads race in io_destroy()
  aio: cleanup: flatten kill_ioctx()

Fabian Frederick (1):
  fs/aio.c: Remove ctx parameter in kiocb_cancel

 fs/aio.c | 70 +++++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 36 insertions(+), 34 deletions(-)

-- 
1.8.2.1


-- 
"Thought is the essence of where you are now."

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] fs/aio.c: Remove ctx parameter in kiocb_cancel
  2014-06-13 21:24 [PATCH 0/3] *** SUBJECT HERE *** Benjamin LaHaise
@ 2014-06-13 21:24 ` Fabian Frederick
  2014-06-13 21:24 ` [PATCH 2/3] aio: report error from io_destroy() when threads race in io_destroy() Benjamin LaHaise
  2014-06-13 21:24 ` [PATCH 3/3] aio: cleanup: flatten kill_ioctx() Benjamin LaHaise
  2 siblings, 0 replies; 9+ messages in thread
From: Fabian Frederick @ 2014-06-13 21:24 UTC (permalink / raw)
  To: torvalds; +Cc: linux-aio, linux-fsdevel, linux-kernel

ctx is no longer used in kiocb_cancel since

57282d8fd74407 ("aio: Kill ki_users")

Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
---
 fs/aio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/aio.c b/fs/aio.c
index 2adbb03..908006e 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -477,7 +477,7 @@ void kiocb_set_cancel_fn(struct kiocb *req, kiocb_cancel_fn *cancel)
 }
 EXPORT_SYMBOL(kiocb_set_cancel_fn);
 
-static int kiocb_cancel(struct kioctx *ctx, struct kiocb *kiocb)
+static int kiocb_cancel(struct kiocb *kiocb)
 {
 	kiocb_cancel_fn *old, *cancel;
 
@@ -538,7 +538,7 @@ static void free_ioctx_users(struct percpu_ref *ref)
 				       struct kiocb, ki_list);
 
 		list_del_init(&req->ki_list);
-		kiocb_cancel(ctx, req);
+		kiocb_cancel(req);
 	}
 
 	spin_unlock_irq(&ctx->ctx_lock);
@@ -1587,7 +1587,7 @@ SYSCALL_DEFINE3(io_cancel, aio_context_t, ctx_id, struct iocb __user *, iocb,
 
 	kiocb = lookup_kiocb(ctx, iocb, key);
 	if (kiocb)
-		ret = kiocb_cancel(ctx, kiocb);
+		ret = kiocb_cancel(kiocb);
 	else
 		ret = -EINVAL;
 
-- 
1.8.2.1


-- 
"Thought is the essence of where you are now."

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] aio: report error from io_destroy() when threads race in io_destroy()
  2014-06-13 21:24 [PATCH 0/3] *** SUBJECT HERE *** Benjamin LaHaise
  2014-06-13 21:24 ` [PATCH 1/3] fs/aio.c: Remove ctx parameter in kiocb_cancel Fabian Frederick
@ 2014-06-13 21:24 ` Benjamin LaHaise
  2014-06-13 21:24 ` [PATCH 3/3] aio: cleanup: flatten kill_ioctx() Benjamin LaHaise
  2 siblings, 0 replies; 9+ messages in thread
From: Benjamin LaHaise @ 2014-06-13 21:24 UTC (permalink / raw)
  To: torvalds; +Cc: linux-aio, linux-fsdevel, linux-kernel

As reported by Anatol Pomozov, io_destroy() fails to report an error when
it loses the race to destroy a given ioctx.  Since there is a difference in
behaviour between the thread that wins the race (which blocks on outstanding
io requests) versus lthe thread that loses (which returns immediately), wire
up a return code from kill_ioctx() to the io_destroy() syscall.

Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
Cc: Anatol Pomozov <anatol.pomozov@gmail.com>
---
 fs/aio.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/fs/aio.c b/fs/aio.c
index 908006e..044c1c8 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -727,7 +727,7 @@ err:
  *	when the processes owning a context have all exited to encourage
  *	the rapid destruction of the kioctx.
  */
-static void kill_ioctx(struct mm_struct *mm, struct kioctx *ctx,
+static int kill_ioctx(struct mm_struct *mm, struct kioctx *ctx,
 		struct completion *requests_done)
 {
 	if (!atomic_xchg(&ctx->dead, 1)) {
@@ -759,10 +759,10 @@ static void kill_ioctx(struct mm_struct *mm, struct kioctx *ctx,
 
 		ctx->requests_done = requests_done;
 		percpu_ref_kill(&ctx->users);
-	} else {
-		if (requests_done)
-			complete(requests_done);
+		return 0;
 	}
+
+	return -EINVAL;
 }
 
 /* wait_on_sync_kiocb:
@@ -1219,21 +1219,23 @@ SYSCALL_DEFINE1(io_destroy, aio_context_t, ctx)
 	if (likely(NULL != ioctx)) {
 		struct completion requests_done =
 			COMPLETION_INITIALIZER_ONSTACK(requests_done);
+		int ret;
 
 		/* Pass requests_done to kill_ioctx() where it can be set
 		 * in a thread-safe way. If we try to set it here then we have
 		 * a race condition if two io_destroy() called simultaneously.
 		 */
-		kill_ioctx(current->mm, ioctx, &requests_done);
+		ret = kill_ioctx(current->mm, ioctx, &requests_done);
 		percpu_ref_put(&ioctx->users);
 
 		/* Wait until all IO for the context are done. Otherwise kernel
 		 * keep using user-space buffers even if user thinks the context
 		 * is destroyed.
 		 */
-		wait_for_completion(&requests_done);
+		if (!ret)
+			wait_for_completion(&requests_done);
 
-		return 0;
+		return ret;
 	}
 	pr_debug("EINVAL: io_destroy: invalid context id\n");
 	return -EINVAL;
-- 
1.8.2.1


-- 
"Thought is the essence of where you are now."

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] aio: cleanup: flatten kill_ioctx()
  2014-06-13 21:24 [PATCH 0/3] *** SUBJECT HERE *** Benjamin LaHaise
  2014-06-13 21:24 ` [PATCH 1/3] fs/aio.c: Remove ctx parameter in kiocb_cancel Fabian Frederick
  2014-06-13 21:24 ` [PATCH 2/3] aio: report error from io_destroy() when threads race in io_destroy() Benjamin LaHaise
@ 2014-06-13 21:24 ` Benjamin LaHaise
  2 siblings, 0 replies; 9+ messages in thread
From: Benjamin LaHaise @ 2014-06-13 21:24 UTC (permalink / raw)
  To: torvalds; +Cc: linux-aio, linux-fsdevel, linux-kernel

There is no need to have most of the code in kill_ioctx() indented.  Flatten
it.

Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
---
 fs/aio.c | 52 ++++++++++++++++++++++++++--------------------------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/fs/aio.c b/fs/aio.c
index 044c1c8..79b7e69 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -730,39 +730,39 @@ err:
 static int kill_ioctx(struct mm_struct *mm, struct kioctx *ctx,
 		struct completion *requests_done)
 {
-	if (!atomic_xchg(&ctx->dead, 1)) {
-		struct kioctx_table *table;
+	struct kioctx_table *table;
 
-		spin_lock(&mm->ioctx_lock);
-		rcu_read_lock();
-		table = rcu_dereference(mm->ioctx_table);
+	if (atomic_xchg(&ctx->dead, 1))
+		return -EINVAL;
 
-		WARN_ON(ctx != table->table[ctx->id]);
-		table->table[ctx->id] = NULL;
-		rcu_read_unlock();
-		spin_unlock(&mm->ioctx_lock);
 
-		/* percpu_ref_kill() will do the necessary call_rcu() */
-		wake_up_all(&ctx->wait);
+	spin_lock(&mm->ioctx_lock);
+	rcu_read_lock();
+	table = rcu_dereference(mm->ioctx_table);
+
+	WARN_ON(ctx != table->table[ctx->id]);
+	table->table[ctx->id] = NULL;
+	rcu_read_unlock();
+	spin_unlock(&mm->ioctx_lock);
 
-		/*
-		 * It'd be more correct to do this in free_ioctx(), after all
-		 * the outstanding kiocbs have finished - but by then io_destroy
-		 * has already returned, so io_setup() could potentially return
-		 * -EAGAIN with no ioctxs actually in use (as far as userspace
-		 *  could tell).
-		 */
-		aio_nr_sub(ctx->max_reqs);
+	/* percpu_ref_kill() will do the necessary call_rcu() */
+	wake_up_all(&ctx->wait);
 
-		if (ctx->mmap_size)
-			vm_munmap(ctx->mmap_base, ctx->mmap_size);
+	/*
+	 * It'd be more correct to do this in free_ioctx(), after all
+	 * the outstanding kiocbs have finished - but by then io_destroy
+	 * has already returned, so io_setup() could potentially return
+	 * -EAGAIN with no ioctxs actually in use (as far as userspace
+	 *  could tell).
+	 */
+	aio_nr_sub(ctx->max_reqs);
 
-		ctx->requests_done = requests_done;
-		percpu_ref_kill(&ctx->users);
-		return 0;
-	}
+	if (ctx->mmap_size)
+		vm_munmap(ctx->mmap_base, ctx->mmap_size);
 
-	return -EINVAL;
+	ctx->requests_done = requests_done;
+	percpu_ref_kill(&ctx->users);
+	return 0;
 }
 
 /* wait_on_sync_kiocb:
-- 
1.8.2.1


-- 
"Thought is the essence of where you are now."

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 0/3] *** SUBJECT HERE ***
@ 2018-09-10 12:19 Adam Thomson
  2018-09-10 12:21 ` Adam Thomson
  0 siblings, 1 reply; 9+ messages in thread
From: Adam Thomson @ 2018-09-10 12:19 UTC (permalink / raw)
  To: Heikki Krogerus, Guenter Roeck, Greg Kroah-Hartman, Rob Herring,
	Mark Rutland, Hans de Goede, Li Jun
  Cc: linux-usb, devicetree, linux-kernel, support.opensource

This patch set adds DT bindings support for PPS APDOs, and updates the FUSB302
to use the generic connector bindings allowing for PPS support in this Type-C
port controller. Existing FUSB302 device specific bindings still work, but
are now deprecated in favour of the generic connector approach.

Changes in v2:
	- Added Reviewed-by tags to patches
	- Rebase code against latest usb-next branch (v4.19-rc2)

Adam Thomson (3):
  dt-bindings: connector: Add support for USB-PD PPS APDOs to bindings
  dt-bindings: usb: fusb302: Use usb-connector bindings for
    configuration
  usb: typec: fusb302: Populate tcpc fwnode for TCPM property handling

 .../bindings/connector/usb-connector.txt           |  8 +++---
 .../devicetree/bindings/usb/fcs,fusb302.txt        | 32 +++++++++++++++++-----
 drivers/usb/typec/fusb302/fusb302.c                |  3 ++
 include/dt-bindings/usb/pd.h                       | 26 ++++++++++++++++++
 4 files changed, 58 insertions(+), 11 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH 0/3] *** SUBJECT HERE ***
  2018-09-10 12:19 [PATCH 0/3] *** SUBJECT HERE *** Adam Thomson
@ 2018-09-10 12:21 ` Adam Thomson
  0 siblings, 0 replies; 9+ messages in thread
From: Adam Thomson @ 2018-09-10 12:21 UTC (permalink / raw)
  To: Adam Thomson, Heikki Krogerus, Guenter Roeck, Greg Kroah-Hartman,
	Rob Herring, Mark Rutland, Hans de Goede, Li Jun
  Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Support Opensource

On 10 September 2018 13:19, Adam Thomson wrote:

> This patch set adds DT bindings support for PPS APDOs, and updates the FUSB302
> to use the generic connector bindings allowing for PPS support in this Type-C
> port controller. Existing FUSB302 device specific bindings still work, but
> are now deprecated in favour of the generic connector approach.

Please ignore as suffering finger trouble. Will resend with patches corrected.

> 
> Changes in v2:
> 	- Added Reviewed-by tags to patches
> 	- Rebase code against latest usb-next branch (v4.19-rc2)
> 
> Adam Thomson (3):
>   dt-bindings: connector: Add support for USB-PD PPS APDOs to bindings
>   dt-bindings: usb: fusb302: Use usb-connector bindings for
>     configuration
>   usb: typec: fusb302: Populate tcpc fwnode for TCPM property handling
> 
>  .../bindings/connector/usb-connector.txt           |  8 +++---
>  .../devicetree/bindings/usb/fcs,fusb302.txt        | 32 +++++++++++++++++-----
>  drivers/usb/typec/fusb302/fusb302.c                |  3 ++
>  include/dt-bindings/usb/pd.h                       | 26 ++++++++++++++++++
>  4 files changed, 58 insertions(+), 11 deletions(-)
> 
> --
> 1.9.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-09-10 12:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13 21:24 [PATCH 0/3] *** SUBJECT HERE *** Benjamin LaHaise
2014-06-13 21:24 ` [PATCH 1/3] fs/aio.c: Remove ctx parameter in kiocb_cancel Fabian Frederick
2014-06-13 21:24 ` [PATCH 2/3] aio: report error from io_destroy() when threads race in io_destroy() Benjamin LaHaise
2014-06-13 21:24 ` [PATCH 3/3] aio: cleanup: flatten kill_ioctx() Benjamin LaHaise
  -- strict thread matches above, loose matches on Subject: below --
2018-09-10 12:19 [PATCH 0/3] *** SUBJECT HERE *** Adam Thomson
2018-09-10 12:21 ` Adam Thomson
2013-05-22 12:07 yizhang.mrvl
2013-05-22 14:06 ` Greg KH
2013-05-23 11:04   ` yi zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox