diff options
| author | Dave Airlie <airlied@redhat.com> | 2023-08-24 07:26:06 +1000 | 
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2023-08-24 07:26:06 +1000 | 
| commit | fdebffeba8b877368ddcc139c26278c1c97931a4 (patch) | |
| tree | 5ebf85a3e26d55ea388aa7a8608222205a4d59ba /drivers/net/tun.c | |
| parent | cacaeb27ade4b793c456179bb6eda4592d206cd8 (diff) | |
| parent | 706a741595047797872e669b3101429ab8d378ef (diff) | |
BackMerge tag 'v6.5-rc7' into drm-next
Linux 6.5-rc7
This is needed for the CI stuff and the msm pull has fixes in it.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/net/tun.c')
| -rw-r--r-- | drivers/net/tun.c | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index d75456adc62a..100339bc8b04 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1594,7 +1594,7 @@ static bool tun_can_build_skb(struct tun_struct *tun, struct tun_file *tfile,  	if (zerocopy)  		return false; -	if (SKB_DATA_ALIGN(len + TUN_RX_PAD) + +	if (SKB_DATA_ALIGN(len + TUN_RX_PAD + XDP_PACKET_HEADROOM) +  	    SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) > PAGE_SIZE)  		return false; @@ -3469,7 +3469,7 @@ static int tun_chr_open(struct inode *inode, struct file * file)  	tfile->socket.file = file;  	tfile->socket.ops = &tun_socket_ops; -	sock_init_data_uid(&tfile->socket, &tfile->sk, inode->i_uid); +	sock_init_data_uid(&tfile->socket, &tfile->sk, current_fsuid());  	tfile->sk.sk_write_space = tun_sock_write_space;  	tfile->sk.sk_sndbuf = INT_MAX;  | 
