Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp948187rdb; Wed, 1 Nov 2023 07:20:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFGtB87eKQAhkBUSbDP1GNwOYfG97m7f9BS0j+gY8ZP1VKlqPdyHYbs8xpEaxy+j0dSKiC9 X-Received: by 2002:a05:6358:6f09:b0:168:e2d5:ddcc with SMTP id r9-20020a0563586f0900b00168e2d5ddccmr20299286rwn.7.1698848454515; Wed, 01 Nov 2023 07:20:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698848454; cv=none; d=google.com; s=arc-20160816; b=siBFbAKJqUB6Ya054LSdM4SkJzm6cSK+UF/a8IUVoVRrS5bt4sPi9CLXdUZDgo/len YEmd09sDqi2ZkX8XIk6cpXDMhLS6rkUN7sqJVcP3X9QUU1jQfnWp00uZ80b0+AE4zgNV GkHiwqu80eWliHHnLUKTpVLUX/roWwGTqK+Zr35r2Dz0YBT2DEt5tpkXqMWi18hxiHPJ bnK920o11Y8EqBm3X1vaxbwTHrc758E95YuoKWMbGTzmNT2LMI/qziqhOao9abwkFWc+ JywlOESnaeGCc7GNy+Uj1807rggrbeB6WgfyqzA70ZRXyZdkWnbQ5c4v1eYwGXG1YCuu vU9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IZ2Bx/gm0ntkrj/Q1KLFYBDzhQaXEH9TqhNP8COyVbg=; fh=TGb+MKlNK9goYfK21YUtftaCTy+xXq1mZFHC7Oq6xFY=; b=aX7txATUVDdM7uo4cTyyW0gLSeIRJDE6blYgug7BFeSlzJ3bEkVTow+wbxOYWkGdHf SCzC35o1OZtqrHCbNdCyM8HLj3bOWJFiB7LSuOEgzpynNbiv8LdR7yp0y7DXFZnxIGd9 R4B6g4StBernMLObdodaqo/a4KvaqavXHwqpMRfysy2p1cW3J8BYB3bzmXgX9yx06JgM /f1lqv53En+2H/I3gGwB/gVC0lX2PGhIxn0d6LuvaKF+4cPV74Ir8sk5fg3ThirDQXrK FFCJtQyQYPJ70UIkE/7YonRoWtgiOhGLyKWS365GTLY3rtEZVDHiW29mOuMDuzTcvCI7 S7Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XvzfVprk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id q6-20020a656846000000b005b93bfe91f3si3040414pgt.577.2023.11.01.07.20.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 07:20:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XvzfVprk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id BD84980C771A; Wed, 1 Nov 2023 07:20:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344359AbjKAOUV (ORCPT + 99 others); Wed, 1 Nov 2023 10:20:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235630AbjKAOUS (ORCPT ); Wed, 1 Nov 2023 10:20:18 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D9E0115 for ; Wed, 1 Nov 2023 07:20:09 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58EDCC433C7; Wed, 1 Nov 2023 14:20:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1698848408; bh=PzUEW4w524QdvWruo3C65kPqW198zzSfCHbbShc+m20=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XvzfVprkRxyBXCL2fyT3+f/ZKg3hX1Ss7t1LQCNQEkqIKOANLH43BUvLnOy0DIVoJ cJrywwsRHVVNA9tWb2U0JN6aDQ4uAqkMhu6ucPdjq5DWYgsjQ9zSy9uWM+2+lOkpd6 ts0iB/+Y5ul3aTkgNMM9IfyZdAtmcFDhARMAKi14= Date: Wed, 1 Nov 2023 15:20:05 +0100 From: Greg KH To: Ren Mingshuai Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, jirislaby@kernel.org, caowangbao@huawei.com, yanan@huawei.com, liaichun@huawei.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tty: hso: Fix potential null pointer dereference Message-ID: <2023110139-spearmint-throttle-ed90@gregkh> References: <20231101133544.246961-1-renmingshuai@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231101133544.246961-1-renmingshuai@huawei.com> X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 01 Nov 2023 07:20:41 -0700 (PDT) On Wed, Nov 01, 2023 at 09:35:44PM +0800, Ren Mingshuai wrote: > Generally, the old always points to the address of a ktermios structure, > so old is unlikely to be NULL. Still check it before dereference as > elsewhere. If it can not happen, there is no need to check it. So unless you can prove that this ever could happen, this change isn't needed, right? thanks, greg k-h