Thread (6 messages) 6 messages, 2 authors, 2025-08-21

Re: [PATCH v1 net 2/3] net: rose: convert 'use' field to refcount_t

From: Kuniyuki Iwashima <kuniyu@google.com>
Date: 2025-08-21 02:38:24
Also in: linux-hams

From: Takamitsu Iwai <redacted>
Date: Thu, 21 Aug 2025 02:47:06 +0900
quoted hunk ↗ jump to hunk
@@ -874,8 +874,6 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le
 
 	rose->state = ROSE_STATE_1;
 
-	rose->neighbour->use++;
-
This is replaced by rose_neigh_hold() in rose_get_neigh(),
then rose_neigh_put() needs to be placed in error paths in
rose_connect() (and rose_route_frame()).

 	rose_write_internal(sk, ROSE_CALL_REQUEST);
 	rose_start_heartbeat(sk);
 	rose_start_t1timer(sk);
[...]
quoted hunk ↗ jump to hunk
@@ -680,6 +679,7 @@ struct rose_neigh *rose_get_neigh(rose_address *addr, unsigned char *cause,
 			for (i = 0; i < node->count; i++) {
 				if (node->neighbour[i]->restarted) {
 					res = node->neighbour[i];
+					rose_neigh_hold(node->neighbour[i]);
 					goto out;
 				}
 			}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help