Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp365524pxb; Wed, 13 Jan 2021 05:48:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzMcLgpB9w7Sj6gTAqG5Ak5CT15LcVT35k8e1KfjAzo98u8hPxz9PiMP8MoE2gTD15BDb7F X-Received: by 2002:a05:6402:1c04:: with SMTP id ck4mr1825730edb.320.1610545714624; Wed, 13 Jan 2021 05:48:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610545714; cv=none; d=google.com; s=arc-20160816; b=KCZJvdB/3lMSpCk1wYanhtOdHbubZDitHww2bjI8Em2MLnc8LtQsvWCut/h9mFIpag 2WzlsZmJ6j8fxV7q/IU6KiKqK46gOWk7+GLFO0RHtzvsX2ckBAwlJVWWZcnocaESceWL Bdqnc6TWosZ0V9HhoMvEAUkJ1zv3IHt6r51iRMYroOFvAC/l8APkhSz2FQ3YQLPhGG/C HJSVkPvtZoWMG2l/RxWeJm9zKXWaf1jFmTbyqC2UFKvElzhh78AZhiwtA2+svDL+uFOt sWWyBYh56zOxxDTlh+0UxyW/F61ex53rOE3Y6cdkImzncjBUhWHB+NM5Cx5SKCPahbYg rGKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=ujKBcglaGuzKclDGmkcrIeEyCxtXtbHOGRcZIAehV9o=; b=euiljCH5oup9hfGHozOFthWbf5ZUKfK/lFSqOf2+5AUeU8IkOJLpgER6vCK6VA/N2A eUo45Lt2hrvcPCQ6G8760AhjpQ3aThHfruMtphWnV14LPWFuluPDznhK0V9kv8HVXMHA /8RBfphLrAY9w9Wqu/cHtjIB65L7de1McdP7KNJ8OhOMQb+dqtIoBnSUO2pOiTzf61zb gg28QH949/dAP99E51jQx+c5NT4Ovu7Bc7xSmSrJwZLjWrbN0DYEuDGrkbO/Q0CqvSPY QJ0kVYlU5NrkyA7KgfKBsr8pB5VZxDQJoW0ZqAR1H9d39Vu/0I/Nj9nFsEvBvcP93Awi 6aJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=HFsiXcU5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq20si981419edb.563.2021.01.13.05.48.11; Wed, 13 Jan 2021 05:48:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=HFsiXcU5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726118AbhAMNqZ (ORCPT + 99 others); Wed, 13 Jan 2021 08:46:25 -0500 Received: from mout.gmx.net ([212.227.15.15]:44557 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725858AbhAMNqZ (ORCPT ); Wed, 13 Jan 2021 08:46:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1610545492; bh=FeQ9LoOHwuLLcTo2b9xHbgXFNtYCZq4IltZO8nlbpCs=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject; b=HFsiXcU5bFA9JmK3AVwI7msIxvHvYbp6BlPGE09peNDm5pmAicHoSHs1JU8VNjQkQ rKUStnExKhGA8xCJpmh6A0Ku6YUPkXA1T/qlkg7vqxRJAGxgo4o6fHqCWJxgNF8meg glkUrke+fNU9shmcGeqI7qwTtnC7b8PkFa0tLvWs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost ([84.171.155.217]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mqs4Z-1kDN931U13-00mp4B; Wed, 13 Jan 2021 14:44:52 +0100 Date: Wed, 13 Jan 2021 14:44:51 +0100 From: Marcus Huewe To: oleg@redhat.com Cc: linux-kernel@vger.kernel.org, suse-tux@gmx.de Subject: [PATCH] ptrace: Remove redundant code in ptrace_attach Message-ID: <53924ce0d6f0c15575b5d7dbef2a8038bc27b4ed.1610544906.git.suse-tux@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Provags-ID: V03:K1:azk3k22lDsIfB7uhLn5x0dty+7XRxTPXkcpR471QCKPUaXP8ymd VGNctyvgvToHWHEfhR8G78FAZIa3YZ68kMpfEhiXWn8wWU4BVwrLksw2N8QmXaurSgf0wp2 +QCFFSPNEHHrLmdV5YHW81ZtJ24BYIMuyqokgtkQ4dmToDuLnPwdgXYsjPXYVQytUKIBlmf ZKdujpbuHliZ1YKhsyGMw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:imYpXO1rRgQ=:/Xd+0hNJbvhwO7MnjNsRdr lyg7skN1vTW4Qd8G82bhSNO9CCbSUuF1IsazVACtJ4tKlDY2WWS7ilyPIuGw6Uv8IYw2MSZIF 2GEpUzgRJB8XsssO/Y/hGCTssee1iKLz0fUib2SFFNCdwqsFopyQnjaSmsYdSLlPJLq4P1NtB By7YWl1J0hRUS/PFSSqwiDvKQylppYkFsPDKyssGtShM99ec01CaiY8ZAxFcBSqwW4k9NQP+s 8sg2MjqptZ354CrqrlhKaDWSeOeOS7tqwrjI1kTS1C7UnAtHrGaYp/aZS+O1ALxTsmz54zgaP byiRJIOfzLLT0o7YRj6d+ImFLikL3vouvy3P/BL/QilD0+xfpX40uN+n9lJwOL6E3D6iZZVq4 5I6wZhhMf3O27F36NtCXIX5SDv4nl6u05eewEyRK5Qhgt3br4kkXj3CPn+vCPTKoqsTfkE5cD HkM0R95NgWNhjv6ZGjL2EpUp7/UI55NyTkdW8OauI0Zezh2KRsYWG9YfSEG/Bdipn1uwsP+0F IKPf/dsdwCn5Z8tI/Sd3qdRhDBHA3ioFIEyQOUFDEvcvyIG5MzQ3QWH4UfxL8QC7CeLiOflBZ qHxKABJRpcqmFj3LexPC9BEeK8dcEHJQtIJjSYzFVPS80s2bwzUQfcVBa8Lyxf4OveEMUp5MC g1sGcjlz0v0J9lohDhyEZXVe18/I/g9IpZipa2HJNCMI5uuHaj2MxcCOrMWxPYktEVXXumltO AAYMCRx8hZ5y3n45UOwnAkhVKGh1BvDGLi5FtkWeGSDYIcPzsVf7DR7gcV4OW0RQitv7Vm7IN tCIW1NwbT6ImqKdYU3n+Yy2XGuOoH3YS3bmOgMHdoAUvdkrQmr/m3MHOvy3qRDmwtatR2E+AY l63OqnfQt5X2sxZx7xYw== Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In case of a PTRACE_SEIZE request, the PT_SEIZED flag is always set at the beginning of ptrace_attach. Hence, there is no need to set it again (neither "flags" nor "seize" are modified in between/after the initial assignment). Signed-off-by: Marcus Huewe =2D-- kernel/ptrace.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 61db50f7ca86..059fce2ad53c 100644 =2D-- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -402,8 +402,6 @@ static int ptrace_attach(struct task_struct *task, lon= g request, if (task->ptrace) goto unlock_tasklist; - if (seize) - flags |=3D PT_SEIZED; task->ptrace =3D flags; ptrace_link(task, current); =2D- 2.29.2