From: John Fastabend Date: Tue, 14 Aug 2012 12:34:30 +0000 (+0000) Subject: net: netprio: fd passed in SCM_RIGHTS datagram not set correctly X-Git-Tag: upstream/snapshot3+hdmi~6792^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48a87cc26c13b68f6cce4e9d769fcb17a6b3e4b8;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git net: netprio: fd passed in SCM_RIGHTS datagram not set correctly A socket fd passed in a SCM_RIGHTS datagram was not getting updated with the new tasks cgrp prioidx. This leaves IO on the socket tagged with the old tasks priority. To fix this add a check in the scm recvmsg path to update the sock cgrp prioidx with the new tasks value. Thanks to Al Viro for catching this. CC: Neil Horman Reported-by: Al Viro Signed-off-by: John Fastabend Acked-by: Neil Horman Signed-off-by: David S. Miller --- diff --git a/net/core/scm.c b/net/core/scm.c index 8f6ccfd..040cebe 100644 --- a/net/core/scm.c +++ b/net/core/scm.c @@ -265,6 +265,7 @@ void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm) for (i=0, cmfptr=(__force int __user *)CMSG_DATA(cm); isk, current); fd_install(new_fd, fp[i]); }