lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4a4634330804141301l69d29e32wefa1ceb4ec75ec57@mail.gmail.com>
Date:	Mon, 14 Apr 2008 15:01:38 -0500
From:	"Shirish Pargaonkar" <shirishpargaonkar@...il.com>
To:	"Arjan van de Ven" <arjan@...radead.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: valid task structure and wake_up_process

On 4/14/08, Arjan van de Ven <arjan@...radead.org> wrote:
> On Mon, 14 Apr 2008 13:36:42 -0500
> "Shirish Pargaonkar" <shirishpargaonkar@...il.com> wrote:
>
> > How do I check whether a task is valid before calling
> > wake_up_process() with that task structure pointer?
>
> Hi,
>
> how did you get the pointer you got?
>
> That part (the guy who gave you the pointer) should have taken a reference on the task basically,
> or otherwise locked against the task going away.
>
> In giving you advice it would help tremendously if you actually posted your code...
>
>
>
>
>
> --
> If you want to reach me at my work email, use arjan@...ux.intel.com
> For development, discussion and tips for power savings,
> visit http://www.lesswatts.org
>

Thanks.

This is cifs code fs/cifs.

In cifs_demultiplex_thread, in fs/cifs/connect.c, it calls wake_up_process in
a thread cifsd.

The task struct ptr is stored in mid as current when sending a request.  So this
could a command such as ls or some other application.
A request was sent but a reply was not received or reply was processed late
before the process went away and we have a probably freed task structure
being treated as valid in cifs_demultiplex_thread.

So I thought of checking validity of task structure before calling
wake_up_process.

Regards,

Shirish
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