sparse annotation question

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

 



This fragment of ia64 code calculates the address of a user space
location, starting from a kernel derived (i.e. not user supplied)
pointer.  put_user() has to be used because the code is running in
interrupt context and the calculated target address may be invalid or
paged out.

func (long regno, unsigned long *contents)
{
	unsigned long i, *bsp;
	mm_segment_t old_fs;
	bsp = <expression involving only kernel variables>;
	old_fs = set_fs(KERNEL_DS);
	for (i = 0; i < (regno - 32); ++i)
		bsp = ia64_rse_skip_regs(bsp, 1);
	put_user(*contents, bsp);
	set_fs(old_fs);
}

sparse is complaining that the second parameter to put_user() is not
marked as __user.  How do I tell sparse to ignore this case?  Marking
bsp as __user does not work, sparse then complains about incorrect type
in assignment (different address spaces).

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux