Re: svn commit: r333822 - head/sys/kern

2018-05-19 Thread Warner Losh
On Sat, May 19, 2018 at 10:57 AM, Rodney W. Grimes <
free...@pdx.rh.cn85.dnsmgr.net> wrote:

> [ Charset UTF-8 unsupported, converting... ]
> > On Sat, May 19, 2018 at 07:17 Emmanuel Vadot 
> wrote:
> >
> > > On 2018-05-19 15:35, Rodney W. Grimes wrote:
> > > > [ Charset UTF-8 unsupported, converting... ]
> > > >> Author: mmacy
> > > >> Date: Sat May 19 02:15:40 2018
> > > >> New Revision: 333822
> > > >> URL: https://svnweb.freebsd.org/changeset/base/333822
> > > >>
> > > >> Log:
> > > >>   fix gcc8 unused variable and set but not used variable in unix
> > > >> sockets
> > > >>   add copyright from lock rewrite while here
> > > >>
> > > >> Modified:
> > > >>   head/sys/kern/uipc_usrreq.c
> > > >>
> > > >> Modified: head/sys/kern/uipc_usrreq.c
> > > >>
> > > 
> ==
> > > >> --- head/sys/kern/uipc_usrreq.c  Sat May 19 00:47:24 2018
> > > (r333821)
> > > >> +++ head/sys/kern/uipc_usrreq.c  Sat May 19 02:15:40 2018
> > > (r333822)
> > > >> @@ -4,7 +4,7 @@
> > > >>   * Copyright (c) 1982, 1986, 1989, 1991, 1993
> > > >>   *  The Regents of the University of California.
> > > >>   * Copyright (c) 2004-2009 Robert N. M. Watson
> > > >> - * All rights reserved.
> > > >
> > > > Did you have permission from Robert Watson to remove this?
>
> This issue seems to be getting ignored?
>

Well, you'd need permission from the regents too, since it originated there
before rwatson inserted his copyright. I've talked to Matt online and will
be reverting this one line of his change.

Thanks for the eagle eye.

Warner
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r333822 - head/sys/kern

2018-05-19 Thread Matthew Macy
On Sat, May 19, 2018 at 8:56 AM, Emmanuel Vadot  wrote:
> On 2018-05-19 17:39, Matthew Macy wrote:
>>
>> On Sat, May 19, 2018 at 07:17 Emmanuel Vadot 
>> wrote:
>>
>>> On 2018-05-19 15:35, Rodney W. Grimes wrote:

 [ Charset UTF-8 unsupported, converting... ]
>
> Author: mmacy
> Date: Sat May 19 02:15:40 2018
> New Revision: 333822
> URL: https://svnweb.freebsd.org/changeset/base/333822 [1]
>
>
> Log:
> fix gcc8 unused variable and set but not used variable in unix
>>>
>>>
> sockets
> add copyright from lock rewrite while here
>
> Modified:
> head/sys/kern/uipc_usrreq.c
>
> Modified: head/sys/kern/uipc_usrreq.c
>
>>>
>>
>> ==
>
> --- head/sys/kern/uipc_usrreq.c Sat May 19 00:47:24 2018
>>>
>>> (r333821)
>
> +++ head/sys/kern/uipc_usrreq.c Sat May 19 02:15:40 2018
>>>
>>> (r333822)
>
> @@ -4,7 +4,7 @@
> * Copyright (c) 1982, 1986, 1989, 1991, 1993
> * The Regents of the University of California.
> * Copyright (c) 2004-2009 Robert N. M. Watson
> - * All rights reserved.


 Did you have permission from Robert Watson to remove this?

> + * Copyright (c) 2018 Matthew Macy
> *
> * Redistribution and use in source and binary forms, with or
>>>
>>> without
>
> * modification, are permitted provided that the following
>>>
>>> conditions

 ...
>>>
>>>
>>> That also seems a small patch to add your name in the copyright.
>>
>>
>> Uhh... Locking rewrite was a small patch? Really?
>
>
>  Maybe I should I read the previous commits and the full log here :) sorry.

No problem. Thanks Warner for stepping up. I probably shouldn't
respond before I've had my coffee.

