lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 19 Jul 2007 14:20:27 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	David Howells <dhowells@...hat.com>
cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] AFS: Use patched rxrpc_kernel_send_data() correctly



On Thu, 19 Jul 2007, David Howells wrote:
>
> @@ -806,8 +807,9 @@ void afs_send_simple_reply(struct afs_call *call, const void *buf, size_t len)
>  	msg.msg_flags		= 0;
>  
>  	call->state = AFS_CALL_AWAIT_ACK;
> -	switch (rxrpc_kernel_send_data(call->rxcall, &msg, len)) {
> -	case 0:
> +	n = rxrpc_kernel_send_data(call->rxcall, &msg, len);
> +	switch (n) {
> +	case 0 ... INT_MAX:
>  		_leave(" [replied]");
>  		return;

Please don't do this. There's no reason to. Why not just use the much 
simpler

	if (n >= 0) {
		_leave(" [replied]");
		return;
	}
	if (n == -ENOMEM) {
		_debug("oom");
		rxrpc_kernel_abort_call(call->rxcall, RX_USER_ABORT);
	}

rather than have a silly and totally pointless case-statement with three 
really odd cases?

			Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