mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
net/compat: Add missing sock updates for SCM_RIGHTS
commitd9539752d2upstream. Add missed sock updates to compat path via a new helper, which will be used more in coming patches. (The net/core/scm.c code is left as-is here to assist with -stable backports for the compat path.) Cc: Christoph Hellwig <hch@lst.de> Cc: Sargun Dhillon <sargun@sargun.me> Cc: Jakub Kicinski <kuba@kernel.org> Cc: stable@vger.kernel.org Fixes:48a87cc26c("net: netprio: fd passed in SCM_RIGHTS datagram not set correctly") Fixes:d84295067f("net: net_cls: fd passed in SCM_RIGHTS datagram not set correctly") Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c334db67eb
commit
f90339a4ec
@@ -845,6 +845,8 @@ static inline int sk_memalloc_socks(void)
|
||||
{
|
||||
return static_branch_unlikely(&memalloc_socks_key);
|
||||
}
|
||||
|
||||
void __receive_sock(struct file *file);
|
||||
#else
|
||||
|
||||
static inline int sk_memalloc_socks(void)
|
||||
@@ -852,6 +854,8 @@ static inline int sk_memalloc_socks(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void __receive_sock(struct file *file)
|
||||
{ }
|
||||
#endif
|
||||
|
||||
static inline gfp_t sk_gfp_mask(const struct sock *sk, gfp_t gfp_mask)
|
||||
|
||||
Reference in New Issue
Block a user