Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5462846imm; Sun, 22 Jul 2018 23:21:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf6DanswsBc7NexD29EORlzP1wsN3bi8BQqUp0t9YtKr91JJpAhZWKqwRbG/Srx7dQmR6UF X-Received: by 2002:a17:902:aa46:: with SMTP id c6-v6mr11510023plr.313.1532326913958; Sun, 22 Jul 2018 23:21:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532326913; cv=none; d=google.com; s=arc-20160816; b=CeAeRloM5dJ6GxNSwvFhGaCU1faUHP45RLgVMrncJ2K/pSukauSJPhRqw1zwfIRfnf /jUlAYE7PESZj7TbmL14jeVylB6BUwmzPUUhWFOG8cXl9eb8BBdx67RW0JdcYwVMQan7 Uswhhsqoz9Gx8VtFMCLS7TllrE4i9J7JbeKrjPALHJGLJeO5QTPDfhmFY+XadTx2Lv+E tyHpcNhpt8rczj6ayOGvbLH34avAaIX9ZBDOykfdEA9mqFdBdFJmVaylBFLUw2940yHI pY1fnd/KWiGXldR67vAQWgDK1DW0LZ+Df3Nc8w2MIbnPeSIKMh/fQbbIwGuZv/GolbfM hJ1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature :arc-authentication-results; bh=i6Qb57JgPBGM78B61HzYyrfg2UZZaNiwa+3MAOOa96w=; b=iJwm1cRB1xHxFtVN1N5UalRS0Ef4OqP1km7EYoLuP/FzVjjZoX7Jgp40aiuqeRZG37 mCkj7oVkenhMaQ25/IYd8NK/u3D/mhrcATIOs+Q6rAAxhGw4rucK8ilJGbqV+dil6Nif EuWiiduOCIC/pHaOWzxt4KKzKBsXCyXeHhnfJ4k7v1S/lcFLmQ8lRhTnStV/N+2MaZ8o N6qc9Hh3Ul+xPQihdQcFN0lnbZNxYWfkAlL0PlSwC61SN32tsb276Pxjc2f6gcmImseu guoB25p+4CEMh0KL/fQZCDiSMy0ZOlHDit1oLGdBkejKlrdovX7e80egAOY8dJyeCu/t ssFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=TXgo1WaQ; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=mp7IB7nk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g131-v6si7680788pgc.204.2018.07.22.23.21.39; Sun, 22 Jul 2018 23:21:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=TXgo1WaQ; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=mp7IB7nk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387914AbeGWHUZ (ORCPT + 99 others); Mon, 23 Jul 2018 03:20:25 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:50141 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725976AbeGWHUZ (ORCPT ); Mon, 23 Jul 2018 03:20:25 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2D9DF21B54; Mon, 23 Jul 2018 02:20:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 23 Jul 2018 02:20:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=i6Qb57JgPBGM78B61HzYyrfg2UZZaNiwa+3MAOOa96w=; b=TXgo1WaQ aC3z7eQfaPCDhNfy59S8fqu4vGCt3N04kLNf/8ZcCULRmp1zgifu5SExeVlXtEZm 9mE6cZKfA50ovAHUkfT7hS4uaY5oUL6MBRkJrD8IHSOCyBo9uYs4gQdpb0GK9xMt 2ZlLrti9A3oThygsPLKBLekZ+OGCFhcS01VZaVW5WwZY72ATsSqcW+LW2mDY0ucR p/DRg2tXRZV9uAOrg1C50xyZl8ZtKtbhoLemsoysJaxXFUM1x6/Xgco2/BwylpPU t2o+OT70m7Uon4W6GyRuKjkMAGCShZtXpuEDYOLL7gl56hDxLRgvhnebMvlMTbi+ dTz96PH6uxbaBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=i6Qb57JgPBGM78B61HzYyrfg2UZZa Niwa+3MAOOa96w=; b=mp7IB7nke11ZfMOREpGOP6X6SKINjUVBe7wuVIAwIA3h1 nUn+6TwGERIPMihmY/JoqB4EBjwwflYgobY7e2J8c7hkvymVcwTzV/A1TtyV91L/ UQjEuwNINdNpmNFVjOgU4DVfxZwlGU/0lIv+6Pkx1Ni1EPbMhko3FGkNHFxz8M/z DwNw6tIsb+Si6HP56ON1mdgla/L/1EnHpbqCSZc9EhgOpPfY8hzUqxatRsTp4r0h PNYaJD6VLQMAnEjHyMrCD+cWDM/0Fx2WUBfYFzw3XxNZVLhAfFJVq4YYwzKyfupZ ywI/kjNtmDkhMYqpSesHYW1BGwqsh6Hfeft61Av+Q== X-ME-Proxy: X-ME-Sender: Received: from localhost (lfbn-1-12238-233.w90-92.abo.wanadoo.fr [90.92.53.233]) by mail.messagingengine.com (Postfix) with ESMTPA id 1A4C41025C; Mon, 23 Jul 2018 02:20:48 -0400 (EDT) Date: Mon, 23 Jul 2018 08:20:46 +0200 From: Greg KH To: Stephen Rothwell Cc: David Miller , Networking , Linux-Next Mailing List , Linux Kernel Mailing List , Dmitry Torokhov , Rajat Jain Subject: Re: linux-next: manual merge of the driver-core tree with the net-next tree Message-ID: <20180723062046.GA2577@kroah.com> References: <20180723151224.69a73892@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180723151224.69a73892@canb.auug.org.au> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 23, 2018 at 03:12:24PM +1000, Stephen Rothwell wrote: > Hi Greg, > > Today's linux-next merge of the driver-core tree got a conflict in: > > fs/sysfs/group.c > > between commit: > > 5f81880d5204 ("sysfs, kobject: allow creating kobject belonging to arbitrary users") > > from the net-next tree and commit: > > c855cf2759d2 ("sysfs: Fix internal_create_group() for named group updates") > > from the driver-core tree. > > I fixed it up (I think - see below) and can carry the fix as > necessary. This is now fixed as far as linux-next is concerned, but any > non trivial conflicts should be mentioned to your upstream maintainer > when your tree is submitted for merging. You may also want to consider > cooperating with the maintainer of the conflicting tree to minimise any > particularly complex conflicts. > > -- > Cheers, > Stephen Rothwell > > diff --cc fs/sysfs/group.c > index c7a716c4acc9,38240410f831..000000000000 > --- a/fs/sysfs/group.c > +++ b/fs/sysfs/group.c > @@@ -122,15 -118,23 +122,24 @@@ static int internal_create_group(struc > kobj->name, grp->name ?: ""); > return -EINVAL; > } > + kobject_get_ownership(kobj, &uid, &gid); > if (grp->name) { > - kn = kernfs_create_dir_ns(kobj->sd, grp->name, > - S_IRWXU | S_IRUGO | S_IXUGO, > - uid, gid, kobj, NULL); > - if (IS_ERR(kn)) { > - if (PTR_ERR(kn) == -EEXIST) > - sysfs_warn_dup(kobj->sd, grp->name); > - return PTR_ERR(kn); > + if (update) { > + kn = kernfs_find_and_get(kobj->sd, grp->name); > + if (!kn) { > + pr_warn("Can't update unknown attr grp name: %s/%s\n", > + kobj->name, grp->name); > + return -EINVAL; > + } > + } else { > - kn = kernfs_create_dir(kobj->sd, grp->name, > - S_IRWXU | S_IRUGO | S_IXUGO, > - kobj); > ++ kn = kernfs_create_dir_ns(kobj->sd, grp->name, > ++ S_IRWXU | S_IRUGO | S_IXUGO, > ++ uid, gid, kobj, NULL); > + if (IS_ERR(kn)) { > + if (PTR_ERR(kn) == -EEXIST) > + sysfs_warn_dup(kobj->sd, grp->name); > + return PTR_ERR(kn); > + } > } > } else > kn = kobj->sd; I think this is correct. Rajat, can you verify it please? thanks, greg k-h