Just to be clear - I wasn't upset, just a bit flabbergasted. I clearly
mentioned "locking rewrite" in the message and there were clearly no
locking changes in this particular commit. The awake thing to do would
have been to send a link to the commit itself and clarify that,
although in pure line count was < 25%,  it was a material change with
substantial impact.

https://svnweb.freebsd.org/base?view=revision&revision=333744

Cheers
-M

>
>>
>>> --
>>> Emmanuel Vadot  
>>
>>
>>
>> Links:
>> --
>> [1] https://svnweb.freebsd.org/changeset/base/333822
>
>
> --
> Emmanuel Vadot  
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r333822 - head/sys/kern

2018-05-19 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> On Sat, May 19, 2018 at 07:17 Emmanuel Vadot  wrote:
> 
> > On 2018-05-19 15:35, Rodney W. Grimes wrote:
> > > [ Charset UTF-8 unsupported, converting... ]
> > >> Author: mmacy
> > >> Date: Sat May 19 02:15:40 2018
> > >> New Revision: 333822
> > >> URL: https://svnweb.freebsd.org/changeset/base/333822
> > >>
> > >> Log:
> > >>   fix gcc8 unused variable and set but not used variable in unix
> > >> sockets
> > >>   add copyright from lock rewrite while here
> > >>
> > >> Modified:
> > >>   head/sys/kern/uipc_usrreq.c
> > >>
> > >> Modified: head/sys/kern/uipc_usrreq.c
> > >>
> > ==
> > >> --- head/sys/kern/uipc_usrreq.c  Sat May 19 00:47:24 2018
> > (r333821)
> > >> +++ head/sys/kern/uipc_usrreq.c  Sat May 19 02:15:40 2018
> > (r333822)
> > >> @@ -4,7 +4,7 @@
> > >>   * Copyright (c) 1982, 1986, 1989, 1991, 1993
> > >>   *  The Regents of the University of California.
> > >>   * Copyright (c) 2004-2009 Robert N. M. Watson
> > >> - * All rights reserved.
> > >
> > > Did you have permission from Robert Watson to remove this?

This issue seems to be getting ignored?  


> > >> + * Copyright (c) 2018 Matthew Macy
> > >>   *
> > >>   * Redistribution and use in source and binary forms, with or without
> > >>   * modification, are permitted provided that the following conditions
> > > ...
> >
> >   That also seems a small patch to add your name in the copyright.
> >
> 
> Uhh... Locking rewrite was a small patch? Really?

I agree with Matt, he has done plenty of work to this code
to justify his copyright claim.

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r333822 - head/sys/kern

2018-05-19 Thread Emmanuel Vadot

On 2018-05-19 17:39, Matthew Macy wrote:

On Sat, May 19, 2018 at 07:17 Emmanuel Vadot 
wrote:


On 2018-05-19 15:35, Rodney W. Grimes wrote:

[ Charset UTF-8 unsupported, converting... ]

Author: mmacy
Date: Sat May 19 02:15:40 2018
New Revision: 333822
URL: https://svnweb.freebsd.org/changeset/base/333822 [1]

Log:
fix gcc8 unused variable and set but not used variable in unix



sockets
add copyright from lock rewrite while here

Modified:
head/sys/kern/uipc_usrreq.c

Modified: head/sys/kern/uipc_usrreq.c




==

--- head/sys/kern/uipc_usrreq.c Sat May 19 00:47:24 2018

(r333821)

+++ head/sys/kern/uipc_usrreq.c Sat May 19 02:15:40 2018

(r333822)

@@ -4,7 +4,7 @@
* Copyright (c) 1982, 1986, 1989, 1991, 1993
* The Regents of the University of California.
* Copyright (c) 2004-2009 Robert N. M. Watson
- * All rights reserved.


Did you have permission from Robert Watson to remove this?


+ * Copyright (c) 2018 Matthew Macy
*
* Redistribution and use in source and binary forms, with or

without

* modification, are permitted provided that the following

conditions

...


That also seems a small patch to add your name in the copyright.


Uhh... Locking rewrite was a small patch? Really?


 Maybe I should I read the previous commits and the full log here :) 
