Commit Graph

3093 Commits

Author SHA1 Message Date
riastradh 9515e06261 tcp(4): Bail early on sendoob if not connected.
XXX Not sure if testing tp->t_template is the right way to discern
this -- I just reached for it because the downstream crash is a panic
on tp->t_template == NULL in tcp_output.

XXX In principle this could try connecting to the address, except
it's not passed down from the logic in uipc_socket.c to tcp_sendoob.

Reported-by: syzbot+a01f4cfec72790855ce2@syzkaller.appspotmail.com
2022-06-28 01:44:19 +00:00
knakahara 65b54797cc Remove confusable comment.
The comment was added in tcp_subr.c:r1.124 (2002/03/15).
tcp_drain() is called from softint context only, now.
2022-06-27 01:29:51 +00:00
knakahara d80c914270 Refactor like in_pcb.c:r1.187 and in6_pcb.c:r1.168.
Use TAILQ_FOREACH instead of TAILQ_FOREACH_SAFE about inpt_queue.
rip_pcbnotify() doesn't use "ninph" pointer and doesn't remove elements.
2022-06-13 09:23:23 +00:00
knakahara 9e57acc28a "inp_hash" is not used now. 2022-06-10 09:54:54 +00:00
knakahara b374c4b6c4 Use LIST_FOREACH macro. 2022-06-10 09:51:10 +00:00
knakahara 73a0e19f24 refactor: use TAILQ_FOREACH instead of TAILQ_FOREACH_SAFE about inpt_queue.
They don't use "ninph" pointer and don't remove elements.
2022-06-09 07:01:27 +00:00
andvar ff23aff6ad fix various typos in comments, documentation and messages. 2022-05-31 08:43:13 +00:00
andvar 5fb5f516a8 fix various typos in comments and log messages. 2022-05-29 10:47:39 +00:00
andvar 114b022676 fix various typos in comments. 2022-05-28 22:16:43 +00:00
andvar 86c307248f fix various typos, mainly in comments. 2022-05-28 10:36:21 +00:00
andvar cdc507f0d2 fix various typos in comment, documentation and log messages. 2022-05-24 20:50:17 +00:00
andvar f42f89fd6f fix various small typos, mainly in comments. 2022-05-22 11:27:33 +00:00
andvar a468220ff0 s/yeild/yield/ 2022-05-18 13:37:52 +00:00
andvar e2710f6fc4 fix various typos in comments. 2022-04-17 21:24:52 +00:00
andvar 75d2abaeb1 fix various typos in comments and output/log messages. 2022-04-10 09:50:44 +00:00
andvar 146d03e698 s/postion/position/ 2022-04-08 10:27:04 +00:00
andvar 2fa7e14158 fix various typos, mainly in comments, but also log messages, docs, game text. 2022-04-08 10:17:52 +00:00
andvar 2e9df72ec3 fix various typos in comments. 2022-04-07 19:33:37 +00:00
andvar adbc140349 fix few typos in comments, mainly s/paramenters/parameters/. 2022-03-23 11:08:27 +00:00
andvar a294b89509 s/heaader/header/ 2022-03-15 21:39:59 +00:00
andvar 7f4592413f fix various typos, mainly in comments. 2022-02-16 22:00:55 +00:00
andvar 11aa51d21a s/creting/creating/ 2022-01-01 13:18:43 +00:00
msaitoh 777518dc50 s/implemenation/implementation/ in comment. 2022-01-01 08:34:34 +00:00
andvar 61ae4ee7c6 s/bandwith/bandwidth/ 2021-12-30 23:03:44 +00:00
andvar cbf5c65aff s/occured/occurred/ in comments, log messages and man pages. 2021-12-10 20:36:02 +00:00
msaitoh 86e5a428c2 s/receieve/receive/ 2021-12-05 07:26:35 +00:00
msaitoh c40d6e65a0 s/futher/further/ in comment. 2021-12-05 04:56:39 +00:00
msaitoh ca40522ac5 s/convience/convenience/ in comment. 2021-12-05 04:28:53 +00:00
msaitoh 213f8d896f s/measurment/measurement/ in comment. 2021-12-05 03:08:19 +00:00
andvar 4dbe3593b9 fix typos in comments and log messages, mainly in establish(ed). 2021-12-04 13:23:03 +00:00
andvar 369abe069b fix various typos, mainly s/prefered/preferred/ 2021-11-07 20:31:09 +00:00
andvar fb817dab52 fix various typos in comments, mainly copypasta. 2021-10-24 20:00:11 +00:00
andvar 6f8dc1509f fix various typos, mainly in comments, but also in man pages and log messages. 2021-10-21 13:21:53 +00:00
roy ca7d1a57f1 netinet: Allow binding the unspecified address when no addresses exist
You should always be able to bind to the unspecified address even if
no addresses have been configured on any interface.

