File-system driver issue

Saket Sinha saket.sinha89 at gmail.com
Wed Jun 26 01:02:02 EDT 2013


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.
I think because of all this I am getting some strange warnings and error.


On Wed, Jun 26, 2013 at 10:28 AM, Rohan Puri <rohan.puri15 at gmail.com> wrote:

> On Wed, Jun 26, 2013 at 1:44 AM, Saket Sinha <saket.sinha89 at gmail.com>
> wrote:
> > I have to port a driver from 2.6.18 to 3.8.3
> >
> > Look at the below declaration of current
> > http://lxr.free-electrons.com/source/scripts/kconfig/gconf.c#L62
> > Where struct menu is
> > http://lxr.free-electrons.com/source/scripts/kconfig/expr.h#L159
> >
> > The above one is in kconfig while the lower one is in the kernel. So
> would
> > they be able to affect each other? I guess NO
> >
> > NOW in the driver to be ported-
> > current is defined as:
> > struct task_struct *task = current;
> >
> > but is still able to excess  the field members of task_struct
> >  http://lxr.linux.no/linux+v2.6.18/include/linux/sched.h#L767
> > like
> > attr.ia_uid = current->uid;
> > attr.ia_gid = current->gid;
> >
> > though it has not been initialized or assigned or typecasted to this
> > task_struct.
> > HOW?
> >
> > I searched on the entire lxr but could not find the solution.
> > Kindly help.
> > PS: This driver is built on 2.6.28 kernel so use lxr from 2.6.18 kernel
> only
> > like
> >  http://lxr.linux.no/linux+v2.6.18/
> >
> >
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
> Hi Saket,
>
> Its arch specifc, check file
> http://lxr.linux.no/#linux+v2.6.18/include/asm-x86_64/current.h#L15
>
> - Rohan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130626/7f7741b0/attachment.html 


More information about the Kernelnewbies mailing list