diff mbox series

[BlueZ,1/2] monitor: Only print credentials if PID is set

Message ID 20230601233317.1419030-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit f84979c1591f8911b1557d454dcfeab56b12a7f1
Headers show
Series [BlueZ,1/2] monitor: Only print credentials if PID is set | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch warning CheckSparse WARNING monitor/packet.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1832:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3552:52: warning: array of flexible structuresmonitor/bt.h:3540:40: warning: array of flexible structures
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Luiz Augusto von Dentz June 1, 2023, 11:33 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If PID is not set don't print anything since this is likely a packet
originated by the kernel itself.
---
 monitor/packet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com June 2, 2023, 12:48 a.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=753319

---Test result---

Test Summary:
CheckPatch                    PASS      1.05 seconds
GitLint                       PASS      0.74 seconds
BuildEll                      PASS      27.23 seconds
BluezMake                     PASS      889.25 seconds
MakeCheck                     PASS      12.26 seconds
MakeDistcheck                 PASS      155.68 seconds
CheckValgrind                 PASS      252.09 seconds
CheckSmatch                   WARNING   341.89 seconds
bluezmakeextell               PASS      103.28 seconds
IncrementalBuild              PASS      1456.56 seconds
ScanBuild                     PASS      1036.99 seconds

Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
monitor/packet.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1832:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3552:52: warning: array of flexible structuresmonitor/bt.h:3540:40: warning: array of flexible structures


---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org June 2, 2023, 7:50 p.m. UTC | #2
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Thu,  1 Jun 2023 16:33:16 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> If PID is not set don't print anything since this is likely a packet
> originated by the kernel itself.
> ---
>  monitor/packet.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [BlueZ,1/2] monitor: Only print credentials if PID is set
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f84979c1591f
  - [BlueZ,2/2] shared/bap: Don't overwrite attribute declaration
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=52477e80fc89

You are awesome, thank you!
diff mbox series

Patch

diff --git a/monitor/packet.c b/monitor/packet.c
index 946ceb2c640d..6d73e5abfcbc 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -438,7 +438,7 @@  static void print_packet(struct timeval *tv, struct ucred *cred, char ident,
 			pos += n;
 	}
 
-	if (cred) {
+	if (cred && cred->pid) {
 		cred_pid(cred, pid_str, sizeof(pid_str));
 		n = sprintf(line + pos, "%s: %c %s", pid_str, ident,
 						label ? label : "");