Re: Preemption Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, June 07, 2006 at 09:00 +0200, Rafał Bilski wrote:
> l2cap_get_ident() increments tx_ident to give other ident for
> every l2cap_send_cmd(). Maybe You shouldn't hardcode ident.

I used the hardcoded ident just for the purpose of testing and to
validate the source of the problem. I know that such a hardcoded value
would never be acceptable in such a case.

Perhaps the spinlock is the troublemaker, but I don't get the point why
I can use l2cap_get_ident(conn) directly within the function call:

        l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
                                l2cap_build_conf_req(sk, req), req);

but not ahead of it and use the value later on, like in my version:

	l2cap_pi(sk)->ident = l2cap_get_ident(conn);
	[...]
        l2cap_send_cmd(conn, l2cap_pi(sk)->ident, L2CAP_INFO_REQ,
                                l2cap_build_info_req(&info), &info);

I guess a "locking-professional" of the kernel hackers locates the
problem easily or at least in a reasonable amount of time.
I'm just confused.

Has anybody an idea?

Martin


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux