Re: Fwd: uprobes: register/unregister probes.

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

 



On Thu, 2011-11-24 at 20:21 +0530, Srikar Dronamraju wrote:
> > No you don't, you check the return value of igrab(), but you crash hard
> > when someone calls register_uprobe(.inode=NULL).
> > 
> 
> Okay. will add a check for inode before we do the igrab. 

No!!! its fcking pointless calling this function without a valid inode
argument, don't mess about and try and deal with it.

Same with the consumer thing, if you call it with a NULL consumer you're
an idiot, try memcpy(NULL, foo, size), does that return -EINVAL?

Also, what's the point of all this igrab() nonsense? We don't need extra
references on the inode, the caller of these functions had better made
sure the inode is stable and good to use, otherwise it could be freed
before we do igrab() and we'd still crash.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]