sorry.





--
Emmanuel Vadot  



Links:
--
[1] https://svnweb.freebsd.org/changeset/base/333822


--
Emmanuel Vadot  
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r333822 - head/sys/kern

2018-05-19 Thread Warner Losh
On Sat, May 19, 2018 at 9:48 AM, Warner Losh  wrote:

>
>
> On Sat, May 19, 2018 at 9:39 AM, Matthew Macy  wrote:
>
>>
>> On Sat, May 19, 2018 at 07:17 Emmanuel Vadot 
>> wrote:
>>
>>> On 2018-05-19 15:35, Rodney W. Grimes wrote:
>>> > [ Charset UTF-8 unsupported, converting... ]
>>> >> Author: mmacy
>>> >> Date: Sat May 19 02:15:40 2018
>>> >> New Revision: 333822
>>> >> URL: https://svnweb.freebsd.org/changeset/base/333822
>>> >>
>>> >> Log:
>>> >>   fix gcc8 unused variable and set but not used variable in unix
>>> >> sockets
>>> >>   add copyright from lock rewrite while here
>>> >>
>>> >> Modified:
>>> >>   head/sys/kern/uipc_usrreq.c
>>> >>
>>> >> Modified: head/sys/kern/uipc_usrreq.c
>>> >> 
>>> ==
>>> >> --- head/sys/kern/uipc_usrreq.c  Sat May 19 00:47:24 2018
>>> (r333821)
>>> >> +++ head/sys/kern/uipc_usrreq.c  Sat May 19 02:15:40 2018
>>> (r333822)
>>> >> @@ -4,7 +4,7 @@
>>> >>   * Copyright (c) 1982, 1986, 1989, 1991, 1993
>>> >>   *  The Regents of the University of California.
>>> >>   * Copyright (c) 2004-2009 Robert N. M. Watson
>>> >> - * All rights reserved.
>>> >
>>> > Did you have permission from Robert Watson to remove this?
>>> >
>>> >> + * Copyright (c) 2018 Matthew Macy
>>> >>   *
>>> >>   * Redistribution and use in source and binary forms, with or without
>>> >>   * modification, are permitted provided that the following conditions
>>> > ...
>>>
>>>   That also seems a small patch to add your name in the copyright.
>>>
>>
>> Uhh... Locking rewrite was a small patch? Really?
>>
>
> This specific change was trivial. However, rewriting the locking here was
> non-trivial. The normal rule of thumb is about 25%, but that's flexible.
> mmacy is responsible for about 14% of the file according to git blame (a
> number that would be closer to 20% if you omitted the boilerplate parts of
> the file). If all his changes were trivial variable initializations, then
> I'd agree this fall short. But the new locking stuff is substantial enough
> to meet our traditional requirements for adding a copyright line. It
> affects the majority of the files and is a core functional feature of this
> file.
>

Sigh... s/affects the majority of the files/affects the majority of the
functions in this file/
Normally I wouldn't make this small a correction, but i materially affects
my argument.

Warner
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r333822 - head/sys/kern

2018-05-19 Thread Warner Losh
On Sat, May 19, 2018 at 9:39 AM, Matthew Macy  wrote:

>
> On Sat, May 19, 2018 at 07:17 Emmanuel Vadot 
> wrote:
>
>> On 2018-05-19 15:35, Rodney W. Grimes wrote:
>> > [ Charset UTF-8 unsupported, converting... ]
>> >> Author: mmacy
>> >> Date: Sat May 19 02:15:40 2018
>> >> New Revision: 333822
>> >> URL: https://svnweb.freebsd.org/changeset/base/333822
>> >>
>> >> Log:
>> >>   fix gcc8 unused variable and set but not used variable in unix
>> >> sockets
>> >>   add copyright from lock rewrite while here
>> >>
>> >> Modified:
>> >>   head/sys/kern/uipc_usrreq.c
>> >>
>> >> Modified: head/sys/kern/uipc_usrreq.c
>> >> 
>> ==
>> >> --- head/sys/kern/uipc_usrreq.c  Sat May 19 00:47:24 2018
>> (r333821)
>> >> +++ head/sys/kern/uipc_usrreq.c  Sat May 19 02:15:40 2018
>> (r333822)
>> >> @@ -4,7 +4,7 @@
>> >>   * Copyright (c) 1982, 1986, 1989, 1991, 1993
>> >>   *  The Regents of the University of California.
>> >>   * Copyright (c) 2004-2009 Robert N. M. Watson
>> >> - * All rights reserved.
>> >
>> > Did you have permission from Robert Watson to remove this?
>> >
>> >> + * Copyright (c) 2018 Matthew Macy
>> >>   *
>> >>   * Redistribution and use in source and binary forms, with or without
>> >>   * modification, are permitted provided that the following conditions
>> > ...
>>
>>   That also seems a small patch to add your name in the copyright.
>>
>
> Uhh... Locking rewrite was a small patch? Really?
>