For example, a DHCP client could be started before the loopback interface
has been fully configured.
2021-10-19 20:01:09 +00:00
yamaguchi 16737cff1d carp: Register carp_carpdev_state to link-state change hook 2021-09-30 03:43:25 +00:00
christos 35c89f2941 don't opencode kauth_cred_get() 2021-09-21 14:59:14 +00:00
andvar a136e22ab6 fix various typos in comments, messages and documentation. 2021-09-19 10:34:06 +00:00
andvar 4ddb87935b s/aquire/acquire/ in comments, also one typo fix acqure->acquire. 2021-09-07 13:24:45 +00:00
andvar 597fd22c98 fix various typos in comments. 2021-09-06 21:56:03 +00:00
andvar f9faf20aef fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/ 2021-09-03 21:54:58 +00:00
andvar ebbc7028d3 fix typos in words "pointer" and s/fram /frame/ 2021-08-13 20:47:54 +00:00
andvar 6584ea569e fix various typos in compatibility, mainly in comments. 2021-08-09 20:49:08 +00:00
andvar d7fca1ab3d fix typos in asymmetry, asymmetric(al), symmetrical. 2021-08-09 19:57:57 +00:00
andvar ba70c588fa fix various typos in comments. 2021-08-06 07:55:13 +00:00
christos 72e6c96f3b Get the value of the right variable (from RVP) 2021-08-04 08:47:10 +00:00
andvar 40be87ae1d s/threshhold/threshold 2021-07-31 20:29:36 +00:00
andvar 7991f5a7b8 Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
2021-07-24 21:31:31 +00:00
riastradh 076e35792d if_attach and if_initialize cannot fail, don't test return value
These were originally made failable back in 2017 when if_initialize
allocated a softint in every interface for link state changes, so
that it could fail gracefully instead of panicking:

https://mail-index.NetBSD.org/source-changes/2017/10/23/msg089053.html

However, this spawned many seldom- or never-tested error branches,
which are risky to have around.  And that softint in every interface
has since been replaced by a single global workqueue, because link
state changes require thread context but not low latency or high
throughput:

https://mail-index.NetBSD.org/source-changes/2020/02/06/msg113759.html

So there is no longer any reason for if_initialize to fail.  (The
subroutine if_stats_init can't fail because percpu_alloc can't fail
either.)

There is a snag: the softint_establish in if_percpuq_create could
fail, potentially leading to bad consequences later on trying to use
the softint.  This change doesn't introduce any new bugs because of
the snag -- if_percpuq_attach was already broken.  However, the snag
can be better addressed without spawning error branches, either by
using a single softint or making softints less scarce.

(Separate commit will change the signatures of if_attach and
if_initialize to return void, scheduled to ride whatever is the next
convenient kernel bump.)

Patch and testing on amd64 and evbmips64-eb by maya@; commit message
soliloquy, and compile-testing on evbppc/i386/earmv7hf, by me.
2021-06-16 00:21:17 +00:00
christos 9c9223617d Move the offset addition in one place and mask the random generated value
to make sure that the isn is monotonic.
2021-03-09 13:48:16 +00:00
christos c67373b162 mv <sys/cprng.h> include to the kernel portion 2021-03-08 22:01:18 +00:00