]> git.baikalelectronics.ru Git - kernel.git/commit
net: net_cls: fd passed in SCM_RIGHTS datagram not set correctly
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Mon, 21 Jan 2013 21:09:00 +0000 (21:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Jan 2013 19:17:38 +0000 (14:17 -0500)
commiteeb1e187e926738b6b27c2f8a3b315a0cdeabe1f
tree152cd9edc0554a8b3e5676294be21151703fc6b5
parenta91c0672d89edca13c8eba39168ac9264929731c
net: net_cls: fd passed in SCM_RIGHTS datagram not set correctly

Commit c16f8a9d500fbacbf67bfe7f8205c7d0cd65dd46 changed the update
logic for the socket but it does not update the SCM_RIGHTS update
as well. This patch is based on the net_prio fix commit

5d15d7b8b97b186f3ee57fd9acb9741caf88ee48

    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.

Let's apply the same fix for net_cls.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Reported-by: Li Zefan <lizefan@huawei.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: John Fastabend <john.r.fastabend@intel.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: netdev@vger.kernel.org
Cc: cgroups@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/scm.c