Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp129185iob; Tue, 17 May 2022 21:12:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzq+V4vZ5d8ZfyFjSjquaAyM431pX6iPK4JQniJ49Up96ea/gQqqvYi3I5HrSh4I1Asn/YT X-Received: by 2002:a17:90a:5908:b0:1df:1232:d47c with SMTP id k8-20020a17090a590800b001df1232d47cmr21121248pji.5.1652847151078; Tue, 17 May 2022 21:12:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652847151; cv=none; d=google.com; s=arc-20160816; b=gv7iwn9r9QKRTgAicCP1vK8gDqAaXgwJMcAitPOah+WVNnxiSlQhWMwzt28p4P8yAN Ovh7hT6YiKv9qGSzMaFacB9wqQ93NseAsSOKBg9Nk7sdD02Lj136RiLVqCO5E9v+nFzS 1RgCMVYsZF2B2tKps/1AY+BjK/3xtRDhkgMhsfkmXTKqCkNpljzxYrP8clQxeMglP2Im BzaGsS7Cg9Ov7D8LKQxwijaPYxzO7a+06xL9GuVhyYiWgEqdaWttfVtQjSWk1ePKLF2P ytGfr4eRSjgCnhBqws1boUB++40bnxuvMUxsHtJQMHVO07Mp+LZgCWNty2kBDQvavKFx kt6w== 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=jygthAMJFjFeeRpTDr7egf+IhNfU+oRkezUzyZc30HM=; b=jhLusG//lpkuBHC7fKfMPcBNmPVYub4wjrym8y/I43bhCmXfsd+6YYUsv1AiOr1Big X/pxjhytDodZqlAH8e2kFRkKHf9qfsEKsCc6JiE2XTWIVKVq/RoVWPSPNRFya+TqIvBw loXuGKTR2AV4+NpQTOanig+7kP7DqF9TRJZICulCHI3LhWkz0hB9WvMHjnlqKl7i+JDp iMB6MPSEdSg1u3RGCsP3mJv6IiG5WRFPQxGezCY1kZW16TSuhvXd4IyiV10aMdumi87E kV+3IGom3lnlKwOdIkbdwI7zlGlVcRstwCXZsEa3wwz3ZXx9tljMZ+91t5CKWci8vh2g EiFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ilWIqd0Q; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k14-20020aa792ce000000b004fa8f4f2d6dsi1418043pfa.144.2022.05.17.21.12.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 21:12:31 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ilWIqd0Q; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1779927CC6; Tue, 17 May 2022 20:43:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233601AbiERB1T (ORCPT + 99 others); Tue, 17 May 2022 21:27:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233572AbiERB1S (ORCPT ); Tue, 17 May 2022 21:27:18 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A0C649F3E for ; Tue, 17 May 2022 18:27:17 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id i8so367108plr.13 for ; Tue, 17 May 2022 18:27:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jygthAMJFjFeeRpTDr7egf+IhNfU+oRkezUzyZc30HM=; b=ilWIqd0QmC6KdbTWF/ZzbZeKmKYuiqQQI3VF0dZx13RfOc546giG1pbHtfF4TT3lsH Dj+qewwGjj1VLE4mnH+Dz+JFMeB02NyYj6Fwre5BBClDpnkukcLfrpZmsMPO5cHDPVRF 6jqM0NJJNJCZmt17HDk6PvgqSDDiVYrG6bIlXghwZOZvnI8/wgRKKGf5bU2wgZ/QZ5oz RzcIQw4n6aIuChjVTMUuPOiLOe6Z4SHWnoRhcsK1TIh0Hz5epxqOTgO4YU+UY4H5n14W P7aa+oaIYFeecMSwUzibcn1HKZ1QQjaRTtUv9gJV8cWXyUxRGWCs01f/5xYlFLXPZqwJ Z6aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=jygthAMJFjFeeRpTDr7egf+IhNfU+oRkezUzyZc30HM=; b=KrYk6ITNPS4aXgzTazmMfoJDRnveIqbarr7Llf16yPTlbvth/GTPbOlK6tOgW4u5dx VhWQSyPFJIB039LkCgevLl1ZkQ7Jgw188TaUihkmLE9/klLb3jnzRpmMfbIaamcnca4V PIrUwsPMOsiewzXsdVn9MPwvzd2mnLjQjDxl93gKHvJl0V214p2cLEvS4UXDfSrisaZ5 j6RLTSKZbcv4CTlUr3SGyRaQOjnqaAu3skTte8x/e0NnTXtcJ2NzqfbVwS86digwbYVc TY7faR+pZf643gAkq5V1zxX+EC3WbGYbymQ9oawxYYt5vel0451rX3wZkKH3DlHFAJda bLlQ== X-Gm-Message-State: AOAM530S6YITWiLe3c7c6TP/qXjfm2o17vMUnUu6LeLBbtVnkRpuV8Am 0S5LfMsz8HT09cQdBn6gZscajg== X-Received: by 2002:a17:902:74c5:b0:161:5061:9d93 with SMTP id f5-20020a17090274c500b0016150619d93mr18122182plt.171.1652837236896; Tue, 17 May 2022 18:27:16 -0700 (PDT) Received: from google.com (201.59.83.34.bc.googleusercontent.com. [34.83.59.201]) by smtp.gmail.com with ESMTPSA id b7-20020a1709027e0700b0015e8d4eb2d8sm224850plm.290.2022.05.17.18.27.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 18:27:16 -0700 (PDT) Date: Wed, 18 May 2022 01:27:13 +0000 From: Carlos Llamas To: Schspa Shi Cc: gregkh@linuxfoundation.org, arve@android.com, tkjos@android.com, maco@android.com, joel@joelfernandes.org, brauner@kernel.org, hridya@google.com, surenb@google.com, linux-kernel@vger.kernel.org, syzbot+46fff6434a7f968ecb39@syzkaller.appspotmail.com Subject: Re: [PATCH v2] binder: fix atomic sleep when get extended error Message-ID: References: <20220518011754.49348-1-schspa@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220518011754.49348-1-schspa@gmail.com> X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 18, 2022 at 09:17:54AM +0800, Schspa Shi wrote: > binder_inner_proc_lock(thread->proc) is a spin lock, copy_to_user can't > be called with in this lock. > > Copy it as a local variable to fix it. > > Reported-by: syzbot+46fff6434a7f968ecb39@syzkaller.appspotmail.com > Fixes: bd32889e841c ("binder: add BINDER_GET_EXTENDED_ERROR ioctl") > Signed-off-by: Schspa Shi > > --- > > Changelog: > v1 -> v2: > - Remove the retry as Carlos Llamas adviced. > - Use binder_set_extended_error to reset the error info. > --- LGTM, thanks. Reviewed-by: Carlos Llamas -- Carlos Llamas