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:	Sun, 9 Feb 2014 00:17:43 +0100
From:	Sabrina Dubroca <sd@...asysnail.net>
To:	acme@...stprotocols.net
Cc:	davem@...emloft.net, netdev@...r.kernel.org, 00cpxxx@...il.com
Subject: Re: [PATCH] ipx: implement shutdown()

2014-02-09, 00:04:29 +0100, Sabrina Dubroca wrote:
> +static int ipx_shutdown(struct socket *sock, int mode)
> +{
> +	struct sock *sk = sock->sk;
> +
> +	printk(KERN_INFO "IPX: shutting down %d\n", mode);
> +	if (mode < SHUT_RD || mode > SHUT_RDWR)
> +		return -EINVAL;
> +	/* This maps:
> +	 * SHUT_RD   (0) -> RCV_SHUTDOWN  (1)
> +	 * SHUT_WR   (1) -> SEND_SHUTDOWN (2)
> +	 * SHUT_RDWR (2) -> SHUTDOWN_MASK (3)
> +	 */
> +	++mode;
> +
> +	lock_sock(sk);
> +	sk->sk_shutdown |= mode;
> +	release_sock(sk);
> +	sk->sk_state_change(sk);
> +	printk(KERN_INFO "IPX: socket shut down\n");
> +
> +	return 0;
> +}

Sorry, I sent the version with the debugging in. I'll resend a clean one.

-- 
Sabrina
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