Re: [PATCH] ipc/util.c: sysvipc_find_ipc() incorrectly updates position index

2020-05-12 Thread Vasily Averin
On 5/12/20 12:21 PM, Jiri Slaby wrote: > On 08. 05. 20, 12:01, Vasily Averin wrote: >> On 5/8/20 9:07 AM, Vasily Averin wrote: >>> On 5/8/20 6:36 AM, Matthew Wilcox wrote: On Thu, May 07, 2020 at 05:02:42PM -0700, Andrew Morton wrote: > Here's how I resolved things. Please check? >

Re: [PATCH] ipc/util.c: sysvipc_find_ipc() incorrectly updates position index

2020-05-12 Thread Jiri Slaby
On 08. 05. 20, 12:01, Vasily Averin wrote: > On 5/8/20 9:07 AM, Vasily Averin wrote: >> On 5/8/20 6:36 AM, Matthew Wilcox wrote: >>> On Thu, May 07, 2020 at 05:02:42PM -0700, Andrew Morton wrote: Here's how I resolved things. Please check? static struct kern_ipc_perm

Re: [PATCH] ipc/util.c: sysvipc_find_ipc() incorrectly updates position index

2020-05-08 Thread Vasily Averin
On 5/8/20 9:07 AM, Vasily Averin wrote: > On 5/8/20 6:36 AM, Matthew Wilcox wrote: >> On Thu, May 07, 2020 at 05:02:42PM -0700, Andrew Morton wrote: >>> Here's how I resolved things. Please check? >>> >>> static struct kern_ipc_perm *sysvipc_find_ipc(struct ipc_ids *ids, loff_t >>> pos, >>>

Re: [PATCH] ipc/util.c: sysvipc_find_ipc() incorrectly updates position index

2020-05-08 Thread Vasily Averin
On 5/8/20 6:36 AM, Matthew Wilcox wrote: > On Thu, May 07, 2020 at 05:02:42PM -0700, Andrew Morton wrote: >> Here's how I resolved things. Please check? >> >> static struct kern_ipc_perm *sysvipc_find_ipc(struct ipc_ids *ids, loff_t >> pos, >>loff_t

Re: [PATCH] ipc/util.c: sysvipc_find_ipc() incorrectly updates position index

2020-05-07 Thread Matthew Wilcox
On Thu, May 07, 2020 at 05:02:42PM -0700, Andrew Morton wrote: > Here's how I resolved things. Please check? > > static struct kern_ipc_perm *sysvipc_find_ipc(struct ipc_ids *ids, loff_t pos, > loff_t *new_pos) > { > unsigned long index = pos; >

Re: [PATCH] ipc/util.c: sysvipc_find_ipc() incorrectly updates position index

2020-05-07 Thread Andrew Morton
On Wed, 6 May 2020 09:25:54 +0300 Vasily Averin wrote: > new_pos should jump through hole of unused ids, > pos can be updated inside "for" cycle. > > Cc: sta...@vger.kernel.org > Fixes: 89163f93c6f9 ("ipc/util.c: sysvipc_find_ipc() should increase position > index") This: > --- a/ipc/util.c

Re: [PATCH] ipc/util.c: sysvipc_find_ipc() incorrectly updates position index

2020-05-07 Thread Vasily Averin
Dear Andrew, could you please handle it, it fixes broken ipcs in last mainline and stable kernels, and on all its derivatives. Thank you, Vasily Averin On 5/6/20 6:59 PM, Waiman Long wrote: > On 5/6/20 2:25 AM, Vasily Averin wrote: >> new_pos should jump through hole of unused ids, >>

Re: [PATCH] ipc/util.c: sysvipc_find_ipc() incorrectly updates position index

2020-05-06 Thread Waiman Long
On 5/6/20 2:25 AM, Vasily Averin wrote: new_pos should jump through hole of unused ids, pos can be updated inside "for" cycle. Cc: sta...@vger.kernel.org Fixes: 89163f93c6f9 ("ipc/util.c: sysvipc_find_ipc() should increase position index") Signed-off-by: Vasily Averin --- ipc/util.c | 12

[PATCH] ipc/util.c: sysvipc_find_ipc() incorrectly updates position index

2020-05-06 Thread Vasily Averin
new_pos should jump through hole of unused ids, pos can be updated inside "for" cycle. Cc: sta...@vger.kernel.org Fixes: 89163f93c6f9 ("ipc/util.c: sysvipc_find_ipc() should increase position index") Signed-off-by: Vasily Averin --- ipc/util.c | 12 ++-- 1 file changed, 6