This specific change was trivial. However, rewriting the locking here was
non-trivial. The normal rule of thumb is about 25%, but that's flexible.
mmacy is responsible for about 14% of the file according to git blame (a
number that would be closer to 20% if you omitted the boilerplate parts of
the file). If all his changes were trivial variable initializations, then
I'd agree this fall short. But the new locking stuff is substantial enough
to meet our traditional requirements for adding a copyright line. It
affects the majority of the files and is a core functional feature of this
file.

Warner
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r333822 - head/sys/kern

2018-05-19 Thread Matthew Macy
On Sat, May 19, 2018 at 07:17 Emmanuel Vadot  wrote:

> On 2018-05-19 15:35, Rodney W. Grimes wrote:
> > [ Charset UTF-8 unsupported, converting... ]
> >> Author: mmacy
> >> Date: Sat May 19 02:15:40 2018
> >> New Revision: 333822
> >> URL: https://svnweb.freebsd.org/changeset/base/333822
> >>
> >> Log:
> >>   fix gcc8 unused variable and set but not used variable in unix
> >> sockets
> >>   add copyright from lock rewrite while here
> >>
> >> Modified:
> >>   head/sys/kern/uipc_usrreq.c
> >>
> >> Modified: head/sys/kern/uipc_usrreq.c
> >>
> ==
> >> --- head/sys/kern/uipc_usrreq.c  Sat May 19 00:47:24 2018
> (r333821)
> >> +++ head/sys/kern/uipc_usrreq.c  Sat May 19 02:15:40 2018
> (r333822)
> >> @@ -4,7 +4,7 @@
> >>   * Copyright (c) 1982, 1986, 1989, 1991, 1993
> >>   *  The Regents of the University of California.
> >>   * Copyright (c) 2004-2009 Robert N. M. Watson
> >> - * All rights reserved.
> >
> > Did you have permission from Robert Watson to remove this?
> >
> >> + * Copyright (c) 2018 Matthew Macy
> >>   *
> >>   * Redistribution and use in source and binary forms, with or without
> >>   * modification, are permitted provided that the following conditions
> > ...
>
>   That also seems a small patch to add your name in the copyright.
>

Uhh... Locking rewrite was a small patch? Really?

>
> --
> Emmanuel Vadot  
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r333822 - head/sys/kern

2018-05-19 Thread Emmanuel Vadot

On 2018-05-19 15:35, Rodney W. Grimes wrote:

[ Charset UTF-8 unsupported, converting... ]

Author: mmacy
Date: Sat May 19 02:15:40 2018
New Revision: 333822
URL: https://svnweb.freebsd.org/changeset/base/333822

Log:
  fix gcc8 unused variable and set but not used variable in unix 
sockets

  add copyright from lock rewrite while here

Modified:
  head/sys/kern/uipc_usrreq.c

Modified: head/sys/kern/uipc_usrreq.c
==
--- head/sys/kern/uipc_usrreq.c Sat May 19 00:47:24 2018(r333821)
+++ head/sys/kern/uipc_usrreq.c Sat May 19 02:15:40 2018(r333822)
@@ -4,7 +4,7 @@
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
  * The Regents of the University of California.
  * Copyright (c) 2004-2009 Robert N. M. Watson
- * All rights reserved.


