From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F803C4332B for ; Mon, 23 Mar 2020 14:25:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C3D01206F8 for ; Mon, 23 Mar 2020 14:25:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="IDWjG6o5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726982AbgCWOZT (ORCPT ); Mon, 23 Mar 2020 10:25:19 -0400 Received: from mail-pj1-f42.google.com ([209.85.216.42]:53691 "EHLO mail-pj1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726007AbgCWOZT (ORCPT ); Mon, 23 Mar 2020 10:25:19 -0400 Received: by mail-pj1-f42.google.com with SMTP id l36so6255868pjb.3 for ; Mon, 23 Mar 2020 07:25:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=nlduzVPDyqKnPQVp9n4x5RYEfHbfM1LD5pCTm/+UuqY=; b=IDWjG6o5LDRvbGQOXpLg+YnM+AzoBkb4ouG7MG9W8lzvftXUCUBcfZpXbARvWYTtN4 n4h5eEg4WtOpA8XBEMUmSMovg15M3L0/rx23P9J498bj0K8i54oZFwi95FQal9u51UB3 ia5gADrJH7Ce6u3+oG8p4yuJxEMOadtAddmqOoM9OOUaRvcw4OQRqsOw2CsYXh9zVSZM HllWoTixA2RpB8wPcOriAxSbaW5DpaxDuZ41o6CBE+UkL7rWhVXKiN4p6HqMC1cWi2wi 4AD+DdJzBInBij2D6Un5GO4dW64T5F6kGDuMP4KgJgxJtd+WDUZYhliyYVgQVAinzhtR t1XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nlduzVPDyqKnPQVp9n4x5RYEfHbfM1LD5pCTm/+UuqY=; b=TGavE2oU2tEu0YEpvnX809BvzkP1PjIjL2OTJNc75v6oVQ/5WoGDVcn97XKto1m8NP SsrV5zGbL30jnyLkr+R1ToA6EaZmSDgfbM0otVJFT97jDV5zgYSX6WyQlznc1VF8L+5u 7On5+h+JXzN2S2uXiLJSHcJ7jcHlJqI3vprYqazu299GyfN/mx7LwRz3CQ4b2SVP6TbE D4Xb4wynWJ1C/vyLiWq7kXfd7GM/Mk8j+IiS3bTuTnYZ5ONdOClG1SKUb5ny2JK3a6Zj GIN8w0Y0hs+FfPixsw4BAbPwKLCndSL01AW7QbV7QC5MBoDQVkqwr9UBHoUWnO6fLT0K hj8A== X-Gm-Message-State: ANhLgQ2BBkccaSLtJK/NULKQwjJ+b4XuN9N49ORCEY5TseqRZB21Abl4 rl+8aW9xwOTUZIJzTBOR58x/SA== X-Google-Smtp-Source: ADFU+vu1RJ7BBqufFQRBaIpLy0UeR07UBFiFByXojwAY3z4hfmTLPSNu+/yA8Qa8vVOZwrs1sMpMgQ== X-Received: by 2002:a17:90a:30c7:: with SMTP id h65mr26926351pjb.44.1584973516052; Mon, 23 Mar 2020 07:25:16 -0700 (PDT) Received: from [192.168.1.188] ([66.219.217.145]) by smtp.gmail.com with ESMTPSA id x135sm12784397pgx.41.2020.03.23.07.25.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Mar 2020 07:25:15 -0700 (PDT) Subject: Re: [PATCH v2] io_uring: Fix ->data corruption on re-enqueue To: Pavel Begunkov , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org References: From: Jens Axboe Message-ID: Date: Mon, 23 Mar 2020 08:25:14 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: io-uring-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On 3/23/20 2:19 AM, Pavel Begunkov wrote: > work->data and work->list are shared in union. io_wq_assign_next() sets > ->data if a req having a linked_timeout, but then io-wq may want to use > work->list, e.g. to do re-enqueue of a request, so corrupting ->data. > > Don't need ->data, remove it and get linked_timeout through @link_list. Thanks! -- Jens Axboe