Hi Paul,
On Tue, Apr 14, 2015 at 09:19:29PM +0200, Paul Bolle wrote:
> On Tue, 2015-04-14 at 01:06 +0300, Sergei Zviagintsev wrote:
> > Commit f52cbe4c9838 ("nfs: generic_write_checks() shouldn't be done on
> > swapout...") caused unused variable build war
Add KDBUS_CMD_BUS_CREATOR_INFO.
Signed-off-by: Sergei Zviagintsev
---
Documentation/kdbus/kdbus.pool.xml | 6 ++
1 file changed, 6 insertions(+)
diff --git a/Documentation/kdbus/kdbus.pool.xml
b/Documentation/kdbus/kdbus.pool.xml
index 05fd01902ad4..a9e16f196d39 100644
--- a/Documentation
Signed-off-by: Sergei Zviagintsev
---
Documentation/kdbus/kdbus.bus.xml| 9 -
Documentation/kdbus/kdbus.connection.xml | 10 --
Documentation/kdbus/kdbus.endpoint.xml | 2 +-
Documentation/kdbus/kdbus.item.xml | 9 -
Documentation/kdbus/kdbus.match.xml
Remove EEXIST.
Signed-off-by: Sergei Zviagintsev
---
Documentation/kdbus/kdbus.endpoint.xml | 7 ---
1 file changed, 7 deletions(-)
diff --git a/Documentation/kdbus/kdbus.endpoint.xml
b/Documentation/kdbus/kdbus.endpoint.xml
index f3eb4f8c58ce..6632485f3e84 100644
--- a/Documentation
Signed-off-by: Sergei Zviagintsev
---
include/uapi/linux/kdbus.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/kdbus.h b/include/uapi/linux/kdbus.h
index 2fe0a1c5056c..00a6e142c977 100644
--- a/include/uapi/linux/kdbus.h
+++ b/include/uapi/linux/kdbus.h
end trace a676bcfa75db5a96 ]---
Use __vfs_read() instead.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/pool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ipc/kdbus/pool.c b/ipc/kdbus/pool.c
index 139bb77056b3..45dcdea505f4 100644
--- a/ipc/kdbus/pool.c
+++ b/ipc
Remove EOL whitespaces added by commit 4961772560d2
("infinibad: weird APIs switched to ->write_iter()")
Signed-off-by: Sergei Zviagintsev
---
drivers/infiniband/hw/qib/qib_file_ops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/qib/qib_
Signed-off-by: Sergei Zviagintsev
---
Documentation/kdbus/kdbus.message.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/kdbus/kdbus.message.xml
b/Documentation/kdbus/kdbus.message.xml
index 061a407d50c7..0115d9d50db3 100644
--- a/Documentation/kdbus
Hi Lukasz,
On Mon, Apr 13, 2015 at 04:14:06PM +0200, Lukasz Skalski wrote:
> As it was discussed on systemd ML [1], the same connection should be
> queued up only once for a given well-known name.
>
> [1] http://lists.freedesktop.org/archives/systemd-devel/2015-April/030494.html
>
> Signed-off-b
Commit f52cbe4c9838 ("nfs: generic_write_checks() shouldn't be done on
swapout...") caused unused variable build warning in fs/nfs/file.c
when CONFIG_SUNRPC_DEBUG is not set as pos variable is used only in
dprintk() call. Fix it.
Signed-off-by: Sergei Zviagintsev
Fixes: f52
Assign returned file descriptor directly to `fd', without intermediate
`ret' variable.
Signed-off-by: Sergei Zviagintsev
---
tools/testing/selftests/kdbus/kdbus-util.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/kdbus/kdbus-util.
Fix typo in checking error value of cap_get_proc(): cap -> caps
Signed-off-by: Sergei Zviagintsev
---
tools/testing/selftests/kdbus/kdbus-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kdbus/kdbus-util.c
b/tools/testing/selftests/kdbus/kd
Set value of `size' in one step instead of four.
Signed-off-by: Sergei Zviagintsev
---
tools/testing/selftests/kdbus/kdbus-util.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tools/testing/selftests/kdbus/kdbus-util.c
b/tools/testing/selftests/kdbus/kdbus-u
Do not initialize efd, unpriv_conn_id, userns_conn_id and monitor. These
vars are assigned to values later in code while initial values are never
used.
Signed-off-by: Sergei Zviagintsev
---
tools/testing/selftests/kdbus/test-metadata-ns.c | 9 +++--
1 file changed, 3 insertions(+), 6
Handle errors properly, free allocated resources.
Signed-off-by: Sergei Zviagintsev
---
tools/testing/selftests/kdbus/kdbus-util.c | 31 ++
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/tools/testing/selftests/kdbus/kdbus-util.c
b/tools/testing
...@s15v.net
http://lkml.kernel.org/g/1434550697-24785-3-git-send-email-ser...@s15v.net
http://lkml.kernel.org/g/1434550697-24785-4-git-send-email-ser...@s15v.net
http://lkml.kernel.org/g/1434550697-24785-5-git-send-email-ser...@s15v.net
Sergei Zviagintsev (5):
selftests/kdbus: handle cap_get_proc
Do not initialize efd, unpriv_conn_id, userns_conn_id and monitor. These
vars are assigned to values later in code while initial values are never
used.
Signed-off-by: Sergei Zviagintsev
---
tools/testing/selftests/kdbus/test-metadata-ns.c | 9 +++--
1 file changed, 3 insertions(+), 6
Assign returned file descriptor directly to `fd', without intermediate
`ret' variable.
Signed-off-by: Sergei Zviagintsev
---
tools/testing/selftests/kdbus/kdbus-util.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/kdbus/kdbus-util.
Set value of `size' in one step instead of four.
Signed-off-by: Sergei Zviagintsev
---
tools/testing/selftests/kdbus/kdbus-util.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tools/testing/selftests/kdbus/kdbus-util.c
b/tools/testing/selftests/kdbus/kdbus-u
Handle errors properly, free allocated resources.
Signed-off-by: Sergei Zviagintsev
---
tools/testing/selftests/kdbus/kdbus-util.c | 31 ++
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/tools/testing/selftests/kdbus/kdbus-util.c
b/tools/testing
Fix typo in checking error value of cap_get_proc(): cap -> caps
Signed-off-by: Sergei Zviagintsev
---
tools/testing/selftests/kdbus/kdbus-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kdbus/kdbus-util.c
b/tools/testing/selftests/kdbus/kd
Hi Greg,
On Wed, Jun 17, 2015 at 07:37:20AM -0700, Greg Kroah-Hartman wrote:
> You sent 5 patches, yet no hints as to what order they should be applied
> in :(
>
> Please resend in a patch series that is properly threaded so we can
> handle this correctly.
Thank you for feedback! I've resent ser
Return found entry immediately instead of assigning it to additional
variable and breaking the loop. It's simpler to read, the same way is
used in kdbus_conn_has_name(), for example.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/reply.c | 10 --
1 file changed, 4 insertions(
Little improvements to make things easier to read.
Sergei Zviagintsev (3):
kdbus: kdbus_reply_find(): return on found entry
kdbus: optimize error path in kdbus_reply_new()
kdbus: optimize if statements in kdbus_conn_disconnect()
ipc/kdbus/connection.c | 15 +++
ipc/kdbus
Move cleanup code to separate location as it never executes on normal
flow. This removes extra if-block and the need to initialize `ret'.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/reply.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/ipc/kdbus/repl
if (r->sync) branch and code after it both call kdbus_reply_unlink().
Rewrite them as if-else to eliminate code duplication and make algorithm
more obvious.
Convert outer if statement to use continue in order to reduce
indentation and make things easier to read.
Signed-off-by: Sergei Zviagint
KDBUS_ITEM_PAYLOAD_VEC and KDBUS_ITEM_PAYLOAD_OFF cases use literally
the same code, so merge them.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/item.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/ipc/kdbus/item.c b/ipc/kdbus/item.c
index 745ad5495096..1ee72c2ad7c3 100644
--- a
kdbus_sync_reply_wakeup() doesn't remove reply object from connection
reply_list. Update function description.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/reply.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ipc/kdbus/reply.c b/ipc/kdbus/reply.c
index 008dca8
We don't need to check `entry' for error, as in either case it is
returned as is. Return result of kdbus_queue_entry_new() directly.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/connection.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/ipc/kdbus/conn
Local `bus' is already set to `conn->ep->bus'. Use it.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/connection.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ipc/kdbus/connection.c b/ipc/kdbus/connection.c
index b00872edbbc9..b9f13749a748 100644
sizeof(((_t *)0)->_m) -> FIELD_SIZEOF(_t, _m)
Use conventional macro according to chapter 17 of
Documentation/CodingStyle.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/util.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ipc/kdbus/util.h b/ipc/kdbus/util.h
). Update documentation example.
List macroses (e.g. list_for_each) were taken as an example for this
change.
Signed-off-by: Sergei Zviagintsev
---
Documentation/kdbus/kdbus.item.xml | 4 ++--
ipc/kdbus/item.h | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a
. Update documentation.
Signed-off-by: Sergei Zviagintsev
---
Documentation/kdbus/kdbus.item.xml | 2 +-
ipc/kdbus/item.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/kdbus/kdbus.item.xml
b/Documentation/kdbus/kdbus.item.xml
index
Hi David,
On Thu, Jun 04, 2015 at 01:29:22PM +0200, David Herrmann wrote:
> Hi
>
> On Thu, Jun 4, 2015 at 12:39 PM, Sergei Zviagintsev wrote:
> > _i is used as loop cursor and must be a proper lvalue, whereas two other
> > arguments can be complex expressions. Stay uniform
Hi,
On Thu, Jun 04, 2015 at 01:49:15PM +0200, Frans Klaver wrote:
> On Thu, Jun 4, 2015 at 12:39 PM, Sergei Zviagintsev wrote:
> > macroses
>
> Sounds like a kind of rash or so ;-). 'macros' would probably sound better.
Oh, now I see the difference :) Thank you for cor
Hi,
On Thu, Jun 04, 2015 at 01:26:03PM +0200, David Herrmann wrote:
> Hi
>
> On Thu, Jun 4, 2015 at 12:39 PM, Sergei Zviagintsev wrote:
> > KDBUS_ITEM_NEXT and KDBUS_ITEMS_END macroses do not enclose _i argument
> > into parentheses when applying the cast operator.
Signed-off-by: Sergei Zviagintsev
---
tools/testing/selftests/kdbus/kdbus-enum.h | 1 +
tools/testing/selftests/kdbus/kdbus-util.c | 2 +-
tools/testing/selftests/kdbus/kdbus-util.h | 21 +
3 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/tools/testing
as similar issue, missing parentheses around
`_h' when using indirection operator.
Use parentheses properly to guarantee right precedence.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/item.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ipc/kdbus/item.h b/ipc/kdb
Enclose all arguments into parentheses to stay consistent across the
whole macro.
Signed-off-by: Sergei Zviagintsev
---
Documentation/kdbus/kdbus.item.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/kdbus/kdbus.item.xml
b/Documentation/kdbus
ntee right precedence.
Signed-off-by: Sergei Zviagintsev
---
Documentation/kdbus/kdbus.item.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/kdbus/kdbus.item.xml
b/Documentation/kdbus/kdbus.item.xml
index 09f8b903116f..b0f995af 100644
--- a/Documenta
selftests/kdbus
Sergei Zviagintsev (10):
kdbus: fix operator precedence issues in item macros
kdbus: use parentheses uniformly in KDBUS_ITEMS_FOREACH macro
Documentation/kdbus: fix operator precedence issue in KDBUS_ITEM_NEXT
macro
Documentation/kdbus: use parentheses uniformly in
Signed-off-by: Sergei Zviagintsev
---
samples/kdbus/kdbus-api.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/kdbus/kdbus-api.h b/samples/kdbus/kdbus-api.h
index 5ed5907c5cb4..2de4d6a8c51e 100644
--- a/samples/kdbus/kdbus-api.h
+++ b/samples/kdbus/kdbus-api.h
precedence.
Signed-off-by: Sergei Zviagintsev
---
samples/kdbus/kdbus-api.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/kdbus/kdbus-api.h b/samples/kdbus/kdbus-api.h
index 2de4d6a8c51e..fab873b89d97 100644
--- a/samples/kdbus/kdbus-api.h
+++ b/samples/kdbus/kdbus-api
Enclose all arguments into parentheses to stay consistent across the
whole macro.
Signed-off-by: Sergei Zviagintsev
---
samples/kdbus/kdbus-api.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/samples/kdbus/kdbus-api.h b/samples/kdbus/kdbus-api.h
index fab873b89d97
e, missing parentheses around
`clone_ret' when using indirection operator.
Use parentheses properly to guarantee right precedence.
Signed-off-by: Sergei Zviagintsev
---
tools/testing/selftests/kdbus/kdbus-util.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/te
Enclose all arguments into parentheses in KDBUS_ITEM_FOREACH and
KDBUS_FOREACH macros to stay consistent across the whole macro.
Signed-off-by: Sergei Zviagintsev
---
tools/testing/selftests/kdbus/kdbus-util.h | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools
Enclose all arguments into parentheses to stay consistent across the
whole macro.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/item.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ipc/kdbus/item.h b/ipc/kdbus/item.h
index 32909e2e7954..bca63b4e6e80 100644
--- a/ipc
Hi
On Wed, Jun 10, 2015 at 04:13:49PM +0200, David Herrmann wrote:
> Next time, please merge most of these changes to reduce the number of
> patches and review-overhead. But looks all good to me, much
> appreciated.
Thank you for response, I will keep that in mind.
--
To unsubscribe from this lis
Hi David,
On Mon, Jul 06, 2015 at 08:48:26PM +0200, David Herrmann wrote:
> Hi
>
> On Sun, Jun 28, 2015 at 3:17 PM, Sergei Zviagintsev wrote:
> > Hi,
> >
> > Main points here are to use conventional types, rewrite tests in obvious
> > way, add couple of new W
Hi,
On Wed, Jul 08, 2015 at 12:25:06PM +0200, Paul Osmialowski wrote:
> This adds implementation of three smack callbacks sitting behind kdbus
> security hooks as proposed by Karol Lewandowski.
>
> Originates from:
>
> git://git.infradead.org/users/pcmoore/selinux (branch: working-kdbus)
> commi
Hi,
On Wed, Jul 08, 2015 at 02:12:03PM +0200, Paul Osmialowski wrote:
[...]
>
> + ret = security_kdbus_bus_alloc(b);
> + if (ret) {
> + goto exit_unref;
> + }
checkpatch.pl will complain about this
--
To unsubscribe from this list: send the line "unsubscribe linux-kerne
Hi,
On Mon, Jun 29, 2015 at 06:44:23PM +0200, Dr. H. Nikolaus Schaller wrote:
[...]
> >> + list_for_each_entry(uart, &uart_list, head) {
> >> + if (node != uart->dev->of_node)
> >> + continue;
> >> +
> >> + return uart;
> >
> > We can easily save three lines he
Hi,
I left some comments below.
On Sun, Jun 28, 2015 at 09:46:26PM +0200, Marek Belisko wrote:
> From: "H. Nikolaus Schaller"
>
> Add driver for Wi2Wi w2g004 GPS module connected through uart. Use uart
> slave + notification hooks to glue with tty.
>
> Signed-off-by: H. Nikolaus Schaller
> S
Hi,
On Thu, Jul 02, 2015 at 10:31:48AM +0200, David Herrmann wrote:
> Hi
>
> On Sun, Jun 28, 2015 at 3:17 PM, Sergei Zviagintsev wrote:
> > Signed-off-by: Sergei Zviagintsev
> > ---
> > ipc/kdbus/connection.c | 4 ++--
> > 1 file changed, 2 insertions(+),
Hi,
On Thu, Jul 02, 2015 at 10:37:05AM +0200, David Herrmann wrote:
> Hi
>
> On Sun, Jun 28, 2015 at 3:17 PM, Sergei Zviagintsev wrote:
> > If we spotted inconsistency, fix it by setting values to zero.
>
> Why?
>
> I prefer doing nothing and just bailing out on pr
Hi David,
Thank you for reviewing and providing comments on these all! I answered below.
On Thu, Jul 02, 2015 at 10:50:47AM +0200, David Herrmann wrote:
> Hi
>
> On Sun, Jun 28, 2015 at 3:17 PM, Sergei Zviagintsev wrote:
> > 1) Rewrite
> >
> > quota
Hi,
On Thu, Jul 02, 2015 at 10:35:30AM +0200, David Herrmann wrote:
> Hi
>
> On Sun, Jun 28, 2015 at 3:17 PM, Sergei Zviagintsev wrote:
> > Replace the use of max() with explicit and obvious overflow check.
> >
> > Signed-off-by: Sergei Zviagintsev
> > --
Hi Djalal,
On Thu, Jul 02, 2015 at 03:13:41PM +0100, Djalal Harouni wrote:
[...]
> > My journey with this piece of code began from spotting and immediately
> > "fixing" the overflow issue :) Then I decided to dig into the
> > out-of-tree repo to find the origin of this line. What I found were
> >
Add description of KDBUS_NAME_PRIMARY and KDBUS_NAME_ACQUIRED flags
which were added in commit 0486b859f05a ("kdbus: inform caller about
exact updates on NAME_ACQUIRE").
Signed-off-by: Sergei Zviagintsev
---
Documentation/kdbus/kdbus.name.xml | 42 +++-
Add comment on why we remove the same slice from free slices tree and
then add it back again when merging the slice to be released with
previous free slice.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/pool.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/ipc/kdbus/pool.c b/ipc
- Fix typos and spelling errors, use proper case.
- struct kdbus_pids: Add PPID to description.
- struct kdbus_item: Add missing @pids, @fsd and
KDBUS_ITEM_PAYLOAD_OFF.
Signed-off-by: Sergei Zviagintsev
---
include/uapi/linux/kdbus.h | 43 +++
1
layout of this, split/join, etc if necessary.
Thanks, Sergei
Sergei Zviagintsev (44):
Documentation/kdbus: Document new name registry flags
uapi: kdbus.h: Kernel-doc fixes
kdbus: Kernel-docs and comments trivial fixes
kdbus: Update kernel-doc for struct kdbus_pool
kdbus: Add comment on
Add words on how free and busy slices trees are sorted.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/pool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ipc/kdbus/pool.c b/ipc/kdbus/pool.c
index 0433e26b777e..84afe96fbc22 100644
--- a/ipc/kdbus/pool.c
+++ b/ipc
We already reached the end of function at this point, so remove useless
goto.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/names.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/ipc/kdbus/names.c b/ipc/kdbus/names.c
index 4dea83defc8e..a1c3442f8e53 100644
--- a/ipc/kdbus/names.c
+++ b
in `quota->fds + fds' to be safe in the second
expression (as fds is size_t, quota->fds is converted to bigger
type).
Rewrite it in more obvious way. KDBUS_CONN_MAX_FDS_PER_USER is
checked at compile time to fill in quota->fds type (there is
BUILD_BUG_ON), so no fu
!name == (is_activator || is_policy_holder)
- Drop `privileged' var which is used only once to set value of
conn->privileged.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/connection.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/ipc/kdbus/connection.
Use list_next_entry() and list_prev_entry().
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/pool.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/ipc/kdbus/pool.c b/ipc/kdbus/pool.c
index c26ef963d8d1..cb692a35755b 100644
--- a/ipc/kdbus/pool.c
+++ b/ipc/kdbus/pool.c
Allow to reserve N elements in row. This eliminates duplicated code.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/message.c | 22 --
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/ipc/kdbus/message.c b/ipc/kdbus/message.c
index e337b1b1024a..f2176796390d
Check the value of `ret' instead of keeping separate exit point.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/pool.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/ipc/kdbus/pool.c b/ipc/kdbus/pool.c
index cb692a35755b..75a7366baa34 100644
--- a/ipc/kdbus/p
Replace duplicated cleanup code with jump to exit point.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/message.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ipc/kdbus/message.c b/ipc/kdbus/message.c
index c7ef23d40471..e337b1b1024a 100644
--- a/ipc/kdbus/message.c
Use list_next_entry() instead of list_first_entry().
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/queue.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ipc/kdbus/queue.c b/ipc/kdbus/queue.c
index f9c44d7bae6d..90e8d16f5967 100644
--- a/ipc/kdbus/queue.c
+++ b/ipc
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/names.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/ipc/kdbus/names.c b/ipc/kdbus/names.c
index bf44ca3f12b6..6b31b38ac2ad 100644
--- a/ipc/kdbus/names.c
+++ b/ipc/kdbus/names.c
@@ -438,10 +438,7 @@ static void
#x27; name is more consistent
with the `owner' var, as it can be read "cred is a member of user_ns or
one of its parents" and "cred is the owner of ...".
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/metadata.c | 6 +++---
1 file changed, 3 insertions(+), 3 deleti
'(s & m) != m' means that mask 'm' contains some bits which are not set
in 's', and this is literally equal to '~s & m'.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
Do not initialize `name' and `ret' as values are assigned to them at
the first use by kdbus_pin_dst(). Simplify handling of
kdbus_conn_entry_insert() return value and drop useless goto.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/connection.c | 10 --
1 file changed, 4
ain' in error
path, which is equivalent but more concise and readable (as we used
same vars in the code above).
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/domain.c | 26 --
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/ipc/kdbus
se and readable.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/item.c | 26 ++
1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/ipc/kdbus/item.c b/ipc/kdbus/item.c
index ce78dba03426..e6b6e2ca7e05 100644
--- a/ipc/kdbus/item.c
+++ b/ipc/kdbus/item.c
@
- Assign `false' to *out_incomplete directly on no-op cases.
- Initialize `ret' with zero during declaration instead of doing it in
the end of the function.
- Initialize `fd' and `memfd' vars during declaration to be more
concise.
Signed-off-by: Sergei Zviagin
If we failed to allocate a file descriptor, do not try to do it again on
the next iteration. There are few chances that we will have success, and
we can simplify the algorithm assuming that valid fd numbers are not
mixed with -1 values.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/message.c
If idr_alloc() fails, we shouldn't call idr_remove() as latter produces
warning when called on non-allocated ids. Split cleanup code into three
parts for differrent cleanup scenarios before and after idr_alloc().
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/domain.c
Current code checks return value of task_cgroup_path(), which can be
NULL if provided buffer isn't long enough to store path there, but
alters mp->valid in case of error, producing inconsistency. Return
-ENAMETOOLONG if task_cgroup_path() fails.
Signed-off-by: Sergei Zviagintsev
---
i
Use conventional if-else logic instead of goto, which makes the function
easier to read.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/queue.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/ipc/kdbus/queue.c b/ipc/kdbus/queue.c
index
Elements of `fds' array were set to -1 in case if we couldn't allocate
a fd. Verify that element contains a valid fd number before submitting
it to put_unused_fd().
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/message.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
di
ee file descriptor for memfd.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/message.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ipc/kdbus/message.c b/ipc/kdbus/message.c
index f2176796390d..0653a085c104 100644
--- a/ipc/kdbus/message.c
+++ b/ipc/kdbus/message.c
@@ -181,6 +181,7 @@ int
Use goto to handle error paths in conventional way.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/names.c | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/ipc/kdbus/names.c b/ipc/kdbus/names.c
index a1c3442f8e53..8e53681d1b7b 100644
--- a/ipc/kdbus
inary operation
In 'proc < KDBUS_META_PROC_NORMAL' case we firstly do
'wanted &= ~flags' and then 'wanted & flags' in the return statement,
which is the same as 'wanted & 0'. Return 0 instead.
- Cosmetic cleanup of the r
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/connection.h | 18 +++---
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/ipc/kdbus/connection.h b/ipc/kdbus/connection.h
index 679f393d3e68..3b382b604348 100644
--- a/ipc/kdbus/connection.h
+++ b/ipc/kdbus/connection.h
Use goto to handle error paths in conventional way. Use conditional
operator instead of `remote_ret' var. Update the comment on waking up
remote peer.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/connection.c | 52 --
1 file change
- Move `r' and `ret' to scopes where they are used. Drop redundant
initialization of `ret'.
- Initialize `bus' on declaration.
- Replace list_for_each_entry_safe() with list_for_each_entry() when
iterating over list of replies.
- Drop redundant `continue'
Remove separate exit point as the only error case in the function is
when kdbus_staging_emit() fails. Assign a slice to temporary var first
to not clear it explicitly on error and to return an error code without
`ret' variable.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/queue.c
- Reduce scope of `owner' var to the block where it is actually used.
Use conditional operator to set its value.
- Drop initialization of `dst' as it gets value later.
- Drop separate exit point as we have only one use case of it.
Signed-off-by: Sergei Zviagintsev
---
- Remove redundant goto.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/connection.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/ipc/kdbus/connection.c b/ipc/kdbus/connection.c
index b3c5f20a57d8..6a73ac3f444d 100644
--- a/ipc/kdbus/connection.c
+++
to zero is unnecessary because
kdbus_conn_entry_insert() returns 0 on success.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/connection.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/ipc/kdbus/connection.c b/ipc/kdbus/connection.c
index a4d7414ecaea..db49f282a1bf 100644
---
Rearrange tests a little to make them look cleaner.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/connection.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/ipc/kdbus/connection.c b/ipc/kdbus/connection.c
index 93da7f539f74..a4d7414ecaea 100644
--- a/ipc/kdbus
Do not initialize `c' as it is assigned a return value of
kdbus_conn_new() at the first use.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/connection.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ipc/kdbus/connection.c b/ipc/kdbus/connection.c
index 4b5ed4b
`name' is assigned the value at first use by kdbus_pin_dst(). Do not
initialize it during declaration.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/connection.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ipc/kdbus/connection.c b/ipc/kdbus/connection.c
Assign zero to `ret' in the beginning of function instead of doing it
in the end.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/connection.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/ipc/kdbus/connection.c b/ipc/kdbus/connection.c
index 4f3cd370ecd9..185ed3b
Replace the expression with more concise and readable equivalent. It can
be proven by opening parentheses:
r & ~((p | i) & r) == r & (~(p | i) | ~r) ==
(r & ~(p | i)) | (r & ~r) == r & ~(p | i) == r & ~p & ~i
Signed-off-by: Sergei Zviagintsev
---
ipc
Initialize `dot' during declaration but not in the for-loop, as it is
not used as a loop cursor.
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/names.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ipc/kdbus/names.c b/ipc/kdbus/names.c
index 6b31b38ac2ad..4dea83d
Signed-off-by: Sergei Zviagintsev
---
ipc/kdbus/limits.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/ipc/kdbus/limits.h b/ipc/kdbus/limits.h
index bd47119cdf1b..5e4d2b5b0a9d 100644
--- a/ipc/kdbus/limits.h
+++ b/ipc/kdbus/limits.h
@@ -16,9 +16,6 @@
#include
-/* maximum size of
1 - 100 of 128 matches
Mail list logo