Re: [PATCH] net: hso: fix null-ptr-deref during tty device unregistration

2021-04-07 Thread Anirudh Rayabharam
On Tue, Apr 06, 2021 at 04:39:21PM -0700, David Miller wrote: > From: Anirudh Rayabharam > Date: Tue, 6 Apr 2021 18:13:59 +0530 > > > Multiple ttys try to claim the same the minor number causing a double > > unregistration of the same device. The first unregistration succeeds > > but the next

Re: [PATCH] net: hso: fix null-ptr-deref during tty device unregistration

2021-04-06 Thread David Miller
From: Anirudh Rayabharam Date: Tue, 6 Apr 2021 18:13:59 +0530 > Multiple ttys try to claim the same the minor number causing a double > unregistration of the same device. The first unregistration succeeds > but the next one results in a null-ptr-deref. > > The get_free_serial_index() function

Re: [PATCH] net: hso: fix null-ptr-deref during tty device unregistration

2021-04-06 Thread Greg KH
On Tue, Apr 06, 2021 at 06:13:59PM +0530, Anirudh Rayabharam wrote: > Multiple ttys try to claim the same the minor number causing a double > unregistration of the same device. The first unregistration succeeds > but the next one results in a null-ptr-deref. > > The get_free_serial_index()

Re: [PATCH] net: hso: fix null-ptr-deref during tty device unregistration

2021-04-06 Thread Greg KH
On Tue, Apr 06, 2021 at 06:13:59PM +0530, Anirudh Rayabharam wrote: > Multiple ttys try to claim the same the minor number causing a double > unregistration of the same device. The first unregistration succeeds > but the next one results in a null-ptr-deref. > > The get_free_serial_index()

[PATCH] net: hso: fix null-ptr-deref during tty device unregistration

2021-04-06 Thread Anirudh Rayabharam
Multiple ttys try to claim the same the minor number causing a double unregistration of the same device. The first unregistration succeeds but the next one results in a null-ptr-deref. The get_free_serial_index() function returns an available minor number but doesn't assign it immediately. The