From owner-svn-src-head@freebsd.org Thu Feb 15 03:39:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1CCBF1B396 for ; Thu, 15 Feb 2018 03:39:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EEB27F7AE for ; Thu, 15 Feb 2018 03:39:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x233.google.com with SMTP id o13so17737424ito.2 for ; Wed, 14 Feb 2018 19:39:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=LC2xR4FMqy9J6AA4ctQRdfbG9xgivjbDZQhPLrKOPZs=; b=Q1FZU97/OthCitbvMiQvY67xhHk39/XxIadKkiMAkqHip+c1WkBe3lf5lJPgDsvPTR qICVpXEd0qOPey1uGcsmat0McblfRlwNNsOFvAAt/gDAe+erHRBXQ9WSSFVujZXj8937 vUa0X9elK9v2jAHB7iDDQdohN9RyLN6usvYtgzfrmBJkQus4ApR7p0pDvA9UP99keeNB TWtkGD/61fLXV2WksUtOreF3RanwEGOtlWDGPyp//UWa6xLoXPBDn5yIUTDyNFTD5pci f8fhsswnSOdyWwm4OUm3WUZ382UAJQavPfHzhWc6MZ4pXkGsS1Fq3vdUxAzPBN5Mg/rQ m18A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=LC2xR4FMqy9J6AA4ctQRdfbG9xgivjbDZQhPLrKOPZs=; b=CTChWasZjmBXyC51m6+jGty6DOUVS5zMFWDOPnSFIUaljh27Xth7x+zvUoo7j/k8L+ fla3j72TfEh4/BQrkaiuwpPT2LcCILv1/usE6j9TDg/j8iRt6oaF9+gvAlRvirIPIHRA DEtPehsU4DNkC062rKMeDEHmXhIMwR6qXb+yZmao2T4ZQN5drd36ImXSz2wBzLMMfAJ/ SLnzR4NirqI5kzL+9AarUiZ4saEz81O4lbgt/yTXbC+TcdPFeJJ7tXBduGJxF0SAHpf8 v1aXZuAdbdNzN/Eb/YxM0yLk56JuyLdWYUxbwwiHbsBgdIwgrTSs7NrjCK3PF/tTnzGo UdAg== X-Gm-Message-State: APf1xPBMWK3dnRLYsaOibc32vnYvD8omQ6KwdG5j6ZrMeN0W5lxQD5lR d7S1ByalKZUW8Ej+y9st1Xew8I9q+J2BJrC5AEDutg== X-Google-Smtp-Source: AH8x224m7KgYWrPHB2mrZtA9jJQa1L1jXbURmlfujLGvZU/tXx3sKSVu/B1nUmsBAtqWCrgdNi32HfWD6cn6xQBIw+I= X-Received: by 10.36.80.17 with SMTP id m17mr779905itb.64.1518665990395; Wed, 14 Feb 2018 19:39:50 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.201.67 with HTTP; Wed, 14 Feb 2018 19:39:49 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:c5d:377:1ec2:48fe] Received: by 10.79.201.67 with HTTP; Wed, 14 Feb 2018 19:39:49 -0800 (PST) In-Reply-To: <201802150322.w1F3Mrie018786@repo.freebsd.org> References: <201802150322.w1F3Mrie018786@repo.freebsd.org> From: Warner Losh Date: Wed, 14 Feb 2018 20:39:49 -0700 X-Google-Sender-Auth: aL3iPQDiVL6pdXlnKttV5qb78CQ Message-ID: Subject: Re: svn commit: r329296 - head/sbin/devd To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Feb 2018 03:39:52 -0000 On Feb 14, 2018 8:23 PM, "Eitan Adler" wrote: Author: eadler Date: Thu Feb 15 03:22:53 2018 New Revision: 329296 URL: https://svnweb.freebsd.org/changeset/base/329296 Log: devd: don't pass &fds in useless parameters to select(2) select(2) should be declared as restrict. In addition the only fd in the fdset is open O_RDONLY, and it's not a socket that can provide OOB notifications, Reviewed by: ian, imp, vangyzen Don't put my name on this. I specifically and clearly objected to the change anf tld yoy not to do it. Warner Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc ============================================================ ================== --- head/sbin/devd/devd.cc Thu Feb 15 03:22:04 2018 (r329295) +++ head/sbin/devd/devd.cc Thu Feb 15 03:22:53 2018 (r329296) @@ -1021,7 +1021,7 @@ event_loop(void) tv.tv_usec = 0; FD_ZERO(&fds); FD_SET(fd, &fds); - rv = select(fd + 1, &fds, &fds, &fds, &tv); + rv = select(fd + 1, &fds, NULL, NULL, &tv); // No events -> we've processed all pending events if (rv == 0) { devdlog(LOG_DEBUG, "Calling daemon\n");