Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=997b37da1515c1620692521786a74af271664eb7 Commit: 997b37da1515c1620692521786a74af271664eb7 Parent: 69c3683ca7fe066ecba9e8a0424c5abd258a5d58 Author: Rémi Denis-Courmont <[EMAIL PROTECTED]> AuthorDate: Fri Feb 15 02:35:45 2008 -0800 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Fri Feb 15 02:35:45 2008 -0800
[NET]: Make sure sockets implement splice_read Fixes a segmentation fault when trying to splice from a non-TCP socket. Signed-off-by: Rémi Denis-Courmont <[EMAIL PROTECTED]> Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- net/socket.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/net/socket.c b/net/socket.c index 7651de0..b6d35cd 100644 --- a/net/socket.c +++ b/net/socket.c @@ -701,6 +701,9 @@ static ssize_t sock_splice_read(struct file *file, loff_t *ppos, { struct socket *sock = file->private_data; + if (unlikely(!sock->ops->splice_read)) + return -EINVAL; + return sock->ops->splice_read(sock, ppos, pipe, len, flags); } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html