diff mbox series

[net-next] rxrpc: rxgk: Set error code in rxgk_yfs_decode_ticket()

Message ID Z_-P_1iLDWksH1ik@stanley.mountain (mailing list archive)
State New
Delegated to: Netdev Maintainers
Headers show
Series [net-next] rxrpc: rxgk: Set error code in rxgk_yfs_decode_ticket() | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1 this patch: 1
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 2 this patch: 2
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 2 this patch: 2
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2025-04-18--09-00 (tests: 916)

Commit Message

Dan Carpenter April 16, 2025, 11:09 a.m. UTC
Propagate the error code if key_alloc() fails.  Don't return
success.

Fixes: 9d1d2b59341f ("rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI)")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
It's not totally clear if these patch prefixes are real things or just
a cat walking across the keyboard.  "rxrxpc: gk: yfs-rxgk"  Really?
We expect people to believe these are real?
---
 net/rxrpc/rxgk_app.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Simon Horman April 18, 2025, 5 p.m. UTC | #1
On Wed, Apr 16, 2025 at 02:09:51PM +0300, Dan Carpenter wrote:
> Propagate the error code if key_alloc() fails.  Don't return
> success.
> 
> Fixes: 9d1d2b59341f ("rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI)")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Reviewed-by: Simon Horman <horms@kernel.org>

...

> diff --git a/net/rxrpc/rxgk_app.c b/net/rxrpc/rxgk_app.c
> index 6206a84395b8..b94b77a1c317 100644
> --- a/net/rxrpc/rxgk_app.c
> +++ b/net/rxrpc/rxgk_app.c
> @@ -141,6 +141,7 @@ int rxgk_yfs_decode_ticket(struct rxrpc_connection *conn, struct sk_buff *skb,
>  			KEY_ALLOC_NOT_IN_QUOTA, NULL);
>  	if (IS_ERR(key)) {
>  		_leave(" = -ENOMEM [alloc %ld]", PTR_ERR(key));

Not a bug, but it doesn't seem ideal that _leave(), which logs a debug
message, is called here and with a more general format in the error label.

> +		ret = PTR_ERR(key);
>  		goto error;
>  	}
>  
> -- 
> 2.47.2
>
diff mbox series

Patch

diff --git a/net/rxrpc/rxgk_app.c b/net/rxrpc/rxgk_app.c
index 6206a84395b8..b94b77a1c317 100644
--- a/net/rxrpc/rxgk_app.c
+++ b/net/rxrpc/rxgk_app.c
@@ -141,6 +141,7 @@  int rxgk_yfs_decode_ticket(struct rxrpc_connection *conn, struct sk_buff *skb,
 			KEY_ALLOC_NOT_IN_QUOTA, NULL);
 	if (IS_ERR(key)) {
 		_leave(" = -ENOMEM [alloc %ld]", PTR_ERR(key));
+		ret = PTR_ERR(key);
 		goto error;
 	}