<div dir="ltr">Can you help me find the equivalent entry(I mean arch-specific definition) of current in 3.8.3 kernel which I think is missing.<div><span style="font-family:arial,sans-serif;font-size:13px">I think because of all this I am getting some strange warnings and error.</span><br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 26, 2013 at 10:28 AM, Rohan Puri <span dir="ltr">&lt;<a href="mailto:rohan.puri15@gmail.com" target="_blank">rohan.puri15@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, Jun 26, 2013 at 1:44 AM, Saket Sinha &lt;<a href="mailto:saket.sinha89@gmail.com">saket.sinha89@gmail.com</a>&gt; wrote:<br>

&gt; I have to port a driver from 2.6.18 to 3.8.3<br>
&gt;<br>
&gt; Look at the below declaration of current<br>
&gt; <a href="http://lxr.free-electrons.com/source/scripts/kconfig/gconf.c#L62" target="_blank">http://lxr.free-electrons.com/source/scripts/kconfig/gconf.c#L62</a><br>
&gt; Where struct menu is<br>
&gt; <a href="http://lxr.free-electrons.com/source/scripts/kconfig/expr.h#L159" target="_blank">http://lxr.free-electrons.com/source/scripts/kconfig/expr.h#L159</a><br>
&gt;<br>
&gt; The above one is in kconfig while the lower one is in the kernel. So would<br>
&gt; they be able to affect each other? I guess NO<br>
&gt;<br>
&gt; NOW in the driver to be ported-<br>
&gt; current is defined as:<br>
&gt; struct task_struct *task = current;<br>
&gt;<br>
&gt; but is still able to excess  the field members of task_struct<br>
&gt;  <a href="http://lxr.linux.no/linux+v2.6.18/include/linux/sched.h#L767" target="_blank">http://lxr.linux.no/linux+v2.6.18/include/linux/sched.h#L767</a><br>
&gt; like<br>
&gt; attr.ia_uid = current-&gt;uid;<br>
&gt; attr.ia_gid = current-&gt;gid;<br>
&gt;<br>
&gt; though it has not been initialized or assigned or typecasted to this<br>
&gt; task_struct.<br>
&gt; HOW?<br>
&gt;<br>
&gt; I searched on the entire lxr but could not find the solution.<br>
&gt; Kindly help.<br>
&gt; PS: This driver is built on 2.6.28 kernel so use lxr from 2.6.18 kernel only<br>
&gt; like<br>
&gt;  <a href="http://lxr.linux.no/linux+v2.6.18/" target="_blank">http://lxr.linux.no/linux+v2.6.18/</a><br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Kernelnewbies mailing list<br>
&gt; <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
&gt; <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
&gt;<br>
Hi Saket,<br>
<br>
Its arch specifc, check file<br>
<a href="http://lxr.linux.no/#linux+v2.6.18/include/asm-x86_64/current.h#L15" target="_blank">http://lxr.linux.no/#linux+v2.6.18/include/asm-x86_64/current.h#L15</a><br>
<span class="HOEnZb"><font color="#888888"><br>
- Rohan<br>
</font></span></blockquote></div><br></div>