Did you have permission from Robert Watson to remove this?


+ * Copyright (c) 2018 Matthew Macy
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

...


 That also seems a small patch to add your name in the copyright.

--
Emmanuel Vadot  
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r333822 - head/sys/kern

2018-05-19 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> Author: mmacy
> Date: Sat May 19 02:15:40 2018
> New Revision: 333822
> URL: https://svnweb.freebsd.org/changeset/base/333822
> 
> Log:
>   fix gcc8 unused variable and set but not used variable in unix sockets
>   add copyright from lock rewrite while here
> 
> Modified:
>   head/sys/kern/uipc_usrreq.c
> 
> Modified: head/sys/kern/uipc_usrreq.c
> ==
> --- head/sys/kern/uipc_usrreq.c   Sat May 19 00:47:24 2018
> (r333821)
> +++ head/sys/kern/uipc_usrreq.c   Sat May 19 02:15:40 2018
> (r333822)
> @@ -4,7 +4,7 @@
>   * Copyright (c) 1982, 1986, 1989, 1991, 1993
>   *   The Regents of the University of California.
>   * Copyright (c) 2004-2009 Robert N. M. Watson
> - * All rights reserved.

Did you have permission from Robert Watson to remove this?

> + * Copyright (c) 2018 Matthew Macy
>   *
>   * Redistribution and use in source and binary forms, with or without
>   * modification, are permitted provided that the following conditions
...


-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333822 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy
Date: Sat May 19 02:15:40 2018
New Revision: 333822
URL: https://svnweb.freebsd.org/changeset/base/333822

Log:
  fix gcc8 unused variable and set but not used variable in unix sockets
  add copyright from lock rewrite while here

Modified:
  head/sys/kern/uipc_usrreq.c

Modified: head/sys/kern/uipc_usrreq.c
==
--- head/sys/kern/uipc_usrreq.c Sat May 19 00:47:24 2018(r333821)
+++ head/sys/kern/uipc_usrreq.c Sat May 19 02:15:40 2018(r333822)
@@ -4,7 +4,7 @@
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
  * The Regents of the University of California.
  * Copyright (c) 2004-2009 Robert N. M. Watson
- * All rights reserved.
+ * Copyright (c) 2018 Matthew Macy
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -765,6 +765,7 @@ uipc_detach(struct socket *so)
KASSERT(unp != NULL, ("uipc_detach: unp == NULL"));
 
vp = NULL;
+   vplock = NULL;
local_unp_rights = 0;
 
UNP_LINK_WLOCK();
@@ -787,7 +788,8 @@ uipc_detach(struct socket *so)
}
if (unp->unp_vnode != vp &&
unp->unp_vnode != NULL) {
-   mtx_unlock(vplock);
+   if (vplock)
+   mtx_unlock(vplock);
UNP_PCB_UNLOCK(unp);
if (unp2)
UNP_PCB_UNLOCK(unp2);
@@ -1676,7 +1678,9 @@ static void
 unp_disconnect(struct unpcb *unp, struct unpcb *unp2)
 {
struct socket *so, *so2;
-   int rele, freed;
+#ifdef INVARIANTS
+   int freed;
+#endif
 
KASSERT(unp2 != NULL, ("unp_disconnect: unp2 == NULL"));
 
@@ -1688,7 +1692,6 @@ unp_disconnect(struct unpcb *unp, struct unpcb *unp2)
 
MPASS(unp->unp_conn == unp2);
unp->unp_conn = NULL;
-   rele = 0;
so = unp->unp_socket;
so2 = unp2->unp_socket;
switch (unp->unp_socket->so_type) {
@@ -1713,9 +1716,15 @@ unp_disconnect(struct unpcb *unp, struct unpcb *unp2)
soisdisconnected(so2);
break;
}
-   freed = unp_pcb_rele(unp);
+#ifdef INVARIANTS  
+   freed =
+#endif 
+   unp_pcb_rele(unp);
MPASS(freed == 0);
-   freed = unp_pcb_rele(unp2);
+#ifdef INVARIANTS  
+   freed =
+#endif
+   unp_pcb_rele(unp2);
MPASS(freed == 0);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"