Patch "fs: dlm: fix build with CONFIG_IPV6 disabled" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    fs: dlm: fix build with CONFIG_IPV6 disabled

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     fs-dlm-fix-build-with-config_ipv6-disabled.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 80de903772b5d2dc333d800178b68892cffc1ad1
Author: Alexander Aring <aahringo@xxxxxxxxxx>
Date:   Wed Nov 17 09:20:43 2021 -0500

    fs: dlm: fix build with CONFIG_IPV6 disabled
    
    [ Upstream commit 1b9beda83e27a0c2cd75d1cb743c297c7b36c844 ]
    
    This patch will surround the AF_INET6 case in sk_error_report() of dlm
    with a #if IS_ENABLED(CONFIG_IPV6). The field sk->sk_v6_daddr is not
    defined when CONFIG_IPV6 is disabled. If CONFIG_IPV6 is disabled, the
    socket creation with AF_INET6 should already fail because a runtime
    check if AF_INET6 is registered. However if there is the possibility
    that AF_INET6 is set as sk_family the sk_error_report() callback will
    print then an invalid family type error.
    
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Fixes: 4c3d90570bcc ("fs: dlm: don't call kernel_getpeername() in error_report()")
    Signed-off-by: Alexander Aring <aahringo@xxxxxxxxxx>
    Signed-off-by: David Teigland <teigland@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 904855fa20655..68b765369c928 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -491,6 +491,7 @@ static void lowcomms_error_report(struct sock *sk)
 				   ntohs(inet->inet_dport), sk->sk_err,
 				   sk->sk_err_soft);
 		break;
+#if IS_ENABLED(CONFIG_IPV6)
 	case AF_INET6:
 		printk_ratelimited(KERN_ERR "dlm: node %d: socket error "
 				   "sending to node %d at %pI6c, "
@@ -499,6 +500,7 @@ static void lowcomms_error_report(struct sock *sk)
 				   ntohs(inet->inet_dport), sk->sk_err,
 				   sk->sk_err_soft);
 		break;
+#endif
 	default:
 		printk_ratelimited(KERN_ERR "dlm: node %d: socket error "
 				   "invalid socket family %d set, "



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux