On 11/17/2013 03:35 PM, Meelis Roos wrote:
This patch seems to switch ldata with its read_buf and echo_buf from kmalloc/kfree to vmalloc/vfree (the bufs are now inlined in ldata, not separately allocated). More fields in ldata are now explicitly initialized to zero instead of kzalloc doing it before. However, I do not see the initialization of some of the fields - maybe they are done later in the code? I noticed process_char_map, raw, real_raw, icanon, read_buf, echo_buf that were zeroed before but I did not find explicit zeroing of them after the patch. However, just adding a memset to zero ldata after vmalloc does not change anything.
process_char_map, raw, real_raw & icanon are initialized in the n_tty_set_termios() called from n_tty_open() where ldata is first allocated. read_buf is the uninitialized buffer indexed by read_head, canon_head, read_tail & line_start. echo_buf similarly is uninitialized and indexed by echo_head, echo_tail & echo_commit. Regards, Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html